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
71f25173806a2d54e12dc1381ccb406729246365
144
py
Python
src/models/classification/__init__.py
daevem/tensorflow-research
bee16375186f3b16800986f56dcebfb43d79f293
[ "MIT" ]
null
null
null
src/models/classification/__init__.py
daevem/tensorflow-research
bee16375186f3b16800986f56dcebfb43d79f293
[ "MIT" ]
null
null
null
src/models/classification/__init__.py
daevem/tensorflow-research
bee16375186f3b16800986f56dcebfb43d79f293
[ "MIT" ]
null
null
null
from .conv_classification_model import ConvClassificationModel from .adversarially_classification_model import AdversariallyClassificationModel
48
80
0.930556
12
144
10.833333
0.666667
0.292308
0.384615
0
0
0
0
0
0
0
0
0
0.055556
144
2
81
72
0.955882
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
1
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
8
9c07709f75405984043d244fb4d3b88ee341a56e
6,379
py
Python
venv/lib/python3.6/site-packages/tensorflow_core/_api/v2/compat/v2/nn/__init__.py
databill86/HyperFoods
9267937c8c70fd84017c0f153c241d2686a356dd
[ "MIT" ]
2
2020-09-30T00:11:09.000Z
2021-10-04T13:00:38.000Z
venv/lib/python3.6/site-packages/tensorflow_core/_api/v2/nn/__init__.py
databill86/HyperFoods
9267937c8c70fd84017c0f153c241d2686a356dd
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/tensorflow_core/_api/v2/nn/__init__.py
databill86/HyperFoods
9267937c8c70fd84017c0f153c241d2686a356dd
[ "MIT" ]
null
null
null
# This file is MACHINE GENERATED! Do not edit. # Generated by: tensorflow/python/tools/api/generator/create_python_api.py script. """Wrappers for primitive Neural Net (NN) Operations. """ from __future__ import print_function as _print_function import sys as _sys from tensorflow.python.keras.layers.rnn_cell_wrapper_v2 import DeviceWrapper as RNNCellDeviceWrapper from tensorflow.python.keras.layers.rnn_cell_wrapper_v2 import DropoutWrapper as RNNCellDropoutWrapper from tensorflow.python.keras.layers.rnn_cell_wrapper_v2 import ResidualWrapper as RNNCellResidualWrapper from tensorflow.python.ops.array_ops import depth_to_space_v2 as depth_to_space from tensorflow.python.ops.array_ops import space_to_batch_v2 as space_to_batch from tensorflow.python.ops.array_ops import space_to_depth_v2 as space_to_depth from tensorflow.python.ops.candidate_sampling_ops import all_candidate_sampler from tensorflow.python.ops.candidate_sampling_ops import compute_accidental_hits from tensorflow.python.ops.candidate_sampling_ops import fixed_unigram_candidate_sampler from tensorflow.python.ops.candidate_sampling_ops import learned_unigram_candidate_sampler from tensorflow.python.ops.ctc_ops import collapse_repeated from tensorflow.python.ops.ctc_ops import ctc_beam_search_decoder_v2 as ctc_beam_search_decoder from tensorflow.python.ops.ctc_ops import ctc_greedy_decoder from tensorflow.python.ops.ctc_ops import ctc_loss_v2 as ctc_loss from tensorflow.python.ops.ctc_ops import ctc_unique_labels from tensorflow.python.ops.embedding_ops import embedding_lookup_sparse_v2 as embedding_lookup_sparse from tensorflow.python.ops.embedding_ops import embedding_lookup_v2 as embedding_lookup from tensorflow.python.ops.embedding_ops import safe_embedding_lookup_sparse_v2 as safe_embedding_lookup_sparse from tensorflow.python.ops.gen_math_ops import tanh from tensorflow.python.ops.gen_nn_ops import depthwise_conv2d_native_backprop_filter as depthwise_conv2d_backprop_filter from tensorflow.python.ops.gen_nn_ops import depthwise_conv2d_native_backprop_input as depthwise_conv2d_backprop_input from tensorflow.python.ops.gen_nn_ops import elu from tensorflow.python.ops.gen_nn_ops import l2_loss from tensorflow.python.ops.gen_nn_ops import lrn from tensorflow.python.ops.gen_nn_ops import lrn as local_response_normalization from tensorflow.python.ops.gen_nn_ops import relu from tensorflow.python.ops.gen_nn_ops import selu from tensorflow.python.ops.gen_nn_ops import softplus from tensorflow.python.ops.gen_nn_ops import softsign from tensorflow.python.ops.math_ops import sigmoid from tensorflow.python.ops.nn_impl import batch_norm_with_global_normalization_v2 as batch_norm_with_global_normalization from tensorflow.python.ops.nn_impl import batch_normalization from tensorflow.python.ops.nn_impl import compute_average_loss from tensorflow.python.ops.nn_impl import depthwise_conv2d_v2 as depthwise_conv2d from tensorflow.python.ops.nn_impl import l2_normalize_v2 as l2_normalize from tensorflow.python.ops.nn_impl import log_poisson_loss from tensorflow.python.ops.nn_impl import moments_v2 as moments from tensorflow.python.ops.nn_impl import nce_loss_v2 as nce_loss from tensorflow.python.ops.nn_impl import normalize_moments from tensorflow.python.ops.nn_impl import sampled_softmax_loss_v2 as sampled_softmax_loss from tensorflow.python.ops.nn_impl import scale_regularization_loss from tensorflow.python.ops.nn_impl import separable_conv2d_v2 as separable_conv2d from tensorflow.python.ops.nn_impl import sigmoid_cross_entropy_with_logits_v2 as sigmoid_cross_entropy_with_logits from tensorflow.python.ops.nn_impl import sufficient_statistics_v2 as sufficient_statistics from tensorflow.python.ops.nn_impl import swish from tensorflow.python.ops.nn_impl import weighted_cross_entropy_with_logits_v2 as weighted_cross_entropy_with_logits from tensorflow.python.ops.nn_impl import weighted_moments_v2 as weighted_moments from tensorflow.python.ops.nn_impl import zero_fraction from tensorflow.python.ops.nn_ops import atrous_conv2d from tensorflow.python.ops.nn_ops import atrous_conv2d_transpose from tensorflow.python.ops.nn_ops import avg_pool1d from tensorflow.python.ops.nn_ops import avg_pool2d from tensorflow.python.ops.nn_ops import avg_pool3d from tensorflow.python.ops.nn_ops import avg_pool_v2 as avg_pool from tensorflow.python.ops.nn_ops import bias_add from tensorflow.python.ops.nn_ops import conv1d_transpose from tensorflow.python.ops.nn_ops import conv1d_v2 as conv1d from tensorflow.python.ops.nn_ops import conv2d_transpose_v2 as conv2d_transpose from tensorflow.python.ops.nn_ops import conv2d_v2 as conv2d from tensorflow.python.ops.nn_ops import conv3d_transpose_v2 as conv3d_transpose from tensorflow.python.ops.nn_ops import conv3d_v2 as conv3d from tensorflow.python.ops.nn_ops import conv_transpose from tensorflow.python.ops.nn_ops import convolution_v2 as convolution from tensorflow.python.ops.nn_ops import crelu_v2 as crelu from tensorflow.python.ops.nn_ops import dilation2d_v2 as dilation2d from tensorflow.python.ops.nn_ops import dropout_v2 as dropout from tensorflow.python.ops.nn_ops import erosion2d_v2 as erosion2d from tensorflow.python.ops.nn_ops import fractional_avg_pool_v2 as fractional_avg_pool from tensorflow.python.ops.nn_ops import fractional_max_pool_v2 as fractional_max_pool from tensorflow.python.ops.nn_ops import in_top_k_v2 as in_top_k from tensorflow.python.ops.nn_ops import leaky_relu from tensorflow.python.ops.nn_ops import log_softmax_v2 as log_softmax from tensorflow.python.ops.nn_ops import max_pool1d from tensorflow.python.ops.nn_ops import max_pool2d from tensorflow.python.ops.nn_ops import max_pool3d from tensorflow.python.ops.nn_ops import max_pool_v2 as max_pool from tensorflow.python.ops.nn_ops import max_pool_with_argmax_v2 as max_pool_with_argmax from tensorflow.python.ops.nn_ops import pool_v2 as pool from tensorflow.python.ops.nn_ops import relu6 from tensorflow.python.ops.nn_ops import softmax_cross_entropy_with_logits_v2 as softmax_cross_entropy_with_logits from tensorflow.python.ops.nn_ops import softmax_v2 as softmax from tensorflow.python.ops.nn_ops import sparse_softmax_cross_entropy_with_logits_v2 as sparse_softmax_cross_entropy_with_logits from tensorflow.python.ops.nn_ops import top_k from tensorflow.python.ops.nn_ops import with_space_to_batch del _print_function
66.447917
128
0.883681
1,046
6,379
5.070746
0.136711
0.25641
0.316742
0.351244
0.752262
0.72681
0.714744
0.606335
0.283371
0.124623
0
0.013191
0.073052
6,379
95
129
67.147368
0.883815
0.027747
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
0.988506
0
0.988506
0.022989
0
0
0
null
1
1
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
9
9c0f9f95e83e33bbc0a366e3390807f28a4529c4
49,464
py
Python
intensio/test/python/advanced/output/basicRAT-example/core/mjgOuRFBKcJHpThvKilMDFtfwvdnXNxlHPUELYhGGZGEygCVMmXYpFYIwknsaVZgeiMidKXmfpWwXqHvdAEzqwxOwAoCTsVsHMgFkZcTUltuSCyzbKYPSKBcpHelRsLl.py
Chudry/Intensio-Obfuscator
62f6c8871704693ca79342efb03dcd2530d7614e
[ "MIT" ]
1
2019-09-06T11:55:29.000Z
2019-09-06T11:55:29.000Z
intensio/test/python/advanced/output/basicRAT-example/core/mjgOuRFBKcJHpThvKilMDFtfwvdnXNxlHPUELYhGGZGEygCVMmXYpFYIwknsaVZgeiMidKXmfpWwXqHvdAEzqwxOwAoCTsVsHMgFkZcTUltuSCyzbKYPSKBcpHelRsLl.py
Chudry/Intensio-Obfuscator
62f6c8871704693ca79342efb03dcd2530d7614e
[ "MIT" ]
null
null
null
intensio/test/python/advanced/output/basicRAT-example/core/mjgOuRFBKcJHpThvKilMDFtfwvdnXNxlHPUELYhGGZGEygCVMmXYpFYIwknsaVZgeiMidKXmfpWwXqHvdAEzqwxOwAoCTsVsHMgFkZcTUltuSCyzbKYPSKBcpHelRsLl.py
Chudry/Intensio-Obfuscator
62f6c8871704693ca79342efb03dcd2530d7614e
[ "MIT" ]
null
null
null
RzGzlaAKgiFHPKlYeHXmGWwFVJjGNpoZSQuIfdBOahYmqFlTsjWrJPyjHyzQRiYNeEgGaFEbAAimqKievxWvAPTYadzGhGvKhqOXRmVbQMZxterfvxwCcwNSzxauqJUV=""" \x23\x20\x2d\x2a\x2d\x20\x63\x6f\x64\x69\x6e\x67\x3a\x20\x75\x74\x66\x2d\x38\x20\x2d\x2a\x2d\x0a \x69\x6d\x70\x6f\x72\x74\x20\x73\x6f\x63\x6b\x65\x74\x0a \x6f\x4c\x70\x47\x55\x78\x46\x74\x5a\x55\x51\x44\x61\x53\x65\x61\x48\x53\x72\x79\x44\x57\x76\x7a\x43\x4b\x43\x45\x75\x5a\x6e\x77\x54\x46\x4a\x68\x4b\x4a\x48\x76\x4c\x74\x68\x61\x43\x4d\x52\x65\x66\x55\x6a\x6b\x4c\x47\x6c\x4b\x49\x44\x73\x44\x6b\x68\x4f\x54\x67\x42\x61\x5a\x7a\x73\x4a\x55\x53\x74\x5a\x61\x65\x71\x58\x53\x67\x5a\x45\x4d\x5a\x78\x77\x47\x7a\x52\x66\x57\x55\x4a\x75\x69\x79\x4a\x52\x61\x44\x59\x72\x7a\x66\x5a\x44\x53\x6b\x7a\x6e\x6f\x45\x6e\x6d\x6a\x41\x65\x54\x71\x45\x69\x53\x74\x61\x61\x62\x42\x20\x3d\x20\x27\x77\x45\x42\x54\x53\x64\x5a\x45\x53\x49\x79\x59\x7a\x45\x47\x72\x74\x65\x59\x4e\x67\x64\x57\x66\x70\x76\x62\x78\x64\x45\x4c\x6a\x42\x6e\x63\x48\x4a\x72\x4d\x6d\x75\x4e\x44\x44\x53\x49\x48\x61\x72\x77\x4d\x76\x73\x55\x52\x73\x4c\x4e\x78\x57\x4c\x58\x6b\x62\x58\x56\x58\x42\x45\x6d\x62\x67\x66\x6b\x49\x54\x45\x75\x75\x42\x6a\x78\x6b\x75\x6e\x4a\x73\x54\x68\x51\x46\x68\x6a\x47\x6e\x50\x52\x59\x63\x55\x6b\x79\x74\x47\x50\x63\x4e\x75\x73\x76\x7a\x58\x6b\x46\x66\x6b\x46\x64\x4c\x79\x43\x50\x65\x79\x62\x54\x55\x53\x27\x0a \x74\x47\x68\x6c\x4d\x4c\x58\x56\x59\x6c\x64\x7a\x64\x6d\x79\x65\x58\x72\x56\x68\x56\x69\x4a\x6a\x54\x4b\x43\x71\x45\x79\x57\x7a\x63\x41\x70\x49\x54\x61\x4a\x4b\x4c\x4a\x52\x6f\x69\x77\x41\x52\x58\x54\x42\x74\x68\x49\x69\x73\x59\x66\x43\x6a\x5a\x46\x49\x55\x78\x53\x69\x46\x54\x71\x55\x76\x43\x6f\x63\x69\x41\x57\x6f\x41\x6c\x66\x6e\x69\x65\x69\x5a\x4a\x4a\x62\x64\x65\x53\x64\x52\x59\x65\x5a\x4d\x4f\x74\x53\x53\x4f\x6a\x49\x6c\x65\x4d\x45\x68\x43\x51\x6b\x45\x42\x4b\x59\x51\x6f\x41\x45\x71\x79\x6e\x50\x48\x53\x20\x3d\x20\x27\x67\x76\x4e\x62\x4d\x53\x61\x79\x6c\x44\x67\x6f\x4c\x5a\x49\x66\x76\x6e\x58\x61\x65\x6a\x69\x62\x7a\x75\x47\x43\x59\x49\x63\x6c\x55\x7a\x4d\x4d\x70\x75\x54\x5a\x46\x4f\x55\x43\x4d\x46\x62\x6f\x53\x6f\x67\x74\x45\x41\x6d\x6e\x79\x47\x45\x4a\x53\x41\x56\x62\x4d\x68\x51\x75\x4c\x6b\x6c\x62\x70\x72\x6e\x41\x4b\x4a\x4c\x6a\x4c\x47\x67\x5a\x7a\x53\x7a\x50\x7a\x72\x6f\x6f\x4c\x6c\x53\x66\x73\x61\x69\x73\x71\x47\x6d\x51\x42\x4e\x59\x71\x77\x4c\x46\x57\x47\x47\x70\x7a\x4f\x41\x75\x48\x51\x4f\x6f\x77\x6d\x6d\x46\x78\x27\x0a \x55\x47\x53\x4d\x5a\x66\x4d\x47\x51\x48\x79\x44\x6f\x49\x6a\x6c\x73\x50\x6d\x78\x4a\x66\x4a\x69\x62\x64\x6e\x69\x65\x79\x56\x61\x78\x4f\x76\x67\x4a\x6f\x62\x66\x53\x4a\x45\x74\x64\x42\x6c\x4c\x6c\x6e\x47\x48\x72\x69\x52\x59\x56\x76\x74\x73\x51\x46\x73\x65\x43\x49\x75\x59\x4c\x43\x53\x73\x68\x55\x4c\x42\x5a\x52\x6c\x77\x50\x65\x6f\x52\x6e\x64\x4c\x58\x70\x66\x42\x4a\x76\x79\x66\x6b\x49\x44\x43\x47\x47\x75\x66\x72\x79\x59\x78\x52\x6a\x57\x54\x55\x50\x77\x45\x50\x57\x72\x70\x59\x4a\x63\x70\x4a\x69\x59\x6e\x6e\x20\x3d\x20\x27\x44\x4b\x62\x64\x51\x75\x61\x73\x76\x6b\x70\x77\x4e\x52\x66\x64\x49\x48\x48\x72\x55\x62\x56\x47\x7a\x6f\x56\x56\x51\x6f\x63\x59\x6c\x53\x48\x61\x6c\x72\x70\x56\x54\x43\x4e\x76\x46\x53\x49\x51\x41\x73\x6b\x54\x50\x65\x50\x69\x7a\x58\x56\x51\x76\x6a\x65\x41\x4a\x6c\x75\x6c\x58\x4e\x6a\x44\x4e\x4d\x6a\x49\x50\x4c\x41\x6d\x7a\x50\x45\x75\x69\x6d\x54\x4e\x4d\x63\x53\x46\x56\x63\x65\x43\x79\x4c\x68\x77\x4c\x42\x56\x71\x68\x51\x76\x4a\x54\x56\x6c\x49\x4c\x56\x6a\x50\x70\x66\x42\x45\x6c\x55\x7a\x4b\x69\x63\x4e\x51\x27\x0a \x69\x66\x20\x6f\x4c\x70\x47\x55\x78\x46\x74\x5a\x55\x51\x44\x61\x53\x65\x61\x48\x53\x72\x79\x44\x57\x76\x7a\x43\x4b\x43\x45\x75\x5a\x6e\x77\x54\x46\x4a\x68\x4b\x4a\x48\x76\x4c\x74\x68\x61\x43\x4d\x52\x65\x66\x55\x6a\x6b\x4c\x47\x6c\x4b\x49\x44\x73\x44\x6b\x68\x4f\x54\x67\x42\x61\x5a\x7a\x73\x4a\x55\x53\x74\x5a\x61\x65\x71\x58\x53\x67\x5a\x45\x4d\x5a\x78\x77\x47\x7a\x52\x66\x57\x55\x4a\x75\x69\x79\x4a\x52\x61\x44\x59\x72\x7a\x66\x5a\x44\x53\x6b\x7a\x6e\x6f\x45\x6e\x6d\x6a\x41\x65\x54\x71\x45\x69\x53\x74\x61\x61\x62\x42\x20\x3d\x3d\x20\x74\x47\x68\x6c\x4d\x4c\x58\x56\x59\x6c\x64\x7a\x64\x6d\x79\x65\x58\x72\x56\x68\x56\x69\x4a\x6a\x54\x4b\x43\x71\x45\x79\x57\x7a\x63\x41\x70\x49\x54\x61\x4a\x4b\x4c\x4a\x52\x6f\x69\x77\x41\x52\x58\x54\x42\x74\x68\x49\x69\x73\x59\x66\x43\x6a\x5a\x46\x49\x55\x78\x53\x69\x46\x54\x71\x55\x76\x43\x6f\x63\x69\x41\x57\x6f\x41\x6c\x66\x6e\x69\x65\x69\x5a\x4a\x4a\x62\x64\x65\x53\x64\x52\x59\x65\x5a\x4d\x4f\x74\x53\x53\x4f\x6a\x49\x6c\x65\x4d\x45\x68\x43\x51\x6b\x45\x42\x4b\x59\x51\x6f\x41\x45\x71\x79\x6e\x50\x48\x53\x3a\x0a \x20\x20\x20\x20\x52\x54\x5a\x78\x54\x43\x59\x69\x70\x4a\x6b\x71\x4b\x6c\x4f\x67\x64\x41\x6f\x48\x4d\x6e\x54\x55\x65\x6a\x4b\x74\x44\x47\x72\x43\x58\x59\x4a\x4b\x43\x58\x63\x69\x4b\x4f\x5a\x6f\x42\x52\x52\x6a\x49\x73\x79\x4f\x43\x54\x70\x50\x67\x55\x44\x47\x68\x57\x49\x49\x48\x73\x42\x50\x6c\x53\x53\x4d\x53\x59\x4c\x74\x61\x5a\x58\x4e\x6b\x63\x63\x46\x68\x45\x56\x77\x55\x77\x4f\x51\x59\x79\x6f\x75\x77\x69\x59\x65\x6d\x6c\x58\x68\x61\x57\x48\x56\x62\x79\x75\x67\x4c\x48\x6f\x5a\x66\x6f\x75\x5a\x74\x4f\x6f\x54\x77\x77\x45\x62\x20\x3d\x20\x27\x46\x4d\x78\x70\x53\x56\x72\x61\x6a\x46\x43\x55\x71\x75\x6c\x6e\x67\x64\x55\x5a\x55\x5a\x78\x4f\x59\x4b\x6c\x64\x45\x73\x4f\x68\x56\x62\x75\x5a\x50\x6a\x65\x6a\x57\x57\x70\x61\x6a\x4a\x51\x6c\x6c\x4f\x72\x52\x62\x61\x75\x4d\x63\x77\x70\x44\x48\x7a\x56\x53\x73\x55\x76\x66\x48\x58\x61\x58\x43\x54\x47\x78\x5a\x50\x58\x4f\x6f\x71\x46\x54\x59\x72\x46\x54\x51\x68\x5a\x4f\x54\x65\x44\x61\x61\x4d\x67\x78\x77\x49\x79\x6f\x71\x62\x61\x6e\x7a\x59\x65\x4b\x43\x41\x4e\x4d\x46\x4e\x49\x7a\x58\x76\x4c\x6d\x6a\x50\x61\x77\x27\x0a \x20\x20\x20\x20\x52\x54\x5a\x78\x54\x43\x59\x69\x70\x4a\x6b\x71\x4b\x6c\x4f\x67\x64\x41\x6f\x48\x4d\x6e\x54\x55\x65\x6a\x4b\x74\x44\x47\x72\x43\x58\x59\x4a\x4b\x43\x58\x63\x69\x4b\x4f\x5a\x6f\x42\x52\x52\x6a\x49\x73\x79\x4f\x43\x54\x70\x50\x67\x55\x44\x47\x68\x57\x49\x49\x48\x73\x42\x50\x6c\x53\x53\x4d\x53\x59\x4c\x74\x61\x5a\x58\x4e\x6b\x63\x63\x46\x68\x45\x56\x77\x55\x77\x4f\x51\x59\x79\x6f\x75\x77\x69\x59\x65\x6d\x6c\x58\x68\x61\x57\x48\x56\x62\x79\x75\x67\x4c\x48\x6f\x5a\x66\x6f\x75\x5a\x74\x4f\x6f\x54\x77\x77\x45\x62\x20\x3d\x20\x6f\x4c\x70\x47\x55\x78\x46\x74\x5a\x55\x51\x44\x61\x53\x65\x61\x48\x53\x72\x79\x44\x57\x76\x7a\x43\x4b\x43\x45\x75\x5a\x6e\x77\x54\x46\x4a\x68\x4b\x4a\x48\x76\x4c\x74\x68\x61\x43\x4d\x52\x65\x66\x55\x6a\x6b\x4c\x47\x6c\x4b\x49\x44\x73\x44\x6b\x68\x4f\x54\x67\x42\x61\x5a\x7a\x73\x4a\x55\x53\x74\x5a\x61\x65\x71\x58\x53\x67\x5a\x45\x4d\x5a\x78\x77\x47\x7a\x52\x66\x57\x55\x4a\x75\x69\x79\x4a\x52\x61\x44\x59\x72\x7a\x66\x5a\x44\x53\x6b\x7a\x6e\x6f\x45\x6e\x6d\x6a\x41\x65\x54\x71\x45\x69\x53\x74\x61\x61\x62\x42\x0a \x65\x6c\x73\x65\x3a\x0a \x20\x20\x20\x20\x52\x54\x5a\x78\x54\x43\x59\x69\x70\x4a\x6b\x71\x4b\x6c\x4f\x67\x64\x41\x6f\x48\x4d\x6e\x54\x55\x65\x6a\x4b\x74\x44\x47\x72\x43\x58\x59\x4a\x4b\x43\x58\x63\x69\x4b\x4f\x5a\x6f\x42\x52\x52\x6a\x49\x73\x79\x4f\x43\x54\x70\x50\x67\x55\x44\x47\x68\x57\x49\x49\x48\x73\x42\x50\x6c\x53\x53\x4d\x53\x59\x4c\x74\x61\x5a\x58\x4e\x6b\x63\x63\x46\x68\x45\x56\x77\x55\x77\x4f\x51\x59\x79\x6f\x75\x77\x69\x59\x65\x6d\x6c\x58\x68\x61\x57\x48\x56\x62\x79\x75\x67\x4c\x48\x6f\x5a\x66\x6f\x75\x5a\x74\x4f\x6f\x54\x77\x77\x45\x62\x20\x3d\x20\x27\x46\x4d\x78\x70\x53\x56\x72\x61\x6a\x46\x43\x55\x71\x75\x6c\x6e\x67\x64\x55\x5a\x55\x5a\x78\x4f\x59\x4b\x6c\x64\x45\x73\x4f\x68\x56\x62\x75\x5a\x50\x6a\x65\x6a\x57\x57\x70\x61\x6a\x4a\x51\x6c\x6c\x4f\x72\x52\x62\x61\x75\x4d\x63\x77\x70\x44\x48\x7a\x56\x53\x73\x55\x76\x66\x48\x58\x61\x58\x43\x54\x47\x78\x5a\x50\x58\x4f\x6f\x71\x46\x54\x59\x72\x46\x54\x51\x68\x5a\x4f\x54\x65\x44\x61\x61\x4d\x67\x78\x77\x49\x79\x6f\x71\x62\x61\x6e\x7a\x59\x65\x4b\x43\x41\x4e\x4d\x46\x4e\x49\x7a\x58\x76\x4c\x6d\x6a\x50\x61\x77\x27\x0a \x20\x20\x20\x20\x52\x54\x5a\x78\x54\x43\x59\x69\x70\x4a\x6b\x71\x4b\x6c\x4f\x67\x64\x41\x6f\x48\x4d\x6e\x54\x55\x65\x6a\x4b\x74\x44\x47\x72\x43\x58\x59\x4a\x4b\x43\x58\x63\x69\x4b\x4f\x5a\x6f\x42\x52\x52\x6a\x49\x73\x79\x4f\x43\x54\x70\x50\x67\x55\x44\x47\x68\x57\x49\x49\x48\x73\x42\x50\x6c\x53\x53\x4d\x53\x59\x4c\x74\x61\x5a\x58\x4e\x6b\x63\x63\x46\x68\x45\x56\x77\x55\x77\x4f\x51\x59\x79\x6f\x75\x77\x69\x59\x65\x6d\x6c\x58\x68\x61\x57\x48\x56\x62\x79\x75\x67\x4c\x48\x6f\x5a\x66\x6f\x75\x5a\x74\x4f\x6f\x54\x77\x77\x45\x62\x20\x3d\x20\x55\x47\x53\x4d\x5a\x66\x4d\x47\x51\x48\x79\x44\x6f\x49\x6a\x6c\x73\x50\x6d\x78\x4a\x66\x4a\x69\x62\x64\x6e\x69\x65\x79\x56\x61\x78\x4f\x76\x67\x4a\x6f\x62\x66\x53\x4a\x45\x74\x64\x42\x6c\x4c\x6c\x6e\x47\x48\x72\x69\x52\x59\x56\x76\x74\x73\x51\x46\x73\x65\x43\x49\x75\x59\x4c\x43\x53\x73\x68\x55\x4c\x42\x5a\x52\x6c\x77\x50\x65\x6f\x52\x6e\x64\x4c\x58\x70\x66\x42\x4a\x76\x79\x66\x6b\x49\x44\x43\x47\x47\x75\x66\x72\x79\x59\x78\x52\x6a\x57\x54\x55\x50\x77\x45\x50\x57\x72\x70\x59\x4a\x63\x70\x4a\x69\x59\x6e\x6e\x0a \x4d\x66\x77\x4e\x69\x71\x47\x65\x44\x4f\x6d\x43\x70\x6f\x72\x45\x73\x75\x74\x61\x63\x59\x6b\x4c\x6e\x72\x65\x69\x45\x75\x63\x41\x74\x56\x46\x4c\x70\x6f\x68\x71\x79\x74\x69\x69\x63\x75\x67\x6d\x67\x4b\x4c\x57\x55\x65\x4a\x4e\x50\x6f\x43\x6e\x4f\x6f\x44\x65\x4e\x53\x63\x4b\x61\x4a\x72\x74\x4e\x76\x73\x79\x77\x52\x4f\x50\x6d\x66\x6b\x54\x44\x4a\x48\x63\x4d\x73\x46\x6a\x57\x73\x58\x42\x63\x49\x7a\x55\x79\x67\x6f\x4d\x78\x53\x54\x43\x57\x68\x48\x4e\x63\x5a\x53\x58\x53\x46\x6f\x6c\x65\x78\x4d\x58\x61\x64\x79\x74\x20\x3d\x20\x5b\x20\x32\x31\x2c\x20\x32\x32\x2c\x20\x32\x33\x2c\x20\x32\x35\x2c\x20\x35\x33\x2c\x20\x38\x30\x2c\x20\x31\x31\x30\x2c\x20\x31\x31\x31\x2c\x20\x31\x33\x35\x2c\x20\x31\x33\x39\x2c\x20\x31\x34\x33\x2c\x20\x31\x37\x39\x2c\x20\x34\x34\x33\x2c\x20\x34\x34\x35\x2c\x0a \x35\x31\x34\x2c\x20\x39\x39\x33\x2c\x20\x39\x39\x35\x2c\x20\x31\x37\x32\x33\x2c\x20\x33\x33\x30\x36\x2c\x20\x33\x33\x38\x39\x2c\x20\x35\x39\x30\x30\x2c\x20\x38\x30\x30\x30\x2c\x20\x38\x30\x38\x30\x2c\x20\x38\x34\x34\x33\x2c\x20\x38\x38\x38\x38\x20\x5d\x0a \x64\x65\x66\x20\x49\x6c\x57\x62\x48\x66\x6c\x52\x41\x62\x77\x47\x58\x6b\x6f\x42\x50\x50\x61\x4f\x6b\x6d\x53\x41\x57\x61\x59\x48\x6c\x50\x64\x74\x74\x78\x78\x62\x65\x63\x4c\x44\x6c\x69\x52\x57\x4b\x6d\x6f\x70\x7a\x52\x64\x4f\x55\x7a\x62\x45\x6a\x56\x48\x72\x67\x45\x55\x65\x70\x73\x55\x43\x71\x51\x53\x62\x6b\x58\x4e\x59\x59\x6b\x61\x72\x7a\x4b\x70\x6d\x53\x41\x59\x56\x76\x6b\x63\x45\x65\x51\x64\x57\x50\x42\x62\x67\x47\x64\x61\x68\x51\x75\x58\x68\x6e\x75\x69\x52\x6e\x55\x52\x56\x45\x44\x63\x6e\x46\x71\x51\x52\x4d\x71\x73\x6e\x28\x69\x70\x29\x3a\x0a \x20\x20\x20\x20\x74\x72\x79\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x78\x6c\x42\x69\x78\x77\x4f\x57\x66\x76\x6f\x74\x6f\x49\x6e\x48\x56\x46\x7a\x73\x4e\x71\x57\x50\x76\x55\x76\x61\x51\x52\x72\x63\x6e\x6c\x75\x73\x73\x69\x69\x45\x54\x64\x47\x66\x4c\x61\x4a\x69\x54\x48\x41\x6b\x63\x6e\x57\x45\x7a\x46\x57\x42\x63\x4d\x78\x6f\x6d\x4e\x41\x73\x49\x73\x59\x6f\x51\x69\x42\x78\x43\x4e\x43\x6b\x6d\x73\x79\x50\x6e\x54\x72\x48\x61\x45\x57\x57\x44\x50\x6a\x6d\x42\x45\x52\x65\x74\x69\x65\x54\x42\x78\x73\x54\x54\x75\x44\x6a\x54\x67\x72\x4a\x4e\x54\x66\x56\x49\x53\x65\x68\x6d\x72\x79\x70\x20\x3d\x20\x27\x68\x69\x76\x78\x46\x46\x62\x5a\x68\x4b\x70\x76\x42\x4c\x6f\x6a\x51\x7a\x75\x56\x4e\x5a\x77\x7a\x6c\x69\x5a\x6c\x62\x54\x50\x6c\x6b\x66\x77\x76\x51\x67\x4c\x74\x57\x61\x7a\x77\x5a\x55\x63\x69\x6b\x69\x4e\x46\x4f\x41\x69\x52\x48\x58\x78\x61\x61\x75\x70\x75\x76\x61\x56\x66\x71\x58\x42\x4f\x67\x50\x79\x69\x48\x4e\x6f\x53\x62\x74\x48\x58\x77\x55\x4e\x4f\x5a\x54\x50\x58\x54\x52\x42\x74\x4e\x4f\x64\x61\x49\x76\x72\x57\x44\x79\x56\x45\x50\x61\x64\x4d\x78\x58\x5a\x47\x69\x66\x48\x64\x52\x79\x68\x47\x5a\x75\x50\x7a\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x46\x49\x48\x77\x4f\x4f\x62\x47\x4e\x6f\x4b\x79\x69\x52\x48\x4a\x62\x45\x41\x55\x49\x70\x63\x49\x6e\x64\x56\x76\x6e\x67\x66\x51\x6c\x4d\x66\x44\x62\x53\x41\x4c\x51\x73\x53\x4b\x68\x4e\x6d\x73\x6f\x72\x6b\x48\x4c\x67\x6b\x67\x57\x59\x71\x75\x52\x48\x49\x47\x63\x4f\x52\x4a\x70\x68\x69\x55\x50\x41\x68\x70\x67\x6f\x76\x68\x45\x73\x51\x43\x45\x53\x62\x76\x68\x6b\x58\x7a\x44\x73\x73\x6a\x74\x6c\x6f\x54\x45\x69\x55\x6a\x78\x79\x74\x71\x50\x69\x44\x4f\x62\x54\x4d\x66\x61\x4f\x4c\x57\x69\x78\x66\x59\x72\x77\x78\x4f\x20\x3d\x20\x27\x4d\x7a\x71\x6c\x63\x4e\x4f\x6a\x4f\x42\x70\x55\x55\x6e\x6c\x78\x4e\x4b\x6f\x42\x6d\x61\x51\x7a\x4d\x69\x46\x52\x75\x6e\x45\x6d\x4a\x6d\x42\x78\x74\x48\x69\x62\x59\x5a\x6a\x43\x44\x66\x6a\x64\x4c\x4f\x43\x53\x75\x46\x70\x68\x59\x51\x6c\x75\x68\x5a\x70\x54\x46\x68\x41\x6f\x4f\x4b\x56\x58\x52\x4e\x6f\x42\x57\x51\x4b\x65\x4d\x79\x74\x4c\x53\x6f\x4f\x4c\x55\x6e\x4d\x74\x72\x79\x4c\x4e\x70\x55\x6a\x45\x4f\x54\x79\x53\x48\x57\x74\x41\x6c\x47\x52\x47\x6b\x75\x59\x7a\x62\x4f\x61\x76\x6a\x4a\x4e\x6e\x7a\x46\x61\x65\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x65\x58\x6e\x6c\x6b\x74\x4e\x63\x49\x52\x45\x75\x61\x63\x6e\x4c\x61\x6a\x71\x58\x6e\x53\x64\x65\x6c\x4c\x73\x79\x4e\x57\x54\x66\x59\x6d\x69\x68\x64\x46\x53\x51\x50\x49\x53\x4e\x6c\x57\x48\x71\x71\x53\x61\x67\x73\x45\x44\x4d\x73\x61\x56\x67\x6d\x77\x74\x4a\x43\x4d\x77\x5a\x6f\x48\x48\x78\x54\x43\x63\x6e\x69\x58\x4e\x57\x63\x6e\x53\x45\x75\x72\x57\x66\x72\x77\x63\x6e\x79\x63\x61\x6c\x63\x52\x65\x76\x49\x62\x57\x6e\x77\x56\x4a\x42\x50\x64\x45\x6b\x4a\x43\x42\x65\x45\x7a\x4e\x55\x48\x57\x4e\x50\x67\x54\x47\x7a\x20\x3d\x20\x27\x4c\x42\x41\x69\x58\x69\x69\x6a\x7a\x59\x6b\x6d\x56\x47\x4f\x74\x46\x4d\x56\x48\x46\x56\x65\x42\x78\x68\x67\x61\x4d\x63\x51\x71\x45\x4f\x6b\x72\x59\x50\x69\x4d\x47\x64\x7a\x6a\x68\x79\x7a\x52\x77\x64\x46\x74\x78\x69\x6f\x53\x70\x58\x54\x70\x74\x6c\x6b\x56\x66\x77\x62\x65\x57\x75\x68\x57\x4d\x69\x75\x62\x47\x64\x69\x56\x55\x45\x78\x42\x74\x46\x47\x76\x47\x59\x51\x51\x52\x69\x77\x50\x56\x65\x52\x42\x71\x78\x64\x58\x75\x52\x62\x54\x41\x65\x5a\x45\x4e\x6b\x6b\x54\x66\x41\x6d\x4b\x4c\x79\x51\x72\x45\x66\x6f\x56\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x48\x4b\x76\x75\x69\x76\x58\x54\x68\x68\x64\x57\x4f\x76\x58\x79\x4c\x4a\x73\x55\x67\x63\x43\x74\x67\x78\x4d\x73\x68\x64\x4e\x6f\x4c\x6c\x55\x54\x7a\x51\x75\x6a\x70\x62\x67\x4c\x4b\x61\x76\x67\x52\x42\x7a\x71\x74\x70\x47\x47\x4c\x5a\x53\x50\x71\x44\x5a\x57\x4a\x77\x73\x52\x66\x76\x64\x59\x67\x6d\x70\x66\x6a\x6e\x73\x59\x6a\x5a\x63\x68\x46\x56\x79\x74\x5a\x4d\x71\x69\x72\x63\x71\x71\x73\x56\x42\x79\x75\x69\x74\x4f\x4c\x74\x61\x54\x42\x70\x68\x54\x68\x67\x7a\x74\x47\x41\x78\x71\x70\x4a\x68\x73\x77\x46\x59\x76\x20\x3d\x20\x27\x46\x79\x57\x4c\x78\x69\x52\x75\x64\x54\x66\x53\x72\x4d\x78\x61\x4d\x78\x66\x68\x47\x67\x7a\x46\x79\x77\x42\x6f\x68\x6a\x46\x41\x4b\x72\x65\x52\x50\x72\x6e\x6e\x66\x4f\x72\x46\x61\x45\x45\x77\x4f\x41\x59\x4e\x76\x68\x4c\x42\x61\x79\x48\x7a\x57\x65\x7a\x4b\x52\x79\x4b\x6f\x6f\x52\x63\x43\x54\x42\x52\x49\x57\x46\x45\x68\x56\x78\x68\x67\x6d\x73\x6f\x56\x75\x6a\x41\x65\x50\x55\x54\x52\x50\x56\x41\x49\x68\x66\x79\x79\x62\x6f\x42\x47\x61\x42\x41\x79\x58\x44\x74\x57\x6e\x77\x74\x4d\x6b\x70\x61\x49\x4f\x7a\x77\x4f\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x52\x5a\x70\x56\x65\x46\x51\x75\x65\x50\x6e\x4f\x59\x54\x51\x50\x42\x71\x57\x44\x43\x74\x78\x59\x63\x76\x4a\x45\x5a\x56\x4f\x4a\x76\x77\x72\x63\x6e\x42\x52\x72\x65\x4e\x6c\x58\x4a\x67\x6c\x50\x5a\x53\x48\x46\x5a\x6f\x64\x79\x54\x68\x72\x47\x4f\x46\x64\x49\x6d\x53\x4b\x75\x44\x58\x65\x78\x66\x79\x44\x76\x64\x49\x63\x42\x46\x74\x66\x50\x70\x65\x73\x44\x50\x49\x70\x68\x62\x6c\x51\x46\x55\x58\x5a\x4d\x58\x63\x4a\x73\x6c\x53\x66\x4e\x70\x4b\x79\x72\x73\x54\x7a\x58\x57\x6a\x69\x62\x71\x76\x4e\x48\x57\x4c\x58\x61\x20\x3d\x20\x27\x48\x4d\x68\x72\x4c\x76\x47\x6e\x62\x57\x66\x59\x62\x65\x69\x65\x63\x74\x52\x57\x63\x54\x67\x71\x66\x68\x48\x4b\x41\x7a\x55\x4b\x5a\x64\x61\x6d\x54\x49\x78\x67\x4a\x7a\x4e\x70\x49\x51\x50\x6b\x6f\x58\x74\x4a\x6a\x6a\x70\x71\x43\x66\x6e\x72\x65\x65\x71\x62\x56\x57\x50\x77\x61\x76\x41\x74\x6a\x74\x46\x79\x70\x69\x77\x4a\x64\x55\x68\x41\x43\x6b\x49\x4d\x65\x75\x6e\x6a\x66\x4f\x4b\x4f\x7a\x41\x56\x7a\x73\x67\x74\x47\x73\x51\x51\x4f\x6e\x6d\x58\x71\x44\x68\x61\x62\x59\x44\x46\x63\x43\x57\x69\x71\x4e\x75\x43\x4c\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x65\x4a\x4a\x61\x6c\x5a\x4c\x4b\x76\x53\x5a\x72\x4d\x68\x62\x75\x48\x69\x4f\x48\x51\x47\x6d\x74\x4f\x55\x4e\x55\x59\x49\x62\x41\x6a\x4a\x71\x74\x52\x65\x54\x65\x4a\x61\x7a\x6b\x52\x43\x48\x57\x51\x77\x42\x42\x4b\x49\x6c\x5a\x78\x61\x5a\x41\x71\x66\x6f\x68\x76\x68\x70\x6c\x79\x64\x75\x66\x4b\x56\x44\x57\x61\x70\x56\x62\x4a\x51\x46\x4a\x42\x6f\x4a\x41\x62\x57\x49\x78\x5a\x4a\x76\x43\x70\x6f\x5a\x6f\x6f\x66\x64\x5a\x67\x66\x5a\x72\x4e\x64\x6e\x4e\x62\x49\x6a\x47\x74\x54\x6d\x50\x7a\x4b\x69\x5a\x6c\x4a\x66\x64\x20\x3d\x20\x27\x46\x46\x4d\x44\x49\x58\x63\x67\x67\x67\x54\x44\x64\x66\x54\x52\x68\x55\x43\x7a\x64\x4a\x76\x44\x42\x44\x68\x4d\x55\x41\x4c\x46\x69\x63\x6e\x51\x48\x56\x4f\x79\x72\x62\x58\x56\x4c\x74\x79\x48\x6f\x61\x6b\x5a\x54\x44\x6e\x42\x46\x43\x58\x6b\x72\x73\x53\x7a\x41\x5a\x59\x55\x51\x4d\x49\x63\x71\x75\x6a\x78\x49\x57\x73\x76\x4e\x64\x73\x52\x42\x64\x52\x70\x4a\x6e\x59\x57\x6e\x53\x49\x55\x61\x72\x5a\x41\x6e\x45\x7a\x55\x43\x74\x65\x7a\x73\x77\x68\x4a\x65\x63\x61\x73\x61\x65\x4f\x76\x63\x46\x4f\x68\x52\x6b\x62\x49\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x65\x58\x6e\x6c\x6b\x74\x4e\x63\x49\x52\x45\x75\x61\x63\x6e\x4c\x61\x6a\x71\x58\x6e\x53\x64\x65\x6c\x4c\x73\x79\x4e\x57\x54\x66\x59\x6d\x69\x68\x64\x46\x53\x51\x50\x49\x53\x4e\x6c\x57\x48\x71\x71\x53\x61\x67\x73\x45\x44\x4d\x73\x61\x56\x67\x6d\x77\x74\x4a\x43\x4d\x77\x5a\x6f\x48\x48\x78\x54\x43\x63\x6e\x69\x58\x4e\x57\x63\x6e\x53\x45\x75\x72\x57\x66\x72\x77\x63\x6e\x79\x63\x61\x6c\x63\x52\x65\x76\x49\x62\x57\x6e\x77\x56\x4a\x42\x50\x64\x45\x6b\x4a\x43\x42\x65\x45\x7a\x4e\x55\x48\x57\x4e\x50\x67\x54\x47\x7a\x20\x3d\x3d\x20\x48\x4b\x76\x75\x69\x76\x58\x54\x68\x68\x64\x57\x4f\x76\x58\x79\x4c\x4a\x73\x55\x67\x63\x43\x74\x67\x78\x4d\x73\x68\x64\x4e\x6f\x4c\x6c\x55\x54\x7a\x51\x75\x6a\x70\x62\x67\x4c\x4b\x61\x76\x67\x52\x42\x7a\x71\x74\x70\x47\x47\x4c\x5a\x53\x50\x71\x44\x5a\x57\x4a\x77\x73\x52\x66\x76\x64\x59\x67\x6d\x70\x66\x6a\x6e\x73\x59\x6a\x5a\x63\x68\x46\x56\x79\x74\x5a\x4d\x71\x69\x72\x63\x71\x71\x73\x56\x42\x79\x75\x69\x74\x4f\x4c\x74\x61\x54\x42\x70\x68\x54\x68\x67\x7a\x74\x47\x41\x78\x71\x70\x4a\x68\x73\x77\x46\x59\x76\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x65\x4a\x4a\x61\x6c\x5a\x4c\x4b\x76\x53\x5a\x72\x4d\x68\x62\x75\x48\x69\x4f\x48\x51\x47\x6d\x74\x4f\x55\x4e\x55\x59\x49\x62\x41\x6a\x4a\x71\x74\x52\x65\x54\x65\x4a\x61\x7a\x6b\x52\x43\x48\x57\x51\x77\x42\x42\x4b\x49\x6c\x5a\x78\x61\x5a\x41\x71\x66\x6f\x68\x76\x68\x70\x6c\x79\x64\x75\x66\x4b\x56\x44\x57\x61\x70\x56\x62\x4a\x51\x46\x4a\x42\x6f\x4a\x41\x62\x57\x49\x78\x5a\x4a\x76\x43\x70\x6f\x5a\x6f\x6f\x66\x64\x5a\x67\x66\x5a\x72\x4e\x64\x6e\x4e\x62\x49\x6a\x47\x74\x54\x6d\x50\x7a\x4b\x69\x5a\x6c\x4a\x66\x64\x20\x69\x6e\x20\x52\x5a\x70\x56\x65\x46\x51\x75\x65\x50\x6e\x4f\x59\x54\x51\x50\x42\x71\x57\x44\x43\x74\x78\x59\x63\x76\x4a\x45\x5a\x56\x4f\x4a\x76\x77\x72\x63\x6e\x42\x52\x72\x65\x4e\x6c\x58\x4a\x67\x6c\x50\x5a\x53\x48\x46\x5a\x6f\x64\x79\x54\x68\x72\x47\x4f\x46\x64\x49\x6d\x53\x4b\x75\x44\x58\x65\x78\x66\x79\x44\x76\x64\x49\x63\x42\x46\x74\x66\x50\x70\x65\x73\x44\x50\x49\x70\x68\x62\x6c\x51\x46\x55\x58\x5a\x4d\x58\x63\x4a\x73\x6c\x53\x66\x4e\x70\x4b\x79\x72\x73\x54\x7a\x58\x57\x6a\x69\x62\x71\x76\x4e\x48\x57\x4c\x58\x61\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x65\x4a\x4a\x61\x6c\x5a\x4c\x4b\x76\x53\x5a\x72\x4d\x68\x62\x75\x48\x69\x4f\x48\x51\x47\x6d\x74\x4f\x55\x4e\x55\x59\x49\x62\x41\x6a\x4a\x71\x74\x52\x65\x54\x65\x4a\x61\x7a\x6b\x52\x43\x48\x57\x51\x77\x42\x42\x4b\x49\x6c\x5a\x78\x61\x5a\x41\x71\x66\x6f\x68\x76\x68\x70\x6c\x79\x64\x75\x66\x4b\x56\x44\x57\x61\x70\x56\x62\x4a\x51\x46\x4a\x42\x6f\x4a\x41\x62\x57\x49\x78\x5a\x4a\x76\x43\x70\x6f\x5a\x6f\x6f\x66\x64\x5a\x67\x66\x5a\x72\x4e\x64\x6e\x4e\x62\x49\x6a\x47\x74\x54\x6d\x50\x7a\x4b\x69\x5a\x6c\x4a\x66\x64\x20\x3d\x3d\x20\x48\x4b\x76\x75\x69\x76\x58\x54\x68\x68\x64\x57\x4f\x76\x58\x79\x4c\x4a\x73\x55\x67\x63\x43\x74\x67\x78\x4d\x73\x68\x64\x4e\x6f\x4c\x6c\x55\x54\x7a\x51\x75\x6a\x70\x62\x67\x4c\x4b\x61\x76\x67\x52\x42\x7a\x71\x74\x70\x47\x47\x4c\x5a\x53\x50\x71\x44\x5a\x57\x4a\x77\x73\x52\x66\x76\x64\x59\x67\x6d\x70\x66\x6a\x6e\x73\x59\x6a\x5a\x63\x68\x46\x56\x79\x74\x5a\x4d\x71\x69\x72\x63\x71\x71\x73\x56\x42\x79\x75\x69\x74\x4f\x4c\x74\x61\x54\x42\x70\x68\x54\x68\x67\x7a\x74\x47\x41\x78\x71\x70\x4a\x68\x73\x77\x46\x59\x76\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x52\x5a\x70\x56\x65\x46\x51\x75\x65\x50\x6e\x4f\x59\x54\x51\x50\x42\x71\x57\x44\x43\x74\x78\x59\x63\x76\x4a\x45\x5a\x56\x4f\x4a\x76\x77\x72\x63\x6e\x42\x52\x72\x65\x4e\x6c\x58\x4a\x67\x6c\x50\x5a\x53\x48\x46\x5a\x6f\x64\x79\x54\x68\x72\x47\x4f\x46\x64\x49\x6d\x53\x4b\x75\x44\x58\x65\x78\x66\x79\x44\x76\x64\x49\x63\x42\x46\x74\x66\x50\x70\x65\x73\x44\x50\x49\x70\x68\x62\x6c\x51\x46\x55\x58\x5a\x4d\x58\x63\x4a\x73\x6c\x53\x66\x4e\x70\x4b\x79\x72\x73\x54\x7a\x58\x57\x6a\x69\x62\x71\x76\x4e\x48\x57\x4c\x58\x61\x20\x3d\x20\x78\x6c\x42\x69\x78\x77\x4f\x57\x66\x76\x6f\x74\x6f\x49\x6e\x48\x56\x46\x7a\x73\x4e\x71\x57\x50\x76\x55\x76\x61\x51\x52\x72\x63\x6e\x6c\x75\x73\x73\x69\x69\x45\x54\x64\x47\x66\x4c\x61\x4a\x69\x54\x48\x41\x6b\x63\x6e\x57\x45\x7a\x46\x57\x42\x63\x4d\x78\x6f\x6d\x4e\x41\x73\x49\x73\x59\x6f\x51\x69\x42\x78\x43\x4e\x43\x6b\x6d\x73\x79\x50\x6e\x54\x72\x48\x61\x45\x57\x57\x44\x50\x6a\x6d\x42\x45\x52\x65\x74\x69\x65\x54\x42\x78\x73\x54\x54\x75\x44\x6a\x54\x67\x72\x4a\x4e\x54\x66\x56\x49\x53\x65\x68\x6d\x72\x79\x70\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x73\x65\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x48\x4b\x76\x75\x69\x76\x58\x54\x68\x68\x64\x57\x4f\x76\x58\x79\x4c\x4a\x73\x55\x67\x63\x43\x74\x67\x78\x4d\x73\x68\x64\x4e\x6f\x4c\x6c\x55\x54\x7a\x51\x75\x6a\x70\x62\x67\x4c\x4b\x61\x76\x67\x52\x42\x7a\x71\x74\x70\x47\x47\x4c\x5a\x53\x50\x71\x44\x5a\x57\x4a\x77\x73\x52\x66\x76\x64\x59\x67\x6d\x70\x66\x6a\x6e\x73\x59\x6a\x5a\x63\x68\x46\x56\x79\x74\x5a\x4d\x71\x69\x72\x63\x71\x71\x73\x56\x42\x79\x75\x69\x74\x4f\x4c\x74\x61\x54\x42\x70\x68\x54\x68\x67\x7a\x74\x47\x41\x78\x71\x70\x4a\x68\x73\x77\x46\x59\x76\x20\x3d\x20\x46\x49\x48\x77\x4f\x4f\x62\x47\x4e\x6f\x4b\x79\x69\x52\x48\x4a\x62\x45\x41\x55\x49\x70\x63\x49\x6e\x64\x56\x76\x6e\x67\x66\x51\x6c\x4d\x66\x44\x62\x53\x41\x4c\x51\x73\x53\x4b\x68\x4e\x6d\x73\x6f\x72\x6b\x48\x4c\x67\x6b\x67\x57\x59\x71\x75\x52\x48\x49\x47\x63\x4f\x52\x4a\x70\x68\x69\x55\x50\x41\x68\x70\x67\x6f\x76\x68\x45\x73\x51\x43\x45\x53\x62\x76\x68\x6b\x58\x7a\x44\x73\x73\x6a\x74\x6c\x6f\x54\x45\x69\x55\x6a\x78\x79\x74\x71\x50\x69\x44\x4f\x62\x54\x4d\x66\x61\x4f\x4c\x57\x69\x78\x66\x59\x72\x77\x78\x4f\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x73\x6f\x63\x6b\x65\x74\x2e\x69\x6e\x65\x74\x5f\x61\x74\x6f\x6e\x28\x69\x70\x29\x0a \x20\x20\x20\x20\x65\x78\x63\x65\x70\x74\x20\x73\x6f\x63\x6b\x65\x74\x2e\x65\x72\x72\x6f\x72\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x4f\x44\x4a\x57\x67\x6d\x53\x64\x5a\x52\x54\x76\x4d\x4a\x58\x67\x75\x4b\x52\x6b\x66\x54\x6d\x48\x61\x48\x78\x77\x70\x47\x79\x78\x58\x6b\x59\x70\x68\x43\x76\x64\x77\x47\x4f\x4e\x4c\x57\x46\x70\x4a\x51\x77\x50\x43\x4f\x66\x66\x6c\x44\x70\x4f\x65\x42\x72\x6f\x50\x49\x74\x76\x56\x6c\x7a\x76\x78\x4e\x43\x53\x50\x7a\x6e\x73\x56\x49\x5a\x4f\x63\x50\x4f\x53\x59\x65\x6e\x53\x69\x57\x4f\x72\x61\x4c\x71\x73\x56\x6d\x6e\x6c\x43\x77\x55\x50\x4a\x4c\x43\x54\x6a\x46\x58\x5a\x73\x61\x6a\x63\x50\x52\x4a\x6b\x4b\x44\x6f\x4e\x20\x3d\x20\x27\x6b\x50\x51\x48\x4a\x6e\x58\x58\x68\x72\x6e\x51\x67\x41\x65\x67\x53\x52\x6e\x45\x58\x79\x67\x45\x62\x7a\x56\x74\x72\x4a\x73\x55\x51\x7a\x4a\x73\x45\x6e\x65\x65\x41\x48\x48\x76\x68\x52\x61\x68\x64\x54\x67\x4d\x59\x68\x4b\x4f\x77\x5a\x6f\x72\x48\x63\x51\x50\x72\x5a\x59\x62\x69\x6d\x55\x63\x67\x68\x79\x6c\x44\x6a\x47\x6b\x43\x4a\x49\x53\x43\x68\x4f\x71\x51\x59\x51\x4c\x42\x76\x74\x67\x44\x66\x6a\x53\x50\x53\x45\x6d\x4e\x66\x53\x43\x73\x6c\x4f\x58\x4b\x61\x54\x67\x54\x45\x74\x5a\x65\x48\x74\x41\x43\x64\x71\x74\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x67\x42\x4e\x59\x46\x72\x54\x47\x74\x61\x4e\x75\x49\x77\x7a\x75\x46\x44\x41\x6a\x55\x78\x4f\x5a\x53\x47\x76\x78\x4b\x63\x49\x4a\x6e\x6b\x4a\x70\x45\x59\x77\x6f\x74\x64\x64\x6c\x41\x47\x5a\x6f\x6b\x71\x51\x7a\x54\x44\x57\x79\x73\x74\x6d\x54\x49\x70\x62\x77\x78\x4d\x75\x6b\x6d\x42\x67\x72\x42\x4c\x61\x45\x6b\x6d\x72\x78\x70\x79\x77\x46\x58\x54\x68\x75\x44\x6d\x48\x65\x4e\x6d\x42\x48\x5a\x41\x50\x71\x78\x79\x59\x73\x52\x75\x69\x69\x45\x6b\x50\x41\x70\x78\x58\x6f\x6b\x4c\x62\x44\x6b\x59\x73\x4b\x58\x6b\x76\x6e\x20\x3d\x20\x27\x46\x63\x71\x68\x7a\x4e\x54\x59\x55\x65\x77\x74\x72\x6d\x79\x55\x76\x7a\x55\x55\x54\x69\x53\x47\x52\x64\x79\x47\x63\x5a\x4c\x56\x55\x59\x66\x68\x77\x57\x53\x6e\x69\x44\x62\x54\x67\x50\x54\x46\x52\x4b\x62\x65\x6c\x51\x56\x7a\x47\x73\x56\x6c\x54\x52\x68\x63\x6d\x54\x4f\x79\x69\x49\x77\x66\x64\x44\x46\x74\x78\x41\x74\x62\x52\x41\x6f\x48\x64\x65\x7a\x55\x66\x77\x73\x53\x46\x79\x4a\x42\x56\x56\x79\x46\x46\x79\x54\x64\x76\x68\x4c\x45\x50\x43\x67\x54\x4c\x69\x4b\x69\x55\x78\x4e\x47\x75\x76\x63\x6d\x43\x75\x6e\x52\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x4f\x44\x4a\x57\x67\x6d\x53\x64\x5a\x52\x54\x76\x4d\x4a\x58\x67\x75\x4b\x52\x6b\x66\x54\x6d\x48\x61\x48\x78\x77\x70\x47\x79\x78\x58\x6b\x59\x70\x68\x43\x76\x64\x77\x47\x4f\x4e\x4c\x57\x46\x70\x4a\x51\x77\x50\x43\x4f\x66\x66\x6c\x44\x70\x4f\x65\x42\x72\x6f\x50\x49\x74\x76\x56\x6c\x7a\x76\x78\x4e\x43\x53\x50\x7a\x6e\x73\x56\x49\x5a\x4f\x63\x50\x4f\x53\x59\x65\x6e\x53\x69\x57\x4f\x72\x61\x4c\x71\x73\x56\x6d\x6e\x6c\x43\x77\x55\x50\x4a\x4c\x43\x54\x6a\x46\x58\x5a\x73\x61\x6a\x63\x50\x52\x4a\x6b\x4b\x44\x6f\x4e\x20\x21\x3d\x20\x67\x42\x4e\x59\x46\x72\x54\x47\x74\x61\x4e\x75\x49\x77\x7a\x75\x46\x44\x41\x6a\x55\x78\x4f\x5a\x53\x47\x76\x78\x4b\x63\x49\x4a\x6e\x6b\x4a\x70\x45\x59\x77\x6f\x74\x64\x64\x6c\x41\x47\x5a\x6f\x6b\x71\x51\x7a\x54\x44\x57\x79\x73\x74\x6d\x54\x49\x70\x62\x77\x78\x4d\x75\x6b\x6d\x42\x67\x72\x42\x4c\x61\x45\x6b\x6d\x72\x78\x70\x79\x77\x46\x58\x54\x68\x75\x44\x6d\x48\x65\x4e\x6d\x42\x48\x5a\x41\x50\x71\x78\x79\x59\x73\x52\x75\x69\x69\x45\x6b\x50\x41\x70\x78\x58\x6f\x6b\x4c\x62\x44\x6b\x59\x73\x4b\x58\x6b\x76\x6e\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x45\x69\x67\x47\x4c\x79\x74\x49\x48\x79\x4e\x66\x4f\x74\x65\x7a\x78\x54\x76\x4d\x69\x45\x44\x4b\x58\x67\x46\x4e\x41\x58\x58\x71\x46\x4f\x65\x73\x78\x6b\x6a\x46\x41\x42\x6a\x77\x73\x62\x48\x6a\x53\x6a\x6d\x47\x6d\x73\x61\x69\x54\x58\x72\x4c\x72\x51\x68\x61\x63\x4a\x69\x56\x4e\x44\x6d\x55\x77\x77\x70\x6a\x45\x63\x71\x56\x63\x56\x73\x4c\x59\x72\x66\x6c\x49\x66\x64\x72\x70\x63\x70\x46\x50\x68\x6e\x78\x65\x4a\x61\x68\x70\x79\x68\x6c\x41\x6a\x6d\x46\x56\x79\x52\x73\x6a\x68\x46\x61\x67\x76\x6a\x74\x53\x48\x6f\x79\x20\x3d\x20\x27\x73\x65\x6f\x6e\x52\x54\x58\x4b\x5a\x73\x71\x4d\x4c\x52\x56\x59\x66\x65\x70\x43\x74\x57\x59\x6f\x4c\x4c\x4c\x6b\x6f\x6e\x69\x7a\x4b\x59\x64\x58\x62\x45\x75\x41\x41\x7a\x62\x4f\x42\x6b\x4b\x53\x54\x43\x70\x46\x50\x73\x58\x46\x4b\x68\x4e\x4b\x50\x6e\x57\x49\x7a\x43\x69\x6c\x6b\x59\x47\x63\x68\x69\x5a\x49\x6d\x41\x77\x6f\x6f\x6e\x42\x57\x6a\x69\x47\x77\x6f\x53\x48\x49\x62\x55\x76\x46\x61\x61\x7a\x64\x4c\x52\x47\x6f\x75\x78\x65\x53\x6d\x48\x51\x76\x43\x76\x79\x54\x66\x74\x65\x48\x6c\x47\x4f\x79\x4e\x62\x48\x43\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x78\x69\x71\x53\x7a\x68\x4e\x7a\x4e\x4e\x64\x75\x48\x74\x45\x48\x6f\x57\x78\x62\x6b\x70\x73\x42\x77\x6d\x75\x6f\x4f\x71\x54\x4d\x56\x69\x49\x75\x65\x4e\x53\x41\x62\x53\x7a\x62\x73\x6c\x72\x50\x73\x76\x45\x41\x4b\x4c\x59\x41\x72\x5a\x6e\x45\x7a\x77\x4b\x45\x47\x44\x4d\x71\x59\x59\x56\x42\x70\x74\x64\x43\x50\x4d\x6a\x70\x45\x58\x4a\x51\x6a\x72\x54\x4e\x71\x79\x68\x55\x41\x59\x67\x4e\x66\x54\x6d\x7a\x67\x71\x6f\x4f\x55\x46\x56\x52\x78\x59\x4e\x52\x58\x7a\x76\x65\x54\x78\x69\x72\x42\x65\x70\x68\x61\x4d\x4d\x20\x3d\x20\x27\x52\x50\x51\x61\x72\x79\x44\x69\x66\x4e\x68\x6e\x58\x4c\x78\x45\x75\x50\x46\x4f\x48\x5a\x57\x4c\x6f\x58\x70\x72\x70\x6a\x79\x46\x5a\x50\x62\x46\x45\x4d\x61\x73\x63\x6c\x6a\x72\x70\x50\x75\x4d\x4f\x64\x45\x54\x6b\x63\x78\x47\x4f\x6f\x6c\x65\x4f\x6e\x7a\x47\x6c\x48\x61\x48\x6b\x4f\x59\x47\x62\x49\x58\x4a\x46\x77\x4e\x58\x42\x79\x41\x55\x4d\x45\x6a\x44\x4a\x51\x76\x57\x65\x46\x44\x67\x69\x6e\x4a\x47\x65\x4c\x6b\x5a\x41\x54\x52\x58\x66\x48\x4e\x5a\x71\x51\x4c\x65\x72\x4a\x6d\x65\x5a\x54\x5a\x45\x4c\x4b\x59\x64\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x78\x69\x71\x53\x7a\x68\x4e\x7a\x4e\x4e\x64\x75\x48\x74\x45\x48\x6f\x57\x78\x62\x6b\x70\x73\x42\x77\x6d\x75\x6f\x4f\x71\x54\x4d\x56\x69\x49\x75\x65\x4e\x53\x41\x62\x53\x7a\x62\x73\x6c\x72\x50\x73\x76\x45\x41\x4b\x4c\x59\x41\x72\x5a\x6e\x45\x7a\x77\x4b\x45\x47\x44\x4d\x71\x59\x59\x56\x42\x70\x74\x64\x43\x50\x4d\x6a\x70\x45\x58\x4a\x51\x6a\x72\x54\x4e\x71\x79\x68\x55\x41\x59\x67\x4e\x66\x54\x6d\x7a\x67\x71\x6f\x4f\x55\x46\x56\x52\x78\x59\x4e\x52\x58\x7a\x76\x65\x54\x78\x69\x72\x42\x65\x70\x68\x61\x4d\x4d\x20\x3d\x20\x45\x69\x67\x47\x4c\x79\x74\x49\x48\x79\x4e\x66\x4f\x74\x65\x7a\x78\x54\x76\x4d\x69\x45\x44\x4b\x58\x67\x46\x4e\x41\x58\x58\x71\x46\x4f\x65\x73\x78\x6b\x6a\x46\x41\x42\x6a\x77\x73\x62\x48\x6a\x53\x6a\x6d\x47\x6d\x73\x61\x69\x54\x58\x72\x4c\x72\x51\x68\x61\x63\x4a\x69\x56\x4e\x44\x6d\x55\x77\x77\x70\x6a\x45\x63\x71\x56\x63\x56\x73\x4c\x59\x72\x66\x6c\x49\x66\x64\x72\x70\x63\x70\x46\x50\x68\x6e\x78\x65\x4a\x61\x68\x70\x79\x68\x6c\x41\x6a\x6d\x46\x56\x79\x52\x73\x6a\x68\x46\x61\x67\x76\x6a\x74\x53\x48\x6f\x79\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x27\x45\x72\x72\x6f\x72\x3a\x20\x49\x6e\x76\x61\x6c\x69\x64\x20\x49\x50\x20\x61\x64\x64\x72\x65\x73\x73\x2e\x27\x0a \x20\x20\x20\x20\x52\x75\x56\x55\x76\x4b\x4d\x69\x79\x62\x70\x4f\x68\x42\x4d\x7a\x79\x73\x50\x71\x57\x4f\x65\x48\x52\x64\x71\x6e\x4b\x4b\x78\x6c\x45\x68\x56\x56\x4b\x72\x53\x73\x55\x69\x44\x67\x44\x73\x6a\x51\x55\x76\x42\x71\x78\x52\x71\x41\x53\x78\x58\x6a\x4e\x43\x6a\x71\x78\x6d\x6a\x77\x4b\x76\x67\x50\x6c\x78\x44\x42\x7a\x4d\x66\x44\x45\x41\x74\x66\x4e\x52\x72\x62\x75\x68\x44\x6c\x54\x59\x78\x6e\x46\x56\x4c\x51\x56\x68\x75\x67\x6d\x51\x5a\x55\x58\x55\x6b\x4c\x4e\x79\x57\x44\x71\x62\x6f\x74\x59\x73\x63\x65\x50\x46\x52\x74\x20\x3d\x20\x27\x27\x0a \x20\x20\x20\x20\x66\x6f\x72\x20\x49\x76\x61\x6d\x68\x45\x53\x41\x42\x64\x41\x78\x4a\x4a\x65\x44\x4a\x71\x73\x6b\x4f\x4d\x47\x50\x50\x78\x68\x62\x7a\x4f\x4b\x77\x67\x75\x66\x75\x6d\x73\x4e\x56\x45\x6c\x4a\x61\x4d\x74\x63\x6a\x56\x47\x48\x65\x75\x4b\x52\x66\x61\x66\x64\x66\x41\x57\x6e\x51\x54\x67\x59\x4a\x4f\x4f\x41\x70\x49\x47\x61\x4b\x4e\x45\x48\x4a\x55\x50\x69\x67\x74\x52\x53\x46\x6c\x73\x45\x43\x74\x7a\x6a\x7a\x64\x48\x77\x52\x4e\x42\x68\x51\x72\x50\x46\x55\x51\x6d\x77\x55\x57\x42\x53\x44\x44\x53\x72\x51\x74\x5a\x49\x6b\x6e\x4c\x72\x44\x20\x69\x6e\x20\x4d\x66\x77\x4e\x69\x71\x47\x65\x44\x4f\x6d\x43\x70\x6f\x72\x45\x73\x75\x74\x61\x63\x59\x6b\x4c\x6e\x72\x65\x69\x45\x75\x63\x41\x74\x56\x46\x4c\x70\x6f\x68\x71\x79\x74\x69\x69\x63\x75\x67\x6d\x67\x4b\x4c\x57\x55\x65\x4a\x4e\x50\x6f\x43\x6e\x4f\x6f\x44\x65\x4e\x53\x63\x4b\x61\x4a\x72\x74\x4e\x76\x73\x79\x77\x52\x4f\x50\x6d\x66\x6b\x54\x44\x4a\x48\x63\x4d\x73\x46\x6a\x57\x73\x58\x42\x63\x49\x7a\x55\x79\x67\x6f\x4d\x78\x53\x54\x43\x57\x68\x48\x4e\x63\x5a\x53\x58\x53\x46\x6f\x6c\x65\x78\x4d\x58\x61\x64\x79\x74\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x53\x52\x52\x65\x5a\x50\x71\x56\x43\x66\x7a\x42\x6e\x49\x4c\x4e\x4a\x70\x4e\x43\x74\x4f\x61\x6d\x57\x5a\x78\x5a\x65\x71\x70\x63\x49\x43\x6f\x6a\x79\x53\x4f\x45\x50\x64\x4b\x46\x75\x70\x57\x64\x64\x64\x4c\x6b\x44\x65\x44\x58\x66\x6c\x73\x64\x72\x52\x45\x46\x6e\x45\x69\x50\x71\x43\x68\x4b\x65\x61\x76\x52\x61\x61\x6d\x4b\x6e\x52\x78\x75\x6f\x64\x6e\x73\x46\x44\x44\x75\x7a\x57\x4e\x6c\x6c\x73\x43\x74\x69\x63\x54\x67\x54\x57\x46\x51\x59\x50\x6f\x45\x4f\x6c\x79\x66\x6c\x73\x71\x63\x54\x61\x72\x6f\x42\x7a\x4f\x46\x20\x3d\x20\x27\x49\x64\x43\x6e\x41\x4a\x51\x76\x4b\x57\x49\x77\x51\x58\x49\x4f\x77\x57\x6e\x6c\x74\x50\x53\x63\x79\x4a\x4a\x7a\x62\x53\x59\x68\x64\x79\x54\x66\x49\x54\x6f\x6b\x79\x63\x49\x65\x49\x62\x54\x43\x61\x58\x70\x64\x43\x6c\x75\x47\x6f\x76\x77\x79\x48\x4f\x45\x68\x63\x52\x78\x41\x73\x51\x51\x67\x4b\x49\x78\x49\x44\x67\x59\x45\x71\x41\x76\x4f\x4b\x64\x55\x45\x71\x59\x51\x77\x78\x78\x77\x76\x42\x6e\x66\x4c\x46\x75\x66\x4f\x59\x79\x4a\x54\x44\x73\x48\x64\x51\x6b\x55\x64\x4f\x56\x77\x47\x65\x53\x57\x71\x4f\x79\x4b\x73\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x6e\x73\x4f\x74\x46\x6e\x42\x46\x71\x41\x71\x74\x52\x69\x6c\x57\x43\x6a\x47\x54\x65\x42\x72\x5a\x45\x71\x61\x44\x57\x5a\x49\x4d\x65\x53\x5a\x4a\x56\x55\x4c\x4c\x4c\x4f\x44\x69\x6c\x78\x6c\x41\x53\x6b\x66\x45\x4e\x45\x52\x65\x59\x43\x70\x43\x74\x46\x6c\x75\x4c\x69\x77\x41\x57\x42\x68\x4f\x47\x4a\x6d\x43\x7a\x6d\x55\x59\x61\x68\x4d\x49\x46\x68\x71\x59\x77\x67\x44\x55\x55\x56\x6e\x52\x76\x51\x74\x44\x4f\x6e\x50\x68\x6e\x6d\x72\x5a\x79\x67\x66\x6d\x7a\x4a\x46\x51\x44\x4f\x73\x45\x57\x61\x41\x6a\x72\x75\x58\x49\x20\x3d\x20\x27\x68\x54\x78\x52\x76\x5a\x42\x53\x75\x4c\x79\x74\x67\x43\x69\x4b\x68\x51\x64\x65\x4c\x69\x6d\x59\x42\x71\x6e\x59\x6d\x43\x4e\x4a\x6c\x4f\x62\x4e\x6b\x44\x51\x62\x58\x42\x71\x4e\x76\x58\x49\x6e\x63\x50\x70\x58\x77\x63\x6d\x48\x78\x46\x7a\x55\x41\x4e\x79\x57\x72\x42\x53\x63\x51\x58\x65\x47\x43\x7a\x79\x47\x77\x4d\x41\x69\x44\x6f\x43\x61\x4c\x64\x68\x77\x57\x57\x5a\x73\x68\x5a\x58\x71\x62\x41\x75\x71\x6a\x6a\x44\x45\x4d\x6a\x48\x6b\x41\x65\x50\x65\x4e\x73\x4d\x55\x4c\x6c\x64\x7a\x42\x7a\x6d\x4c\x63\x55\x79\x6c\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x46\x7a\x52\x7a\x5a\x47\x5a\x4b\x79\x46\x65\x78\x63\x77\x58\x4e\x4b\x4d\x4e\x77\x5a\x48\x58\x42\x72\x70\x7a\x4c\x66\x50\x69\x47\x4d\x61\x47\x4b\x78\x71\x76\x5a\x48\x7a\x43\x64\x73\x64\x58\x6c\x73\x66\x51\x64\x71\x77\x45\x61\x59\x4e\x55\x70\x66\x76\x4c\x66\x79\x72\x68\x44\x58\x47\x6b\x67\x59\x63\x77\x49\x47\x6a\x6b\x50\x58\x65\x59\x65\x57\x4a\x48\x42\x46\x77\x7a\x47\x64\x66\x49\x6b\x6f\x4e\x47\x61\x4c\x61\x4a\x47\x79\x49\x77\x50\x6e\x50\x44\x79\x79\x64\x44\x45\x66\x6c\x51\x4f\x57\x41\x61\x52\x73\x72\x4b\x62\x20\x3d\x20\x27\x77\x6a\x49\x58\x78\x4d\x5a\x4b\x54\x43\x63\x53\x5a\x49\x53\x6c\x68\x6e\x43\x72\x54\x4e\x48\x77\x6d\x65\x73\x42\x4b\x4d\x6e\x49\x4a\x44\x61\x79\x77\x69\x6f\x67\x78\x59\x41\x54\x41\x71\x65\x43\x53\x57\x79\x77\x78\x79\x74\x74\x67\x6d\x51\x4f\x51\x68\x64\x64\x65\x68\x47\x7a\x6d\x56\x46\x4b\x51\x66\x4b\x75\x76\x73\x50\x4d\x46\x6f\x59\x56\x6f\x4e\x6f\x62\x49\x68\x58\x71\x4d\x71\x53\x6b\x6f\x59\x42\x4f\x44\x65\x52\x71\x63\x76\x46\x78\x6e\x63\x57\x49\x43\x70\x74\x71\x46\x55\x55\x72\x6b\x52\x4c\x68\x61\x72\x6f\x44\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x44\x49\x6c\x43\x51\x7a\x47\x71\x4a\x75\x73\x4e\x46\x4b\x67\x6a\x65\x4d\x4a\x7a\x6c\x59\x75\x72\x62\x52\x63\x5a\x76\x63\x75\x6c\x65\x5a\x4c\x6e\x4c\x4c\x4b\x6d\x67\x71\x6e\x71\x4d\x56\x61\x75\x79\x63\x58\x73\x6d\x6d\x48\x49\x70\x52\x69\x62\x6b\x68\x68\x59\x50\x57\x53\x61\x63\x48\x7a\x77\x61\x61\x6a\x77\x4b\x47\x71\x68\x78\x72\x61\x64\x6e\x7a\x74\x4d\x49\x46\x6a\x53\x50\x4a\x6a\x4e\x67\x50\x79\x79\x79\x76\x58\x6c\x77\x6c\x70\x41\x67\x6b\x47\x43\x4c\x6d\x59\x63\x6c\x6d\x7a\x42\x52\x45\x71\x75\x75\x50\x74\x6c\x20\x3d\x20\x27\x44\x63\x4f\x6b\x49\x42\x4e\x78\x5a\x64\x65\x65\x41\x4b\x58\x69\x4e\x48\x53\x43\x52\x6d\x5a\x6f\x67\x71\x77\x44\x70\x59\x70\x75\x57\x65\x79\x47\x77\x4e\x76\x4b\x70\x68\x53\x79\x44\x4b\x54\x72\x78\x53\x71\x78\x56\x51\x6b\x44\x4b\x4e\x51\x45\x67\x53\x57\x52\x51\x46\x62\x41\x6b\x6f\x44\x79\x44\x4a\x63\x46\x69\x6b\x50\x74\x73\x41\x76\x79\x46\x50\x48\x44\x43\x59\x41\x65\x75\x76\x62\x70\x6e\x70\x67\x56\x43\x78\x43\x6a\x6e\x61\x57\x64\x4f\x51\x42\x41\x43\x51\x6f\x41\x56\x46\x62\x63\x6e\x67\x6e\x79\x75\x58\x53\x64\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x65\x41\x7a\x71\x63\x75\x50\x77\x67\x6f\x66\x44\x48\x41\x54\x65\x48\x74\x48\x44\x70\x4e\x44\x47\x47\x6e\x63\x43\x76\x70\x41\x4d\x69\x51\x4b\x6a\x49\x45\x48\x58\x68\x51\x71\x64\x70\x6f\x4d\x6c\x50\x49\x6c\x48\x49\x5a\x6c\x52\x79\x69\x6c\x79\x42\x55\x78\x44\x75\x47\x67\x5a\x64\x46\x53\x4b\x50\x79\x41\x4c\x68\x7a\x71\x43\x6a\x49\x7a\x4f\x67\x6d\x70\x70\x79\x4e\x70\x4c\x54\x72\x50\x54\x6e\x53\x4a\x4c\x4b\x57\x69\x52\x51\x61\x52\x47\x76\x43\x4c\x56\x74\x65\x48\x74\x53\x57\x46\x44\x77\x4b\x52\x48\x53\x7a\x74\x43\x20\x3d\x20\x27\x67\x50\x51\x4c\x71\x73\x49\x76\x78\x56\x48\x4a\x55\x58\x74\x62\x41\x63\x5a\x4f\x56\x41\x4a\x7a\x71\x76\x50\x72\x59\x42\x71\x7a\x70\x47\x41\x50\x6f\x54\x73\x6e\x47\x56\x70\x63\x72\x4b\x78\x68\x62\x73\x59\x50\x76\x41\x42\x52\x57\x49\x73\x74\x76\x78\x56\x65\x49\x6c\x6d\x76\x4d\x45\x4e\x47\x69\x4b\x41\x54\x67\x51\x73\x44\x52\x58\x50\x6d\x56\x7a\x72\x57\x45\x70\x59\x4e\x6f\x56\x42\x66\x62\x68\x46\x6d\x76\x4e\x6f\x57\x59\x58\x7a\x64\x67\x72\x4c\x71\x68\x75\x57\x50\x47\x75\x67\x48\x7a\x44\x77\x6a\x76\x78\x55\x66\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x52\x6d\x61\x47\x55\x63\x7a\x6e\x78\x6a\x77\x4a\x65\x77\x44\x68\x49\x57\x74\x55\x46\x45\x6c\x58\x46\x62\x6a\x64\x69\x4d\x4e\x76\x54\x59\x61\x77\x70\x66\x61\x6c\x71\x69\x70\x74\x55\x69\x48\x64\x41\x66\x78\x57\x62\x68\x4c\x43\x7a\x4b\x56\x6b\x6d\x68\x45\x4a\x42\x42\x6c\x53\x70\x6c\x53\x6b\x50\x69\x41\x78\x55\x77\x61\x4f\x72\x5a\x64\x49\x6f\x74\x77\x56\x48\x7a\x77\x5a\x6f\x45\x4d\x71\x77\x43\x58\x45\x6b\x51\x4f\x75\x7a\x53\x6d\x49\x41\x76\x48\x5a\x77\x5a\x67\x6c\x4d\x69\x5a\x77\x53\x78\x5a\x62\x54\x59\x48\x49\x20\x3d\x20\x27\x7a\x77\x44\x44\x6a\x45\x68\x55\x49\x45\x4b\x6c\x7a\x42\x73\x4e\x6a\x74\x63\x48\x4c\x48\x6b\x47\x77\x73\x57\x64\x57\x4d\x4c\x44\x5a\x65\x45\x5a\x46\x72\x66\x52\x63\x65\x41\x54\x48\x52\x68\x46\x61\x62\x6c\x6a\x45\x56\x73\x6a\x4e\x6c\x6b\x7a\x4f\x4c\x62\x65\x6b\x51\x61\x43\x57\x45\x44\x7a\x4a\x54\x6f\x4c\x41\x78\x74\x59\x52\x69\x4b\x47\x7a\x6a\x50\x4d\x65\x57\x74\x6f\x74\x54\x66\x50\x71\x4f\x74\x57\x67\x45\x78\x6d\x67\x59\x4f\x4d\x56\x47\x43\x62\x50\x68\x72\x53\x79\x79\x4c\x68\x75\x63\x55\x52\x61\x75\x6c\x49\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x46\x7a\x52\x7a\x5a\x47\x5a\x4b\x79\x46\x65\x78\x63\x77\x58\x4e\x4b\x4d\x4e\x77\x5a\x48\x58\x42\x72\x70\x7a\x4c\x66\x50\x69\x47\x4d\x61\x47\x4b\x78\x71\x76\x5a\x48\x7a\x43\x64\x73\x64\x58\x6c\x73\x66\x51\x64\x71\x77\x45\x61\x59\x4e\x55\x70\x66\x76\x4c\x66\x79\x72\x68\x44\x58\x47\x6b\x67\x59\x63\x77\x49\x47\x6a\x6b\x50\x58\x65\x59\x65\x57\x4a\x48\x42\x46\x77\x7a\x47\x64\x66\x49\x6b\x6f\x4e\x47\x61\x4c\x61\x4a\x47\x79\x49\x77\x50\x6e\x50\x44\x79\x79\x64\x44\x45\x66\x6c\x51\x4f\x57\x41\x61\x52\x73\x72\x4b\x62\x20\x3d\x3d\x20\x44\x49\x6c\x43\x51\x7a\x47\x71\x4a\x75\x73\x4e\x46\x4b\x67\x6a\x65\x4d\x4a\x7a\x6c\x59\x75\x72\x62\x52\x63\x5a\x76\x63\x75\x6c\x65\x5a\x4c\x6e\x4c\x4c\x4b\x6d\x67\x71\x6e\x71\x4d\x56\x61\x75\x79\x63\x58\x73\x6d\x6d\x48\x49\x70\x52\x69\x62\x6b\x68\x68\x59\x50\x57\x53\x61\x63\x48\x7a\x77\x61\x61\x6a\x77\x4b\x47\x71\x68\x78\x72\x61\x64\x6e\x7a\x74\x4d\x49\x46\x6a\x53\x50\x4a\x6a\x4e\x67\x50\x79\x79\x79\x76\x58\x6c\x77\x6c\x70\x41\x67\x6b\x47\x43\x4c\x6d\x59\x63\x6c\x6d\x7a\x42\x52\x45\x71\x75\x75\x50\x74\x6c\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x6f\x72\x20\x52\x6d\x61\x47\x55\x63\x7a\x6e\x78\x6a\x77\x4a\x65\x77\x44\x68\x49\x57\x74\x55\x46\x45\x6c\x58\x46\x62\x6a\x64\x69\x4d\x4e\x76\x54\x59\x61\x77\x70\x66\x61\x6c\x71\x69\x70\x74\x55\x69\x48\x64\x41\x66\x78\x57\x62\x68\x4c\x43\x7a\x4b\x56\x6b\x6d\x68\x45\x4a\x42\x42\x6c\x53\x70\x6c\x53\x6b\x50\x69\x41\x78\x55\x77\x61\x4f\x72\x5a\x64\x49\x6f\x74\x77\x56\x48\x7a\x77\x5a\x6f\x45\x4d\x71\x77\x43\x58\x45\x6b\x51\x4f\x75\x7a\x53\x6d\x49\x41\x76\x48\x5a\x77\x5a\x67\x6c\x4d\x69\x5a\x77\x53\x78\x5a\x62\x54\x59\x48\x49\x20\x69\x6e\x20\x65\x41\x7a\x71\x63\x75\x50\x77\x67\x6f\x66\x44\x48\x41\x54\x65\x48\x74\x48\x44\x70\x4e\x44\x47\x47\x6e\x63\x43\x76\x70\x41\x4d\x69\x51\x4b\x6a\x49\x45\x48\x58\x68\x51\x71\x64\x70\x6f\x4d\x6c\x50\x49\x6c\x48\x49\x5a\x6c\x52\x79\x69\x6c\x79\x42\x55\x78\x44\x75\x47\x67\x5a\x64\x46\x53\x4b\x50\x79\x41\x4c\x68\x7a\x71\x43\x6a\x49\x7a\x4f\x67\x6d\x70\x70\x79\x4e\x70\x4c\x54\x72\x50\x54\x6e\x53\x4a\x4c\x4b\x57\x69\x52\x51\x61\x52\x47\x76\x43\x4c\x56\x74\x65\x48\x74\x53\x57\x46\x44\x77\x4b\x52\x48\x53\x7a\x74\x43\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x52\x6d\x61\x47\x55\x63\x7a\x6e\x78\x6a\x77\x4a\x65\x77\x44\x68\x49\x57\x74\x55\x46\x45\x6c\x58\x46\x62\x6a\x64\x69\x4d\x4e\x76\x54\x59\x61\x77\x70\x66\x61\x6c\x71\x69\x70\x74\x55\x69\x48\x64\x41\x66\x78\x57\x62\x68\x4c\x43\x7a\x4b\x56\x6b\x6d\x68\x45\x4a\x42\x42\x6c\x53\x70\x6c\x53\x6b\x50\x69\x41\x78\x55\x77\x61\x4f\x72\x5a\x64\x49\x6f\x74\x77\x56\x48\x7a\x77\x5a\x6f\x45\x4d\x71\x77\x43\x58\x45\x6b\x51\x4f\x75\x7a\x53\x6d\x49\x41\x76\x48\x5a\x77\x5a\x67\x6c\x4d\x69\x5a\x77\x53\x78\x5a\x62\x54\x59\x48\x49\x20\x3d\x3d\x20\x44\x49\x6c\x43\x51\x7a\x47\x71\x4a\x75\x73\x4e\x46\x4b\x67\x6a\x65\x4d\x4a\x7a\x6c\x59\x75\x72\x62\x52\x63\x5a\x76\x63\x75\x6c\x65\x5a\x4c\x6e\x4c\x4c\x4b\x6d\x67\x71\x6e\x71\x4d\x56\x61\x75\x79\x63\x58\x73\x6d\x6d\x48\x49\x70\x52\x69\x62\x6b\x68\x68\x59\x50\x57\x53\x61\x63\x48\x7a\x77\x61\x61\x6a\x77\x4b\x47\x71\x68\x78\x72\x61\x64\x6e\x7a\x74\x4d\x49\x46\x6a\x53\x50\x4a\x6a\x4e\x67\x50\x79\x79\x79\x76\x58\x6c\x77\x6c\x70\x41\x67\x6b\x47\x43\x4c\x6d\x59\x63\x6c\x6d\x7a\x42\x52\x45\x71\x75\x75\x50\x74\x6c\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x41\x7a\x71\x63\x75\x50\x77\x67\x6f\x66\x44\x48\x41\x54\x65\x48\x74\x48\x44\x70\x4e\x44\x47\x47\x6e\x63\x43\x76\x70\x41\x4d\x69\x51\x4b\x6a\x49\x45\x48\x58\x68\x51\x71\x64\x70\x6f\x4d\x6c\x50\x49\x6c\x48\x49\x5a\x6c\x52\x79\x69\x6c\x79\x42\x55\x78\x44\x75\x47\x67\x5a\x64\x46\x53\x4b\x50\x79\x41\x4c\x68\x7a\x71\x43\x6a\x49\x7a\x4f\x67\x6d\x70\x70\x79\x4e\x70\x4c\x54\x72\x50\x54\x6e\x53\x4a\x4c\x4b\x57\x69\x52\x51\x61\x52\x47\x76\x43\x4c\x56\x74\x65\x48\x74\x53\x57\x46\x44\x77\x4b\x52\x48\x53\x7a\x74\x43\x20\x3d\x20\x53\x52\x52\x65\x5a\x50\x71\x56\x43\x66\x7a\x42\x6e\x49\x4c\x4e\x4a\x70\x4e\x43\x74\x4f\x61\x6d\x57\x5a\x78\x5a\x65\x71\x70\x63\x49\x43\x6f\x6a\x79\x53\x4f\x45\x50\x64\x4b\x46\x75\x70\x57\x64\x64\x64\x4c\x6b\x44\x65\x44\x58\x66\x6c\x73\x64\x72\x52\x45\x46\x6e\x45\x69\x50\x71\x43\x68\x4b\x65\x61\x76\x52\x61\x61\x6d\x4b\x6e\x52\x78\x75\x6f\x64\x6e\x73\x46\x44\x44\x75\x7a\x57\x4e\x6c\x6c\x73\x43\x74\x69\x63\x54\x67\x54\x57\x46\x51\x59\x50\x6f\x45\x4f\x6c\x79\x66\x6c\x73\x71\x63\x54\x61\x72\x6f\x42\x7a\x4f\x46\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x65\x6c\x73\x65\x3a\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x44\x49\x6c\x43\x51\x7a\x47\x71\x4a\x75\x73\x4e\x46\x4b\x67\x6a\x65\x4d\x4a\x7a\x6c\x59\x75\x72\x62\x52\x63\x5a\x76\x63\x75\x6c\x65\x5a\x4c\x6e\x4c\x4c\x4b\x6d\x67\x71\x6e\x71\x4d\x56\x61\x75\x79\x63\x58\x73\x6d\x6d\x48\x49\x70\x52\x69\x62\x6b\x68\x68\x59\x50\x57\x53\x61\x63\x48\x7a\x77\x61\x61\x6a\x77\x4b\x47\x71\x68\x78\x72\x61\x64\x6e\x7a\x74\x4d\x49\x46\x6a\x53\x50\x4a\x6a\x4e\x67\x50\x79\x79\x79\x76\x58\x6c\x77\x6c\x70\x41\x67\x6b\x47\x43\x4c\x6d\x59\x63\x6c\x6d\x7a\x42\x52\x45\x71\x75\x75\x50\x74\x6c\x20\x3d\x20\x6e\x73\x4f\x74\x46\x6e\x42\x46\x71\x41\x71\x74\x52\x69\x6c\x57\x43\x6a\x47\x54\x65\x42\x72\x5a\x45\x71\x61\x44\x57\x5a\x49\x4d\x65\x53\x5a\x4a\x56\x55\x4c\x4c\x4c\x4f\x44\x69\x6c\x78\x6c\x41\x53\x6b\x66\x45\x4e\x45\x52\x65\x59\x43\x70\x43\x74\x46\x6c\x75\x4c\x69\x77\x41\x57\x42\x68\x4f\x47\x4a\x6d\x43\x7a\x6d\x55\x59\x61\x68\x4d\x49\x46\x68\x71\x59\x77\x67\x44\x55\x55\x56\x6e\x52\x76\x51\x74\x44\x4f\x6e\x50\x68\x6e\x6d\x72\x5a\x79\x67\x66\x6d\x7a\x4a\x46\x51\x44\x4f\x73\x45\x57\x61\x41\x6a\x72\x75\x58\x49\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x4d\x5a\x42\x4d\x4a\x42\x55\x4d\x6a\x4d\x61\x59\x78\x61\x6b\x4b\x57\x4e\x69\x41\x79\x61\x61\x69\x48\x47\x75\x59\x74\x4f\x45\x68\x73\x48\x74\x49\x57\x6e\x53\x43\x79\x66\x46\x72\x4f\x4e\x55\x77\x59\x58\x61\x42\x4d\x7a\x4b\x72\x78\x6a\x66\x4b\x44\x59\x6c\x77\x6c\x53\x6d\x4c\x4d\x51\x77\x75\x48\x4e\x75\x7a\x4f\x56\x47\x4a\x58\x67\x41\x42\x4d\x68\x41\x42\x79\x63\x47\x49\x4d\x72\x64\x49\x68\x4d\x4f\x57\x62\x61\x79\x72\x67\x69\x58\x74\x78\x75\x71\x6a\x62\x62\x43\x4f\x64\x78\x6d\x68\x56\x79\x78\x45\x49\x4d\x54\x57\x20\x3d\x20\x73\x6f\x63\x6b\x65\x74\x2e\x73\x6f\x63\x6b\x65\x74\x28\x73\x6f\x63\x6b\x65\x74\x2e\x41\x46\x5f\x49\x4e\x45\x54\x2c\x20\x73\x6f\x63\x6b\x65\x74\x2e\x53\x4f\x43\x4b\x5f\x53\x54\x52\x45\x41\x4d\x29\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x5a\x6b\x6c\x57\x4f\x66\x47\x68\x50\x53\x6c\x79\x6a\x6a\x69\x44\x55\x76\x64\x72\x75\x57\x47\x69\x66\x54\x68\x48\x50\x58\x54\x4e\x67\x46\x73\x58\x51\x47\x67\x6b\x4e\x75\x5a\x42\x55\x6f\x75\x6d\x79\x57\x66\x74\x73\x46\x63\x59\x64\x64\x59\x59\x48\x71\x51\x5a\x55\x48\x6f\x73\x6a\x74\x45\x4b\x72\x74\x54\x68\x62\x64\x59\x4e\x67\x6a\x56\x6b\x4c\x54\x6f\x50\x47\x67\x57\x5a\x73\x70\x67\x71\x68\x6f\x64\x4b\x44\x7a\x69\x47\x43\x58\x42\x72\x6f\x4e\x7a\x50\x4e\x76\x42\x52\x42\x5a\x75\x77\x58\x61\x63\x61\x48\x6a\x4a\x70\x20\x3d\x20\x4d\x5a\x42\x4d\x4a\x42\x55\x4d\x6a\x4d\x61\x59\x78\x61\x6b\x4b\x57\x4e\x69\x41\x79\x61\x61\x69\x48\x47\x75\x59\x74\x4f\x45\x68\x73\x48\x74\x49\x57\x6e\x53\x43\x79\x66\x46\x72\x4f\x4e\x55\x77\x59\x58\x61\x42\x4d\x7a\x4b\x72\x78\x6a\x66\x4b\x44\x59\x6c\x77\x6c\x53\x6d\x4c\x4d\x51\x77\x75\x48\x4e\x75\x7a\x4f\x56\x47\x4a\x58\x67\x41\x42\x4d\x68\x41\x42\x79\x63\x47\x49\x4d\x72\x64\x49\x68\x4d\x4f\x57\x62\x61\x79\x72\x67\x69\x58\x74\x78\x75\x71\x6a\x62\x62\x43\x4f\x64\x78\x6d\x68\x56\x79\x78\x45\x49\x4d\x54\x57\x2e\x63\x6f\x6e\x6e\x65\x63\x74\x5f\x65\x78\x28\x28\x69\x70\x2c\x20\x49\x76\x61\x6d\x68\x45\x53\x41\x42\x64\x41\x78\x4a\x4a\x65\x44\x4a\x71\x73\x6b\x4f\x4d\x47\x50\x50\x78\x68\x62\x7a\x4f\x4b\x77\x67\x75\x66\x75\x6d\x73\x4e\x56\x45\x6c\x4a\x61\x4d\x74\x63\x6a\x56\x47\x48\x65\x75\x4b\x52\x66\x61\x66\x64\x66\x41\x57\x6e\x51\x54\x67\x59\x4a\x4f\x4f\x41\x70\x49\x47\x61\x4b\x4e\x45\x48\x4a\x55\x50\x69\x67\x74\x52\x53\x46\x6c\x73\x45\x43\x74\x7a\x6a\x7a\x64\x48\x77\x52\x4e\x42\x68\x51\x72\x50\x46\x55\x51\x6d\x77\x55\x57\x42\x53\x44\x44\x53\x72\x51\x74\x5a\x49\x6b\x6e\x4c\x72\x44\x29\x29\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x73\x6f\x63\x6b\x65\x74\x2e\x73\x65\x74\x64\x65\x66\x61\x75\x6c\x74\x74\x69\x6d\x65\x6f\x75\x74\x28\x30\x2e\x35\x29\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x42\x41\x59\x70\x6e\x46\x68\x6d\x79\x63\x78\x5a\x54\x45\x68\x52\x72\x44\x65\x64\x53\x62\x72\x4c\x6e\x56\x62\x56\x67\x79\x47\x45\x6a\x4d\x4a\x6c\x44\x76\x48\x4e\x66\x74\x54\x46\x4e\x57\x4e\x4c\x72\x55\x46\x4e\x71\x47\x79\x72\x58\x6e\x46\x75\x64\x6d\x69\x57\x51\x4a\x66\x67\x45\x67\x43\x70\x73\x48\x49\x7a\x6b\x4b\x76\x73\x61\x51\x64\x49\x49\x76\x5a\x48\x48\x67\x71\x48\x54\x4f\x4f\x71\x6b\x47\x78\x51\x47\x71\x7a\x41\x52\x6c\x43\x57\x64\x43\x4a\x6a\x59\x70\x4c\x44\x59\x52\x58\x6f\x49\x4c\x71\x6c\x59\x51\x4d\x6d\x20\x3d\x20\x27\x6f\x70\x65\x6e\x27\x20\x69\x66\x20\x6e\x6f\x74\x20\x5a\x6b\x6c\x57\x4f\x66\x47\x68\x50\x53\x6c\x79\x6a\x6a\x69\x44\x55\x76\x64\x72\x75\x57\x47\x69\x66\x54\x68\x48\x50\x58\x54\x4e\x67\x46\x73\x58\x51\x47\x67\x6b\x4e\x75\x5a\x42\x55\x6f\x75\x6d\x79\x57\x66\x74\x73\x46\x63\x59\x64\x64\x59\x59\x48\x71\x51\x5a\x55\x48\x6f\x73\x6a\x74\x45\x4b\x72\x74\x54\x68\x62\x64\x59\x4e\x67\x6a\x56\x6b\x4c\x54\x6f\x50\x47\x67\x57\x5a\x73\x70\x67\x71\x68\x6f\x64\x4b\x44\x7a\x69\x47\x43\x58\x42\x72\x6f\x4e\x7a\x50\x4e\x76\x42\x52\x42\x5a\x75\x77\x58\x61\x63\x61\x48\x6a\x4a\x70\x20\x65\x6c\x73\x65\x20\x27\x63\x6c\x6f\x73\x65\x64\x27\x0a \x20\x20\x20\x20\x20\x20\x20\x20\x52\x75\x56\x55\x76\x4b\x4d\x69\x79\x62\x70\x4f\x68\x42\x4d\x7a\x79\x73\x50\x71\x57\x4f\x65\x48\x52\x64\x71\x6e\x4b\x4b\x78\x6c\x45\x68\x56\x56\x4b\x72\x53\x73\x55\x69\x44\x67\x44\x73\x6a\x51\x55\x76\x42\x71\x78\x52\x71\x41\x53\x78\x58\x6a\x4e\x43\x6a\x71\x78\x6d\x6a\x77\x4b\x76\x67\x50\x6c\x78\x44\x42\x7a\x4d\x66\x44\x45\x41\x74\x66\x4e\x52\x72\x62\x75\x68\x44\x6c\x54\x59\x78\x6e\x46\x56\x4c\x51\x56\x68\x75\x67\x6d\x51\x5a\x55\x58\x55\x6b\x4c\x4e\x79\x57\x44\x71\x62\x6f\x74\x59\x73\x63\x65\x50\x46\x52\x74\x20\x2b\x3d\x20\x27\x7b\x3a\x3e\x35\x7d\x2f\x74\x63\x70\x20\x7b\x3a\x3e\x37\x7d\x5c\x6e\x27\x2e\x66\x6f\x72\x6d\x61\x74\x28\x49\x76\x61\x6d\x68\x45\x53\x41\x42\x64\x41\x78\x4a\x4a\x65\x44\x4a\x71\x73\x6b\x4f\x4d\x47\x50\x50\x78\x68\x62\x7a\x4f\x4b\x77\x67\x75\x66\x75\x6d\x73\x4e\x56\x45\x6c\x4a\x61\x4d\x74\x63\x6a\x56\x47\x48\x65\x75\x4b\x52\x66\x61\x66\x64\x66\x41\x57\x6e\x51\x54\x67\x59\x4a\x4f\x4f\x41\x70\x49\x47\x61\x4b\x4e\x45\x48\x4a\x55\x50\x69\x67\x74\x52\x53\x46\x6c\x73\x45\x43\x74\x7a\x6a\x7a\x64\x48\x77\x52\x4e\x42\x68\x51\x72\x50\x46\x55\x51\x6d\x77\x55\x57\x42\x53\x44\x44\x53\x72\x51\x74\x5a\x49\x6b\x6e\x4c\x72\x44\x2c\x20\x42\x41\x59\x70\x6e\x46\x68\x6d\x79\x63\x78\x5a\x54\x45\x68\x52\x72\x44\x65\x64\x53\x62\x72\x4c\x6e\x56\x62\x56\x67\x79\x47\x45\x6a\x4d\x4a\x6c\x44\x76\x48\x4e\x66\x74\x54\x46\x4e\x57\x4e\x4c\x72\x55\x46\x4e\x71\x47\x79\x72\x58\x6e\x46\x75\x64\x6d\x69\x57\x51\x4a\x66\x67\x45\x67\x43\x70\x73\x48\x49\x7a\x6b\x4b\x76\x73\x61\x51\x64\x49\x49\x76\x5a\x48\x48\x67\x71\x48\x54\x4f\x4f\x71\x6b\x47\x78\x51\x47\x71\x7a\x41\x52\x6c\x43\x57\x64\x43\x4a\x6a\x59\x70\x4c\x44\x59\x52\x58\x6f\x49\x4c\x71\x6c\x59\x51\x4d\x6d\x29\x0a \x20\x20\x20\x20\x72\x65\x74\x75\x72\x6e\x20\x52\x75\x56\x55\x76\x4b\x4d\x69\x79\x62\x70\x4f\x68\x42\x4d\x7a\x79\x73\x50\x71\x57\x4f\x65\x48\x52\x64\x71\x6e\x4b\x4b\x78\x6c\x45\x68\x56\x56\x4b\x72\x53\x73\x55\x69\x44\x67\x44\x73\x6a\x51\x55\x76\x42\x71\x78\x52\x71\x41\x53\x78\x58\x6a\x4e\x43\x6a\x71\x78\x6d\x6a\x77\x4b\x76\x67\x50\x6c\x78\x44\x42\x7a\x4d\x66\x44\x45\x41\x74\x66\x4e\x52\x72\x62\x75\x68\x44\x6c\x54\x59\x78\x6e\x46\x56\x4c\x51\x56\x68\x75\x67\x6d\x51\x5a\x55\x58\x55\x6b\x4c\x4e\x79\x57\x44\x71\x62\x6f\x74\x59\x73\x63\x65\x50\x46\x52\x74\x2e\x72\x73\x74\x72\x69\x70\x28\x29\x0a """ exec(RzGzlaAKgiFHPKlYeHXmGWwFVJjGNpoZSQuIfdBOahYmqFlTsjWrJPyjHyzQRiYNeEgGaFEbAAimqKievxWvAPTYadzGhGvKhqOXRmVbQMZxterfvxwCcwNSzxauqJUV)
824.4
1,708
0.750283
12,287
49,464
3.020428
0.006999
0.062406
0.082453
0.095064
0.759862
0.753072
0.750243
0.749515
0.746928
0.745069
0
0.431636
0.001193
49,464
59
1,709
838.372881
0.319543
0
0
0.067797
0
0.915254
0.994521
0.993369
0
1
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
1
0
0
0
1
1
1
0
0
0
0
1
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
13
9c2c1736eec23e17249f271cf1cb07d2e8d1fc15
4,066
py
Python
tests/teacher_class_test.py
MartinVardanyan/My-first-project-on-GitHub
0bfef25b691362f797b990758cc0fd342b72e891
[ "Apache-2.0" ]
null
null
null
tests/teacher_class_test.py
MartinVardanyan/My-first-project-on-GitHub
0bfef25b691362f797b990758cc0fd342b72e891
[ "Apache-2.0" ]
null
null
null
tests/teacher_class_test.py
MartinVardanyan/My-first-project-on-GitHub
0bfef25b691362f797b990758cc0fd342b72e891
[ "Apache-2.0" ]
null
null
null
from teacher_class import Teacher from money_class import Money def test_init_repr_teacher(name, surname, age, gender, university, faculty, discipline, experience, amount, currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) print(obj) #test_init_repr_teacher("Martin", 'Vardanyan', 23, 'Male', "RAU", "Economic", "MArketing", 5, 700, 'rub') def test_set_university(name, surname, age, gender, university, faculty, discipline, experience, amount, currency, set_university): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) obj.set_university(set_university) print(obj) def test_set_faculty(name, surname, age, gender, university, faculty, discipline, experience, amount, currency, set_faculty): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) obj.set_faculty(set_faculty) print(obj) def test_set_discipline(name, surname, age, gender, university, faculty, discipline, experience, amount, currency, set_discipline): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) obj.set_discipline(set_discipline) print(obj) def test_set_experience(name, surname, age, gender, university, faculty, discipline, experience, amount, currency, set_experience): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) obj.set_experience(set_experience) print(obj) def test_set_salary(name, surname, age, gender, university, faculty, discipline, experience, amount, currency, amount2, currency2): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) m1 = Money(amount2, currency2) obj.set_salary(m1) print(obj) #test_set_salary("Martin", 'Vardanyan', 23, 'Male', "RAU", "Economic", "MArketing", 5, 700, 'rub', 1000, 'usd') def test_set_currency(name, surname, age, gender, university, faculty, discipline, experience, amount, currency, set_currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) obj.set_currency(set_currency) print(obj) def test_get_university(name, surname, age, gender, university, faculty, discipline, experience, amount, currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) print(obj.get_university()) def test_get_faculty(name, surname, age, gender, university, faculty, discipline, experience, amount, currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) print(obj.get_faculty()) def test_get_experience(name, surname, age, gender, university, faculty, discipline, experience, amount, currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) print(obj.get_experience()) def test_get_discipline(name, surname, age, gender, university, faculty, discipline, experience, amount, currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) print(obj.get_discipline()) def test_get_salary(name, surname, age, gender, university, faculty, discipline, experience, amount, currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) print(obj.get_salary()) def test_get_currency(name, surname, age, gender, university, faculty, discipline, experience, amount, currency): m = Money(amount, currency) obj = Teacher(name, surname, age, gender, university, faculty, discipline, experience, m) print(obj.get_currency())
44.681319
131
0.732169
500
4,066
5.842
0.08
0.097912
0.124615
0.178021
0.845943
0.821294
0.821294
0.821294
0.821294
0.818898
0
0.006364
0.149779
4,066
90
132
45.177778
0.838588
0.052632
0
0.540984
0
0
0
0
0
0
0
0
0
1
0.213115
false
0
0.032787
0
0.245902
0.213115
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
9c72b2f8ab153835740a30c07024dee8236c0010
3,862
py
Python
decoders.py
MB-29/optimal-textures
03a6bd93f7f2f99e1b07eb12a58d7467da02dad5
[ "MIT" ]
18
2021-02-04T13:16:38.000Z
2022-02-23T22:42:05.000Z
decoders.py
MB-29/optimal-textures
03a6bd93f7f2f99e1b07eb12a58d7467da02dad5
[ "MIT" ]
3
2021-02-24T03:19:32.000Z
2022-02-25T12:03:43.000Z
decoders.py
MB-29/optimal-textures
03a6bd93f7f2f99e1b07eb12a58d7467da02dad5
[ "MIT" ]
3
2021-02-05T17:18:51.000Z
2021-11-18T13:35:34.000Z
import torch import torch.nn as nn """Decoder models. Layer-specific, editable information is stored in the dictionary observed_layers at the bottom of the file. """ feature_invertor_conv1_1 = nn.Sequential( # Sequential, nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 3, (3, 3)), ) feature_invertor_conv2_1 = nn.Sequential( # Sequential, nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(128, 64, (3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 64, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 3, (3, 3)), ) feature_invertor_conv3_1 = nn.Sequential( # Sequential, nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256, 128, (3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(128, 128, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(128, 64, (3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 64, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 3, (3, 3)), ) feature_invertor_conv4_1 = nn.Sequential( # Sequential, nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(512, 256, (3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256, 256, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256, 256, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256, 256, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256, 128, (3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(128, 128, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(128, 64, (3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 64, (3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64, 3, (3, 3)), ) feature_invertor_conv5_1 = nn.Sequential( # Sequential, nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(512,512,(3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(512,512,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(512,512,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(512,512,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(512,256,(3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256,256,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256,256,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256,256,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(256,128,(3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(128,128,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(128,64,(3, 3)), nn.ReLU(), nn.UpsamplingNearest2d(scale_factor=2), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64,64,(3, 3)), nn.ReLU(), nn.ReflectionPad2d((1, 1, 1, 1)), nn.Conv2d(64,3,(3, 3)), ) observed_layers = { 'Relu5_1': { 'index': 29, 'decoder': feature_invertor_conv5_1, 'n_slices': 10, 'n_epochs': 500 }, 'Relu4_1': { 'index': 20, 'decoder': feature_invertor_conv4_1, 'n_slices': 10, 'n_epochs': 500 }, 'Relu3_1': { 'index': 11, 'decoder': feature_invertor_conv3_1, 'n_slices': 10, 'n_epochs': 500 }, 'Relu2_1': { 'index': 6, 'decoder': feature_invertor_conv2_1, 'n_slices': 10, 'n_epochs': 500 }, 'Relu1_1': { 'index': 1, 'decoder': feature_invertor_conv1_1, 'n_slices': 10, 'n_epochs': 500 } }
24.916129
65
0.600725
612
3,862
3.697712
0.093137
0.082192
0.082192
0.260274
0.831198
0.831198
0.831198
0.787008
0.787008
0.787008
0
0.154088
0.176592
3,862
154
66
25.077922
0.557547
0.015277
0
0.760563
0
0
0.047736
0
0
0
0
0
0
1
0
false
0
0.014085
0
0.014085
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
92c29c0626a904a941b3ea11007c71fdb9129425
452
py
Python
packages/cardpay-reward-api/cardpay_reward_api/config.py
ef4/cardstack
80e3866b2551102d295ab4d66824d2a84d5cc704
[ "MIT" ]
null
null
null
packages/cardpay-reward-api/cardpay_reward_api/config.py
ef4/cardstack
80e3866b2551102d295ab4d66824d2a84d5cc704
[ "MIT" ]
null
null
null
packages/cardpay-reward-api/cardpay_reward_api/config.py
ef4/cardstack
80e3866b2551102d295ab4d66824d2a84d5cc704
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 config = { "staging": { "archived_reward_programs": [ "0x0A4c62c8616342Fc3C5390c4e55aD26DeE694b0F", "0x64D65d17B26312c0a2532E3cfB0a681A92eEf89d", "0x73F92405b438D85ee46539a8FaDbBCa04C155F81", "0x954A9C27bC398B4A8f6F543b13eea833d0e73308", "0xd40c4b61D0B08548Dd1E2b79c1E8Ad98f15c65d8", ] }, "production": {"archived_reward_programs": []}, }
28.25
57
0.65708
18
452
16.277778
0.833333
0.095563
0.150171
0
0
0
0
0
0
0
0
0.383041
0.243363
452
15
58
30.133333
0.473684
0.04646
0
0
0
0
0.639535
0.6
0
0
0.488372
0
0
1
0
false
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
null
0
1
0
0
0
0
0
0
0
0
0
0
0
7
92c934417c57083764ce7ff8e59896093a0f6065
39,191
py
Python
tests/test_remote_metadata.py
pmav99/OWSLib
414375413c9e2bab33a2d09608ab209875ce6daf
[ "BSD-3-Clause" ]
218
2015-01-09T12:55:09.000Z
2022-03-29T12:22:54.000Z
tests/test_remote_metadata.py
pmav99/OWSLib
414375413c9e2bab33a2d09608ab209875ce6daf
[ "BSD-3-Clause" ]
512
2015-01-01T09:52:58.000Z
2022-03-30T11:57:07.000Z
tests/test_remote_metadata.py
pmav99/OWSLib
414375413c9e2bab33a2d09608ab209875ce6daf
[ "BSD-3-Clause" ]
218
2015-01-01T09:44:06.000Z
2022-03-31T14:09:13.000Z
import pytest import owslib from owslib.etree import etree from owslib.wfs import WebFeatureService from owslib.wms import WebMapService from tests.utils import service_ok WMS_SERVICE_URL = 'https://www.dov.vlaanderen.be/geoserver/gw_meetnetten/' \ 'wms?request=GetCapabilities' WFS_SERVICE_URL = 'https://www.dov.vlaanderen.be/geoserver/gw_meetnetten/' \ 'wfs?request=GetCapabilities' @pytest.fixture def mp_wfs_100_nometadata(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WFS version 1.0.0, not containing MetadataURLs. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wfs_dov_getcapabilities_100_nometadata.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.feature.common.WFSCapabilitiesReader, 'read', read) @pytest.fixture def mp_wfs_110(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WFS version 1.1.0. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wfs_dov_getcapabilities_110.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.feature.common.WFSCapabilitiesReader, 'read', read) @pytest.fixture def mp_wfs_110_nometadata(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WFS version 1.1.0, not containing MetadataURLs. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wfs_dov_getcapabilities_110_nometadata.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.feature.common.WFSCapabilitiesReader, 'read', read) @pytest.fixture def mp_wfs_200(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WFS version 2.0.0. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wfs_dov_getcapabilities_200.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.feature.common.WFSCapabilitiesReader, 'read', read) @pytest.fixture def mp_wfs_200_nometadata(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WFS version 2.0.0, not containing MetadataURLs. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wfs_dov_getcapabilities_200_nometadata.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.feature.common.WFSCapabilitiesReader, 'read', read) @pytest.fixture def mp_wms_111_nometadata(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WMS version 1.1.1, not containing MetadataURLs. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wms_dov_getcapabilities_111_nometadata.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.map.common.WMSCapabilitiesReader, 'read', read) @pytest.fixture def mp_wms_130(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WMS version 1.3.0. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wms_dov_getcapabilities_130.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.map.common.WMSCapabilitiesReader, 'read', read) @pytest.fixture def mp_wms_130_nometadata(monkeypatch): """Monkeypatch the call to the remote GetCapabilities request of WMS version 1.3.0, not containing MetadataURLs. Parameters ---------- monkeypatch : pytest.fixture PyTest monkeypatch fixture. """ def read(*args, **kwargs): with open('tests/resources/wms_dov_getcapabilities_130_nometadata' '.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr( owslib.map.common.WMSCapabilitiesReader, 'read', read) @pytest.fixture def mp_remote_md(monkeypatch): def openURL(*args, **kwargs): with open('tests/resources/csw_dov_getrecordbyid.xml', 'r') as f: data = f.read() if type(data) is not bytes: data = data.encode('utf-8') data = etree.fromstring(data) return data monkeypatch.setattr(owslib.util, 'openURL', openURL) class TestOffline(object): def test_wfs_100_noremotemd_parse_all(self, mp_wfs_100_nometadata): """Test the remote metadata parsing for WFS 1.0.0. Tests parsing the remote metadata for all layers. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_100_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.0.0', parse_remote_metadata=True) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_100_noremotemd_parse_single(self, mp_wfs_100_nometadata): """Test the remote metadata parsing for WFS 1.0.0. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_100_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.0.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_100_noremotemd_parse_none(self, mp_wfs_100_nometadata): """Test the remote metadata parsing for WFS 1.0.0. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wfs_100_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.0.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_110_noremotemd_parse_all(self, mp_wfs_110_nometadata): """Test the remote metadata parsing for WFS 1.1.0. Tests parsing the remote metadata for all layers. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_110_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.1.0', parse_remote_metadata=True) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_110_noremotemd_parse_single(self, mp_wfs_110_nometadata): """Test the remote metadata parsing for WFS 1.1.0. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_110_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.1.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_110_noremotemd_parse_none(self, mp_wfs_110_nometadata): """Test the remote metadata parsing for WFS 1.1.0. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wfs_110_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.1.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_110_remotemd_parse_all(self, mp_wfs_110, mp_remote_md): """Test the remote metadata parsing for WFS 1.1.0. Tests parsing the remote metadata for all layers. Test whether the method is available and returns remote metadata if MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_110 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. mp_remote_md : pytest.fixture Monkeypatch the call to the remote metadata. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.1.0', parse_remote_metadata=True) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 1 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata def test_wfs_110_remotemd_parse_single(self, mp_wfs_110, mp_remote_md): """Test the remote metadata parsing for WFS 1.1.0. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns remote metadata if MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_110 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. mp_remote_md : pytest.fixture Monkeypatch the call to the remote metadata. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.1.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 1 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata def test_wfs_110_remotemd_parse_none(self, mp_wfs_110): """Test the remote metadata parsing for WFS 1.1.0. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wfs_110 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='1.1.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_200_noremotemd_parse_all(self, mp_wfs_200_nometadata): """Test the remote metadata parsing for WFS 2.0.0. Tests parsing the remote metadata for all layers. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_200_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='2.0.0', parse_remote_metadata=True) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_200_noremotemd_parse_single(self, mp_wfs_200_nometadata): """Test the remote metadata parsing for WFS 2.0.0. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_200_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='2.0.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_200_noremotemd_parse_none(self, mp_wfs_200_nometadata): """Test the remote metadata parsing for WFS 2.0.0. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wfs_200_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='2.0.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wfs_200_remotemd_parse_all(self, mp_wfs_200, mp_remote_md): """Test the remote metadata parsing for WFS 2.0.0. Tests parsing the remote metadata for all layers. Test whether the method is available and returns remote metadata if MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_200 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. mp_remote_md : pytest.fixture Monkeypatch the call to the remote metadata. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='2.0.0', parse_remote_metadata=True) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 1 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata def test_wfs_200_remotemd_parse_single(self, mp_wfs_200, mp_remote_md): """Test the remote metadata parsing for WFS 2.0.0. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns remote metadata if MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wfs_200 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. mp_remote_md : pytest.fixture Monkeypatch the call to the remote metadata. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='2.0.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 1 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata def test_wfs_200_remotemd_parse_none(self, mp_wfs_200): """Test the remote metadata parsing for WFS 2.0.0. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wfs_200 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wfs = WebFeatureService(url='http://localhost/not_applicable', version='2.0.0', parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wms_111_noremotemd_parse_all(self, mp_wms_111_nometadata): """Test the remote metadata parsing for WMS 1.1.1. Tests parsing the remote metadata for all layers. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wms_111_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.1.1', parse_remote_metadata=True) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wms_111_noremotemd_parse_single(self, mp_wms_111_nometadata): """Test the remote metadata parsing for WMS 1.1.1. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wms_111_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.1.1', parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wms_111_noremotemd_parse_none(self, mp_wms_111_nometadata): """Test the remote metadata parsing for WMS 1.1.1. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wms_111_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.1.1', parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wms_130_remotemd_parse_all(self, mp_wms_130): """Test the remote metadata parsing for WMS 1.3.0. Tests parsing the remote metadata for all layers. Test whether the method is available and returns remote metadata if MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wms_130 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.3.0', parse_remote_metadata=True) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 1 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata def test_wms_130_remotemd_parse_single(self, mp_wms_130): """Test the remote metadata parsing for WMS 1.3.0. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns remote metadata if MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wms_130 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.3.0', parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 1 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata def test_wms_130_remotemd_parse_none(self, mp_wms_130): """Test the remote metadata parsing for WMS 1.3.0. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wms_130 : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.3.0', parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wms_130_noremotemd_parse_all(self, mp_wms_130_nometadata): """Test the remote metadata parsing for WMS 1.3.0. Tests parsing the remote metadata for all layers. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wms_130_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.3.0', parse_remote_metadata=True) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wms_130_noremotemd_parse_single(self, mp_wms_130_nometadata): """Test the remote metadata parsing for WMS 1.3.0. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. Parameters ---------- mp_wms_130_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.3.0', parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 def test_wms_130_noremotemd_parse_none(self, mp_wms_130_nometadata): """Test the remote metadata parsing for WMS 1.3.0. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. Parameters ---------- mp_wms_130_nometadata : pytest.fixture Monkeypatch the call to the remote GetCapabilities request. """ wms = WebMapService(url='http://localhost/not_applicable', version='1.3.0', parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 class TestOnline(object): @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WFS_SERVICE_URL), reason="WFS service is unreachable") @pytest.mark.parametrize("wfs_version", ["1.1.0", "2.0.0"]) def test_wfs_remotemd_parse_single(self, wfs_version): """Test the remote metadata parsing for WFS. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns remote metadata. """ wfs = WebFeatureService(url=WFS_SERVICE_URL, version=wfs_version, parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) > 0 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WFS_SERVICE_URL), reason="WFS service is unreachable") @pytest.mark.parametrize("wfs_version", ["1.1.0", "2.0.0"]) def test_wfs_remotemd_parse_all(self, wfs_version): """Test the remote metadata parsing for WFS. Tests parsing the remote metadata for all layers. Test whether the method is available and returns remote metadata. """ wfs = WebFeatureService(url=WFS_SERVICE_URL, version=wfs_version, parse_remote_metadata=True) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) > 0 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WFS_SERVICE_URL), reason="WFS service is unreachable") @pytest.mark.parametrize("wfs_version", ["1.1.0", "2.0.0"]) def test_wfs_remotemd_parse_none(self, wfs_version): """Test the remote metadata parsing for WFS. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. """ wfs = WebFeatureService(url=WFS_SERVICE_URL, version=wfs_version, parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WFS_SERVICE_URL), reason="WFS service is unreachable") @pytest.mark.parametrize("wfs_version", ["1.0.0"]) def test_wfs_noremotemd_parse_single(self, wfs_version): """Test the remote metadata parsing for WFS. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. """ wfs = WebFeatureService(url=WFS_SERVICE_URL, version=wfs_version, parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WFS_SERVICE_URL), reason="WFS service is unreachable") @pytest.mark.parametrize("wfs_version", ["1.0.0"]) def test_wfs_noremotemd_parse_all(self, wfs_version): """Test the remote metadata parsing for WFS. Tests parsing the remote metadata for all layers. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. """ wfs = WebFeatureService(url=WFS_SERVICE_URL, version=wfs_version, parse_remote_metadata=True) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WFS_SERVICE_URL), reason="WFS service is unreachable") @pytest.mark.parametrize("wfs_version", ["1.0.0"]) def test_wfs_noremotemd_parse_none(self, wfs_version): """Test the remote metadata parsing for WFS. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. """ wfs = WebFeatureService(url=WFS_SERVICE_URL, version=wfs_version, parse_remote_metadata=False) assert 'gw_meetnetten:meetnetten' in wfs.contents layer = wfs.contents['gw_meetnetten:meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WMS_SERVICE_URL), reason="WMS service is unreachable") @pytest.mark.parametrize("wms_version", ["1.3.0"]) def test_wms_remotemd_parse_single(self, wms_version): """Test the remote metadata parsing for WMS. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns remote metadata. """ wms = WebMapService(url=WMS_SERVICE_URL, version=wms_version, parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) > 0 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WMS_SERVICE_URL), reason="WMS service is unreachable") @pytest.mark.parametrize("wms_version", ["1.3.0"]) def test_wms_remotemd_parse_all(self, wms_version): """Test the remote metadata parsing for WMS. Tests parsing the remote metadata for all layers. Test whether the method is available and returns remote metadata. """ wms = WebMapService(url=WMS_SERVICE_URL, version=wms_version, parse_remote_metadata=True) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) > 0 for m in mdrecords: assert type(m) is owslib.iso.MD_Metadata @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WMS_SERVICE_URL), reason="WMS service is unreachable") @pytest.mark.parametrize("wms_version", ["1.3.0"]) def test_wms_remotemd_parse_none(self, wms_version): """Test the remote metadata parsing for WMS. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. """ wms = WebMapService(url=WMS_SERVICE_URL, version=wms_version, parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WMS_SERVICE_URL), reason="WMS service is unreachable") @pytest.mark.parametrize("wms_version", ["1.1.1"]) def test_wms_noremotemd_parse_single(self, wms_version): """Test the remote metadata parsing for WMS. Tests parsing the remote metadata for a single layer. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. """ wms = WebMapService(url=WMS_SERVICE_URL, version=wms_version, parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] layer.parse_remote_metadata() mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WMS_SERVICE_URL), reason="WMS service is unreachable") @pytest.mark.parametrize("wms_version", ["1.1.1"]) def test_wms_noremotemd_parse_all(self, wms_version): """Test the remote metadata parsing for WMS. Tests parsing the remote metadata for all layers. Test whether the method is available and returns no remote metadata if no MetadataURLs are available in the GetCapabilities. """ wms = WebMapService(url=WMS_SERVICE_URL, version=wms_version, parse_remote_metadata=True) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0 @pytest.mark.xfail @pytest.mark.online @pytest.mark.skipif(not service_ok(WMS_SERVICE_URL), reason="WMS service is unreachable") @pytest.mark.parametrize("wms_version", ["1.1.1"]) def test_wms_noremotemd_parse_none(self, wms_version): """Test the remote metadata parsing for WMS. Tests the case when no remote metadata is parsed. Test whether no remote metadata is returned. """ wms = WebMapService(url=WMS_SERVICE_URL, version=wms_version, parse_remote_metadata=False) assert 'meetnetten' in wms.contents layer = wms.contents['meetnetten'] mdrecords = layer.get_metadata() assert type(mdrecords) is list assert len(mdrecords) == 0
34.621025
79
0.620193
4,539
39,191
5.206213
0.02842
0.094791
0.046041
0.030468
0.986797
0.985316
0.97571
0.975583
0.975583
0.975583
0
0.018943
0.296854
39,191
1,131
80
34.651636
0.838589
0.294685
0
0.870301
0
0
0.1352
0.06052
0
0
0
0
0.221805
1
0.101504
false
0
0.011278
0
0.133459
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
130006f2b3ca87efc62620cfa6e56a725b717cad
1,136
py
Python
hordak/utilities/statement_import.py
pavel64-sutyrin/django-hordak
1ffeda5058037595051672911b18bbe4558304a2
[ "MIT" ]
null
null
null
hordak/utilities/statement_import.py
pavel64-sutyrin/django-hordak
1ffeda5058037595051672911b18bbe4558304a2
[ "MIT" ]
null
null
null
hordak/utilities/statement_import.py
pavel64-sutyrin/django-hordak
1ffeda5058037595051672911b18bbe4558304a2
[ "MIT" ]
null
null
null
DATE_FORMATS = ( ('%d-%m-%Y', 'dd-mm-yyyy'), ('%d/%m/%Y', 'dd/mm/yyyy'), ('%d.%m.%Y', 'dd.mm.yyyy'), ('%d-%Y-%m', 'dd-yyyy-mm'), ('%d/%Y/%m', 'dd/yyyy/mm'), ('%d.%Y.%m', 'dd.yyyy.mm'), ('%m-%d-%Y', 'mm-dd-yyyy'), ('%m/%d/%Y', 'mm/dd/yyyy'), ('%m.%d.%Y', 'mm.dd.yyyy'), ('%m-%Y-%d', 'mm-yyyy-dd'), ('%m/%Y/%d', 'mm/yyyy/dd'), ('%m.%Y.%d', 'mm.yyyy.dd'), ('%Y-%d-%m', 'yyyy-dd-mm'), ('%Y/%d/%m', 'yyyy/dd/mm'), ('%Y.%d.%m', 'yyyy.dd.mm'), ('%Y-%m-%d', 'yyyy-mm-dd'), ('%Y/%m/%d', 'yyyy/mm/dd'), ('%Y.%m.%d', 'yyyy.mm.dd'), ('%d-%m-%y', 'dd-mm-yy'), ('%d/%m/%y', 'dd/mm/yy'), ('%d.%m.%y', 'dd.mm.yy'), ('%d-%y-%m', 'dd-yy-mm'), ('%d/%y/%m', 'dd/yy/mm'), ('%d.%y.%m', 'dd.yy.mm'), ('%m-%d-%y', 'mm-dd-yy'), ('%m/%d/%y', 'mm/dd/yy'), ('%m.%d.%y', 'mm.dd.yy'), ('%m-%y-%d', 'mm-yy-dd'), ('%m/%y/%d', 'mm/yy/dd'), ('%m.%y.%d', 'mm.yy.dd'), ('%y-%d-%m', 'yy-dd-mm'), ('%y/%d/%m', 'yy/dd/mm'), ('%y.%d.%m', 'yy.dd.mm'), ('%y-%m-%d', 'yy-mm-dd'), ('%y/%m/%d', 'yy/mm/dd'), ('%y.%m.%d', 'yy.mm.dd'), )
28.4
31
0.327465
218
1,136
1.701835
0.041284
0.06469
0.048518
0.080863
0.97035
0.97035
0.97035
0.97035
0.97035
0.97035
0
0
0.194542
1,136
39
32
29.128205
0.405464
0
0
0
0
0
0.539207
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
1
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
13105403a0420e3bf186fa7ff35544e42919177c
32,448
py
Python
watertap/unit_models/tests/test_electrodialysis_1D.py
kurbansitterley/watertap
1a8986a779bdcb36f1481f03eed24c6c42d26481
[ "BSD-3-Clause-LBNL" ]
null
null
null
watertap/unit_models/tests/test_electrodialysis_1D.py
kurbansitterley/watertap
1a8986a779bdcb36f1481f03eed24c6c42d26481
[ "BSD-3-Clause-LBNL" ]
null
null
null
watertap/unit_models/tests/test_electrodialysis_1D.py
kurbansitterley/watertap
1a8986a779bdcb36f1481f03eed24c6c42d26481
[ "BSD-3-Clause-LBNL" ]
null
null
null
############################################################################### # WaterTAP Copyright (c) 2021, The Regents of the University of California, # through Lawrence Berkeley National Laboratory, Oak Ridge National # Laboratory, National Renewable Energy Laboratory, and National Energy # Technology Laboratory (subject to receipt of any required approvals from # the U.S. Dept. of Energy). All rights reserved. # # Please see the files COPYRIGHT.md and LICENSE.md for full copyright and license # information, respectively. These files are also available online at the URL # "https://github.com/watertap-org/watertap/" # ############################################################################### import pytest from watertap.property_models.ion_DSPMDE_prop_pack import DSPMDEParameterBlock from watertap.unit_models.electrodialysis_1D import Electrodialysis1D from watertap.costing import WaterTAPCosting from pyomo.environ import ( ConcreteModel, assert_optimal_termination, value, Set, Param, Var, units as pyunits, Suffix, Constraint, SolverFactory, SolverStatus, TerminationCondition, ) from idaes.core import ( FlowsheetBlock, MaterialFlowBasis, MaterialBalanceType, MomentumBalanceType, EnergyBalanceType, ) from idaes.generic_models.costing import UnitModelCostingBlock from idaes.core.util.exceptions import ConfigurationError from idaes.core.util.model_statistics import degrees_of_freedom from pyomo.util.check_units import assert_units_consistent import idaes.core.util.scaling as iscale from idaes.core.util.testing import initialization_tester from idaes.core.util import get_solver import re __author__ = "Xiangyu Bi" solver = get_solver() # ----------------------------------------------------------------------------- # Start test class class TestElectrodialysisVoltageConst: @pytest.fixture(scope="class") def electrodialysis_1d_cell1(self): m = ConcreteModel() m.fs = FlowsheetBlock(default={"dynamic": False}) ion_dict = { "solute_list": ["Na_+", "Cl_-"], "mw_data": {"H2O": 18e-3, "Na_+": 23e-3, "Cl_-": 35.5e-3}, "electrical_mobility_data": {"Na_+": 5.19e-8, "Cl_-": 7.92e-8}, "charge": {"Na_+": 1, "Cl_-": -1}, } m.fs.properties = DSPMDEParameterBlock(default=ion_dict) m.fs.unit = Electrodialysis1D( default={ "property_package": m.fs.properties, "operation_mode": "Constant_Voltage", "finite_elements": 20, } ) return m @pytest.mark.unit def test_build_model(self, electrodialysis_1d_cell1): m = electrodialysis_1d_cell1 # test configrations assert len(m.fs.unit.config) == 13 assert not m.fs.unit.config.dynamic assert not m.fs.unit.config.has_holdup assert m.fs.unit.config.operation_mode == "Constant_Voltage" assert m.fs.unit.config.material_balance_type == MaterialBalanceType.useDefault assert ( m.fs.unit.config.momentum_balance_type == MomentumBalanceType.pressureTotal ) assert m.fs.unit.config.property_package is m.fs.properties assert "H2O" in m.fs.properties.component_list # test all essential params and vars are built assert isinstance(m.fs.unit.membrane_set, Set) assert isinstance(m.fs.unit.cell_pair_num, Var) assert isinstance(m.fs.unit.cell_width, Var) assert isinstance(m.fs.unit.cell_length, Var) assert isinstance(m.fs.unit.spacer_thickness, Var) assert isinstance(m.fs.unit.membrane_thickness, Var) assert isinstance(m.fs.unit.solute_diffusivity_membrane, Var) assert isinstance(m.fs.unit.ion_trans_number_membrane, Var) assert isinstance(m.fs.unit.water_trans_number_membrane, Var) assert isinstance(m.fs.unit.water_permeability_membrane, Var) assert isinstance(m.fs.unit.membrane_areal_resistance, Var) assert isinstance(m.fs.unit.current_applied, Var) assert isinstance(m.fs.unit.current_density_x, Var) assert isinstance(m.fs.unit.voltage_applied, Var) assert isinstance(m.fs.unit.voltage_x, Var) assert isinstance(m.fs.unit.current_utilization, Var) assert isinstance(m.fs.unit.diluate.power_electrical_x, Var) assert isinstance(m.fs.unit.specific_power_electrical, Var) assert isinstance(m.fs.unit.current_efficiency_x, Var) assert isinstance(m.fs.unit.eq_get_total_areal_resistance_x, Constraint) assert isinstance(m.fs.unit.eq_get_current_density, Constraint) assert isinstance(m.fs.unit.eq_get_voltage_x, Constraint) assert isinstance(m.fs.unit.eq_mass_transfer_term_diluate, Constraint) assert isinstance(m.fs.unit.eq_mass_transfer_term_concentrate, Constraint) assert isinstance(m.fs.unit.eq_power_electrical, Constraint) assert isinstance(m.fs.unit.eq_specific_power_electrical, Constraint) assert isinstance(m.fs.unit.eq_current_efficiency_x, Constraint) assert isinstance(m.fs.unit.eq_isothermal_diluate, Constraint) assert isinstance(m.fs.unit.eq_isothermal_concentrate, Constraint) @pytest.mark.unit def test_stats_constant_vol(self, electrodialysis_1d_cell1): m = electrodialysis_1d_cell1 assert_units_consistent(m) assert degrees_of_freedom(m) == 33 # Specify a system # Note: Testing scenarios in this file are primarily in accord with an experimental # setup reported by Campione et al. in Desalination 465 (2019): 79-93. # set the operational parameters m.fs.unit.water_trans_number_membrane["cem"].fix(5.8) m.fs.unit.water_trans_number_membrane["aem"].fix(4.3) m.fs.unit.water_permeability_membrane["cem"].fix(2.16e-14) m.fs.unit.water_permeability_membrane["aem"].fix(1.75e-14) m.fs.unit.voltage_applied.fix(0.5) m.fs.unit.electrodes_resistance.fix(0) m.fs.unit.cell_pair_num.fix(10) m.fs.unit.current_utilization.fix(1) m.fs.unit.spacer_thickness.fix(2.7e-4) m.fs.unit.membrane_areal_resistance["cem"].fix(1.89e-4) m.fs.unit.membrane_areal_resistance["aem"].fix(1.77e-4) m.fs.unit.cell_width.fix(0.1) m.fs.unit.cell_length.fix(0.79) m.fs.unit.membrane_thickness["aem"].fix(1.3e-4) m.fs.unit.membrane_thickness["cem"].fix(1.3e-4) m.fs.unit.solute_diffusivity_membrane["cem", "Na_+"].fix(1.8e-10) m.fs.unit.solute_diffusivity_membrane["aem", "Na_+"].fix(1.25e-10) m.fs.unit.solute_diffusivity_membrane["cem", "Cl_-"].fix(1.8e-10) m.fs.unit.solute_diffusivity_membrane["aem", "Cl_-"].fix(1.25e-10) m.fs.unit.ion_trans_number_membrane["cem", "Na_+"].fix(1) m.fs.unit.ion_trans_number_membrane["aem", "Na_+"].fix(0) m.fs.unit.ion_trans_number_membrane["cem", "Cl_-"].fix(0) m.fs.unit.ion_trans_number_membrane["aem", "Cl_-"].fix(1) # check ion transfer number requirements assert ( sum( value(m.fs.unit.ion_trans_number_membrane["cem", j]) for j in m.fs.properties.ion_set ) == 1 ) assert ( sum( value(m.fs.unit.ion_trans_number_membrane["aem", j]) for j in m.fs.properties.ion_set ) == 1 ) assert sum( value(m.fs.unit.ion_trans_number_membrane["cem", j]) for j in m.fs.properties.cation_set ) == sum( value(m.fs.unit.ion_trans_number_membrane["aem", j]) for j in m.fs.properties.anion_set ) # set the inlet stream m.fs.unit.inlet_diluate.pressure.fix(101325) m.fs.unit.inlet_diluate.temperature.fix(298.15) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "H2O"].fix(2.40e-2) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "Na_+"].fix(7.38e-5) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "Cl_-"].fix(7.38e-5) m.fs.unit.inlet_concentrate.pressure.fix(101325) m.fs.unit.inlet_concentrate.temperature.fix(298.15) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "H2O"].fix(2.40e-2) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "Na_+"].fix(7.38e-5) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "Cl_-"].fix(7.38e-5) assert degrees_of_freedom(m) == 0 @pytest.mark.component def test_initialization_scaling(self, electrodialysis_1d_cell1): m = electrodialysis_1d_cell1 # set default scaling for state vars m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e2, index=("Liq", "H2O") ) m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e4, index=("Liq", "Na_+") ) m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e4, index=("Liq", "Cl_-") ) # set scaling factors for some vars iscale.set_scaling_factor(m.fs.unit.cell_width, 10) iscale.set_scaling_factor(m.fs.unit.cell_length, 10) iscale.calculate_scaling_factors(m.fs) # Added this unit check scaling assert_units_consistent(m) initialization_tester(m) badly_scaled_var_values = { var.name: val for (var, val) in iscale.badly_scaled_var_generator(m) } assert not badly_scaled_var_values # check to make sure DOF does not change assert degrees_of_freedom(m) == 0 @pytest.mark.component def test_solve(self, electrodialysis_1d_cell1): m = electrodialysis_1d_cell1 # run solver and check for optimal solution results = solver.solve(m) assert_optimal_termination(results) badly_scaled_var_values = { var.name: val for (var, val) in iscale.badly_scaled_var_generator(m) } assert not badly_scaled_var_values @pytest.mark.component def test_solution(self, electrodialysis_1d_cell1): m = electrodialysis_1d_cell1 assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "H2O"] ) == pytest.approx(2.33e-2, rel=5e-3) assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "Na_+"] ) == pytest.approx(3.22e-05, rel=5e-3) assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "Cl_-"] ) == pytest.approx(3.22e-05, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "H2O"] ) == pytest.approx(2.47e-2, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "Na_+"] ) == pytest.approx(1.15e-4, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "Cl_-"] ) == pytest.approx(1.15e-4, rel=5e-3) @pytest.mark.component def test_performance_contents(self, electrodialysis_1d_cell1): m = electrodialysis_1d_cell1 perform_dict = m.fs.unit._get_performance_contents() assert "vars" in perform_dict assert value( perform_dict["vars"]["Total electrical power consumption(Watt)"] ) == pytest.approx(3.0, rel=5e-3) assert value( perform_dict["vars"]["Specific electrical power consumption (kW*h/m**3)"] ) == pytest.approx(0.197, rel=5e-3) @pytest.mark.component def test_costing(self, electrodialysis_1d_cell1): m = electrodialysis_1d_cell1 blk = m.fs.unit m.fs.costing = WaterTAPCosting() m.fs.unit.costing = UnitModelCostingBlock( default={ "flowsheet_costing_block": m.fs.costing, "costing_method_arguments": {"cost_electricity_flow": True}, }, ) m.fs.costing.cost_process() assert_units_consistent(m) assert degrees_of_freedom(m) == 0 results = solver.solve(m, tee=True) assert_optimal_termination(results) assert pytest.approx(388.6800, rel=1e-3) == value( m.fs.costing.total_capital_cost ) assert pytest.approx(45.86804, rel=1e-3) == value( m.fs.costing.total_operating_cost ) assert pytest.approx(777.3600, rel=1e-3) == value( m.fs.costing.total_investment_cost ) class TestElectrodialysisCurrentConst: @pytest.fixture(scope="class") def electrodialysis_1d_cell2(self): m = ConcreteModel() m.fs = FlowsheetBlock(default={"dynamic": False}) ion_dict = { "solute_list": ["Na_+", "Cl_-"], "mw_data": {"H2O": 18e-3, "Na_+": 23e-3, "Cl_-": 35.5e-3}, "electrical_mobility_data": {"Na_+": 5.19e-8, "Cl_-": 7.92e-8}, "charge": {"Na_+": 1, "Cl_-": -1}, } m.fs.properties = DSPMDEParameterBlock(default=ion_dict) m.fs.unit = Electrodialysis1D( default={ "property_package": m.fs.properties, "operation_mode": "Constant_Current", "finite_elements": 20, } ) return m @pytest.mark.unit def test_build_model(self, electrodialysis_1d_cell2): m = electrodialysis_1d_cell2 # test configrations assert len(m.fs.unit.config) == 13 assert not m.fs.unit.config.dynamic assert not m.fs.unit.config.has_holdup assert m.fs.unit.config.operation_mode == "Constant_Current" assert m.fs.unit.config.material_balance_type == MaterialBalanceType.useDefault assert ( m.fs.unit.config.momentum_balance_type == MomentumBalanceType.pressureTotal ) assert m.fs.unit.config.property_package is m.fs.properties assert "H2O" in m.fs.properties.component_list # test all essential params and vars are built assert isinstance(m.fs.unit.membrane_set, Set) assert isinstance(m.fs.unit.cell_pair_num, Var) assert isinstance(m.fs.unit.cell_width, Var) assert isinstance(m.fs.unit.cell_length, Var) assert isinstance(m.fs.unit.spacer_thickness, Var) assert isinstance(m.fs.unit.membrane_thickness, Var) assert isinstance(m.fs.unit.solute_diffusivity_membrane, Var) assert isinstance(m.fs.unit.ion_trans_number_membrane, Var) assert isinstance(m.fs.unit.water_trans_number_membrane, Var) assert isinstance(m.fs.unit.water_permeability_membrane, Var) assert isinstance(m.fs.unit.membrane_areal_resistance, Var) assert isinstance(m.fs.unit.current_applied, Var) assert isinstance(m.fs.unit.current_density_x, Var) assert isinstance(m.fs.unit.voltage_applied, Var) assert isinstance(m.fs.unit.voltage_x, Var) assert isinstance(m.fs.unit.current_utilization, Var) assert isinstance(m.fs.unit.diluate.power_electrical_x, Var) assert isinstance(m.fs.unit.specific_power_electrical, Var) assert isinstance(m.fs.unit.current_efficiency_x, Var) assert isinstance(m.fs.unit.eq_get_total_areal_resistance_x, Constraint) assert isinstance(m.fs.unit.eq_get_current_density, Constraint) assert isinstance(m.fs.unit.eq_get_voltage_x, Constraint) assert isinstance(m.fs.unit.eq_mass_transfer_term_diluate, Constraint) assert isinstance(m.fs.unit.eq_mass_transfer_term_concentrate, Constraint) assert isinstance(m.fs.unit.eq_power_electrical, Constraint) assert isinstance(m.fs.unit.eq_specific_power_electrical, Constraint) assert isinstance(m.fs.unit.eq_current_efficiency_x, Constraint) assert isinstance(m.fs.unit.eq_isothermal_diluate, Constraint) assert isinstance(m.fs.unit.eq_isothermal_concentrate, Constraint) @pytest.mark.unit def test_stats_constant_vol(self, electrodialysis_1d_cell2): m = electrodialysis_1d_cell2 assert_units_consistent(m) assert degrees_of_freedom(m) == 33 # Specify a system # set the operational parameters m.fs.unit.water_trans_number_membrane["cem"].fix(5.8) m.fs.unit.water_trans_number_membrane["aem"].fix(4.3) m.fs.unit.water_permeability_membrane["cem"].fix(2.16e-14) m.fs.unit.water_permeability_membrane["aem"].fix(1.75e-14) m.fs.unit.current_applied.fix(8) m.fs.unit.electrodes_resistance.fix(0) m.fs.unit.cell_pair_num.fix(10) m.fs.unit.current_utilization.fix(1) m.fs.unit.spacer_thickness.fix(2.7e-4) m.fs.unit.membrane_areal_resistance["cem"].fix(1.89e-4) m.fs.unit.membrane_areal_resistance["aem"].fix(1.77e-4) m.fs.unit.cell_width.fix(0.1) m.fs.unit.cell_length.fix(0.79) m.fs.unit.membrane_thickness["aem"].fix(1.3e-4) m.fs.unit.membrane_thickness["cem"].fix(1.3e-4) m.fs.unit.solute_diffusivity_membrane["cem", "Na_+"].fix(1.8e-10) m.fs.unit.solute_diffusivity_membrane["aem", "Na_+"].fix(1.25e-10) m.fs.unit.solute_diffusivity_membrane["cem", "Cl_-"].fix(1.8e-10) m.fs.unit.solute_diffusivity_membrane["aem", "Cl_-"].fix(1.25e-10) m.fs.unit.ion_trans_number_membrane["cem", "Na_+"].fix(1) m.fs.unit.ion_trans_number_membrane["aem", "Na_+"].fix(0) m.fs.unit.ion_trans_number_membrane["cem", "Cl_-"].fix(0) m.fs.unit.ion_trans_number_membrane["aem", "Cl_-"].fix(1) # check ion transfer number requirements assert ( sum( value(m.fs.unit.ion_trans_number_membrane["cem", j]) for j in m.fs.properties.ion_set ) == 1 ) assert ( sum( value(m.fs.unit.ion_trans_number_membrane["aem", j]) for j in m.fs.properties.ion_set ) == 1 ) assert sum( value(m.fs.unit.ion_trans_number_membrane["cem", j]) for j in m.fs.properties.cation_set ) == sum( value(m.fs.unit.ion_trans_number_membrane["aem", j]) for j in m.fs.properties.anion_set ) # set the inlet stream m.fs.unit.inlet_diluate.pressure.fix(101325) m.fs.unit.inlet_diluate.temperature.fix(298.15) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "H2O"].fix(2.40e-2) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "Na_+"].fix(7.38e-5) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "Cl_-"].fix(7.38e-5) m.fs.unit.inlet_concentrate.pressure.fix(101325) m.fs.unit.inlet_concentrate.temperature.fix(298.15) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "H2O"].fix(2.40e-2) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "Na_+"].fix(7.38e-5) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "Cl_-"].fix(7.38e-5) assert degrees_of_freedom(m) == 0 @pytest.mark.component def test_initialization_scaling(self, electrodialysis_1d_cell2): m = electrodialysis_1d_cell2 # set default scaling for state vars m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e2, index=("Liq", "H2O") ) m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e4, index=("Liq", "Na_+") ) m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e4, index=("Liq", "Cl_-") ) # set scaling factors for some vars iscale.set_scaling_factor(m.fs.unit.cell_width, 10) iscale.set_scaling_factor(m.fs.unit.cell_length, 10) iscale.calculate_scaling_factors(m.fs) initialization_tester(m) badly_scaled_var_values = { var.name: val for (var, val) in iscale.badly_scaled_var_generator(m) } assert not badly_scaled_var_values # check to make sure DOF does not change assert degrees_of_freedom(m) == 0 @pytest.mark.component def test_solve(self, electrodialysis_1d_cell2): m = electrodialysis_1d_cell2 # run solver and check for optimal solution results = solver.solve(m) assert_optimal_termination(results) badly_scaled_var_values = { var.name: val for (var, val) in iscale.badly_scaled_var_generator(m) } assert not badly_scaled_var_values @pytest.mark.component def test_solution(self, electrodialysis_1d_cell2): m = electrodialysis_1d_cell2 assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "H2O"] ) == pytest.approx(2.30e-2, rel=5e-3) assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "Na_+"] ) == pytest.approx(1.75e-05, rel=5e-3) assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "Cl_-"] ) == pytest.approx(1.75e-05, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "H2O"] ) == pytest.approx(2.50e-2, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "Na_+"] ) == pytest.approx(1.30e-4, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "Cl_-"] ) == pytest.approx(1.30e-4, rel=5e-3) @pytest.mark.component def test_performance_contents(self, electrodialysis_1d_cell2): m = electrodialysis_1d_cell2 perform_dict = m.fs.unit._get_performance_contents() assert "vars" in perform_dict assert value( perform_dict["vars"]["Total electrical power consumption(Watt)"] ) == pytest.approx(5.83, rel=5e-3) assert value( perform_dict["vars"]["Specific electrical power consumption (kW*h/m**3)"] ) == pytest.approx(0.390, rel=5e-3) class TestElectrodialysis_withNeutralSPecies: @pytest.fixture(scope="class") def electrodialysis_1d_cell3(self): m = ConcreteModel() m.fs = FlowsheetBlock(default={"dynamic": False}) ion_dict = { "solute_list": ["Na_+", "Cl_-", "N"], "mw_data": {"H2O": 18e-3, "Na_+": 23e-3, "Cl_-": 35.5e-3, "N": 61.8e-3}, "electrical_mobility_data": {"Na_+": 5.19e-8, "Cl_-": 7.92e-8}, "charge": {"Na_+": 1, "Cl_-": -1}, } m.fs.properties = DSPMDEParameterBlock(default=ion_dict) m.fs.unit = Electrodialysis1D( default={ "property_package": m.fs.properties, "operation_mode": "Constant_Current", "finite_elements": 20, } ) return m @pytest.mark.unit def test_build_model(self, electrodialysis_1d_cell3): m = electrodialysis_1d_cell3 # test configrations assert len(m.fs.unit.config) == 13 assert not m.fs.unit.config.dynamic assert not m.fs.unit.config.has_holdup assert m.fs.unit.config.operation_mode == "Constant_Current" assert m.fs.unit.config.material_balance_type == MaterialBalanceType.useDefault assert ( m.fs.unit.config.momentum_balance_type == MomentumBalanceType.pressureTotal ) assert m.fs.unit.config.property_package is m.fs.properties assert "H2O" in m.fs.properties.component_list # test all essential params and vars are built assert isinstance(m.fs.unit.membrane_set, Set) assert isinstance(m.fs.unit.cell_pair_num, Var) assert isinstance(m.fs.unit.cell_width, Var) assert isinstance(m.fs.unit.cell_length, Var) assert isinstance(m.fs.unit.spacer_thickness, Var) assert isinstance(m.fs.unit.membrane_thickness, Var) assert isinstance(m.fs.unit.solute_diffusivity_membrane, Var) assert isinstance(m.fs.unit.ion_trans_number_membrane, Var) assert isinstance(m.fs.unit.water_trans_number_membrane, Var) assert isinstance(m.fs.unit.water_permeability_membrane, Var) assert isinstance(m.fs.unit.membrane_areal_resistance, Var) assert isinstance(m.fs.unit.current_applied, Var) assert isinstance(m.fs.unit.current_density_x, Var) assert isinstance(m.fs.unit.voltage_applied, Var) assert isinstance(m.fs.unit.voltage_x, Var) assert isinstance(m.fs.unit.current_utilization, Var) assert isinstance(m.fs.unit.diluate.power_electrical_x, Var) assert isinstance(m.fs.unit.specific_power_electrical, Var) assert isinstance(m.fs.unit.current_efficiency_x, Var) assert isinstance(m.fs.unit.eq_get_total_areal_resistance_x, Constraint) assert isinstance(m.fs.unit.eq_get_current_density, Constraint) assert isinstance(m.fs.unit.eq_get_voltage_x, Constraint) assert isinstance(m.fs.unit.eq_mass_transfer_term_diluate, Constraint) assert isinstance(m.fs.unit.eq_mass_transfer_term_concentrate, Constraint) assert isinstance(m.fs.unit.eq_power_electrical, Constraint) assert isinstance(m.fs.unit.eq_specific_power_electrical, Constraint) assert isinstance(m.fs.unit.eq_current_efficiency_x, Constraint) assert isinstance(m.fs.unit.eq_isothermal_diluate, Constraint) assert isinstance(m.fs.unit.eq_isothermal_concentrate, Constraint) @pytest.mark.unit def test_stats_constant_vol(self, electrodialysis_1d_cell3): m = electrodialysis_1d_cell3 assert_units_consistent(m) assert degrees_of_freedom(m) == 37 # Specify a system # set the operational parameters m.fs.unit.water_trans_number_membrane["cem"].fix(5.8) m.fs.unit.water_trans_number_membrane["aem"].fix(4.3) m.fs.unit.water_permeability_membrane["cem"].fix(2.16e-14) m.fs.unit.water_permeability_membrane["aem"].fix(1.75e-14) m.fs.unit.current_applied.fix(8) m.fs.unit.electrodes_resistance.fix(0) m.fs.unit.cell_pair_num.fix(10) m.fs.unit.current_utilization.fix(1) m.fs.unit.spacer_thickness.fix(2.7e-4) m.fs.unit.membrane_areal_resistance["cem"].fix(1.89e-4) m.fs.unit.membrane_areal_resistance["aem"].fix(1.77e-4) m.fs.unit.cell_width.fix(0.1) m.fs.unit.cell_length.fix(0.79) m.fs.unit.membrane_thickness["aem"].fix(1.3e-4) m.fs.unit.membrane_thickness["cem"].fix(1.3e-4) m.fs.unit.solute_diffusivity_membrane["cem", "Na_+"].fix(1.8e-10) m.fs.unit.solute_diffusivity_membrane["aem", "Na_+"].fix(1.25e-10) m.fs.unit.solute_diffusivity_membrane["cem", "Cl_-"].fix(1.8e-10) m.fs.unit.solute_diffusivity_membrane["aem", "Cl_-"].fix(1.25e-10) m.fs.unit.solute_diffusivity_membrane["cem", "N"].fix(1.8e-10) m.fs.unit.solute_diffusivity_membrane["aem", "N"].fix(1.25e-10) m.fs.unit.ion_trans_number_membrane["cem", "Na_+"].fix(1) m.fs.unit.ion_trans_number_membrane["aem", "Na_+"].fix(0) m.fs.unit.ion_trans_number_membrane["cem", "Cl_-"].fix(0) m.fs.unit.ion_trans_number_membrane["aem", "Cl_-"].fix(1) # check ion transfer number requirements assert ( sum( value(m.fs.unit.ion_trans_number_membrane["cem", j]) for j in m.fs.properties.ion_set ) == 1 ) assert ( sum( value(m.fs.unit.ion_trans_number_membrane["aem", j]) for j in m.fs.properties.ion_set ) == 1 ) assert sum( value(m.fs.unit.ion_trans_number_membrane["cem", j]) for j in m.fs.properties.cation_set ) == sum( value(m.fs.unit.ion_trans_number_membrane["aem", j]) for j in m.fs.properties.anion_set ) # set the inlet stream m.fs.unit.inlet_diluate.pressure.fix(101325) m.fs.unit.inlet_diluate.temperature.fix(298.15) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "H2O"].fix(2.40e-2) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "Na_+"].fix(7.38e-5) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "Cl_-"].fix(7.38e-5) m.fs.unit.inlet_diluate.flow_mol_phase_comp[0, "Liq", "N"].fix(7.38e-6) m.fs.unit.inlet_concentrate.pressure.fix(101325) m.fs.unit.inlet_concentrate.temperature.fix(298.15) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "H2O"].fix(2.40e-2) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "Na_+"].fix(7.38e-5) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "Cl_-"].fix(7.38e-5) m.fs.unit.inlet_concentrate.flow_mol_phase_comp[0, "Liq", "N"].fix(7.38e-6) assert degrees_of_freedom(m) == 0 @pytest.mark.component def test_initialization_scaling(self, electrodialysis_1d_cell3): m = electrodialysis_1d_cell3 # set default scaling for state vars m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e2, index=("Liq", "H2O") ) m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e4, index=("Liq", "Na_+") ) m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e4, index=("Liq", "Cl_-") ) m.fs.properties.set_default_scaling( "flow_mol_phase_comp", 1e5, index=("Liq", "N") ) # set scaling factors for some vars iscale.set_scaling_factor(m.fs.unit.cell_width, 10) iscale.set_scaling_factor(m.fs.unit.cell_length, 10) iscale.calculate_scaling_factors(m.fs) initialization_tester(m) badly_scaled_var_values = { var.name: val for (var, val) in iscale.badly_scaled_var_generator(m) } assert not badly_scaled_var_values # check to make sure DOF does not change assert degrees_of_freedom(m) == 0 @pytest.mark.component def test_solve(self, electrodialysis_1d_cell3): m = electrodialysis_1d_cell3 # run solver and check for optimal solution results = solver.solve(m) assert_optimal_termination(results) badly_scaled_var_values = { var.name: val for (var, val) in iscale.badly_scaled_var_generator(m) } assert not badly_scaled_var_values @pytest.mark.component def test_solution(self, electrodialysis_1d_cell3): m = electrodialysis_1d_cell3 assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "H2O"] ) == pytest.approx(2.30e-2, rel=5e-3) assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "Na_+"] ) == pytest.approx(1.75e-05, rel=5e-3) assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "Cl_-"] ) == pytest.approx(1.75e-05, rel=5e-3) assert value( m.fs.unit.outlet_diluate.flow_mol_phase_comp[0, "Liq", "N"] ) == pytest.approx(7.26e-06, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "H2O"] ) == pytest.approx(2.50e-2, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "Na_+"] ) == pytest.approx(1.30e-4, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "Cl_-"] ) == pytest.approx(1.30e-4, rel=5e-3) assert value( m.fs.unit.outlet_concentrate.flow_mol_phase_comp[0, "Liq", "N"] ) == pytest.approx(7.50e-06, rel=5e-3) @pytest.mark.component def test_performance_contents(self, electrodialysis_1d_cell3): m = electrodialysis_1d_cell3 perform_dict = m.fs.unit._get_performance_contents() assert "vars" in perform_dict assert value( perform_dict["vars"]["Total electrical power consumption(Watt)"] ) == pytest.approx(5.63, rel=5e-3) assert value( perform_dict["vars"]["Specific electrical power consumption (kW*h/m**3)"] ) == pytest.approx(0.376, rel=5e-3)
44.632737
91
0.645001
4,450
32,448
4.474157
0.080225
0.045655
0.090357
0.083024
0.900452
0.899749
0.899699
0.893219
0.868056
0.855098
0
0.03288
0.226732
32,448
726
92
44.694215
0.760631
0.05461
0
0.769968
0
0
0.055855
0.004594
0
0
0
0
0.285942
1
0.035144
false
0
0.022364
0
0.067093
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
13684ecbcbfab659c3f7ef65cb5e091dee49c1f3
37
py
Python
alis/__init__.py
alisista/py-alis
08f76d0681c28700145a7839f3e97ee02fd0eb23
[ "MIT" ]
4
2018-08-22T03:44:04.000Z
2019-10-27T05:34:24.000Z
alis/__init__.py
alisista/py-alis
08f76d0681c28700145a7839f3e97ee02fd0eb23
[ "MIT" ]
1
2021-06-02T00:36:04.000Z
2021-06-02T00:36:04.000Z
alis/__init__.py
alisista/py-alis
08f76d0681c28700145a7839f3e97ee02fd0eb23
[ "MIT" ]
null
null
null
from . import alis from . import lib
12.333333
18
0.72973
6
37
4.5
0.666667
0.740741
0
0
0
0
0
0
0
0
0
0
0.216216
37
2
19
18.5
0.931034
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
136941398f9d7b59fd74ed605d0a8788637357e1
560
py
Python
eval_covid20cases_timm-regnetx_002_GaussianBlur.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
eval_covid20cases_timm-regnetx_002_GaussianBlur.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
eval_covid20cases_timm-regnetx_002_GaussianBlur.py
BrunoKrinski/segtool
cb604b5f38104c43a76450136e37c3d1c4b6d275
[ "MIT" ]
null
null
null
import os ls=["python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_0_GaussianBlur.yml", "python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_1_GaussianBlur.yml", "python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_2_GaussianBlur.yml", "python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_3_GaussianBlur.yml", "python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_4_GaussianBlur.yml", ] for l in ls: os.system(l)
50.909091
106
0.851786
80
560
5.5875
0.3
0.111857
0.134228
0.212528
0.894855
0.894855
0.894855
0.894855
0.894855
0.894855
0
0.056711
0.055357
560
11
107
50.909091
0.78828
0
0
0
0
0
0.882353
0.659537
0
0
0
0
0
1
0
false
0
0.111111
0
0.111111
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
136c579966c9946bb856c492b15fac420e60fef6
42,823
py
Python
cltk/tests/test_akkadian/test_akkadian.py
michiboo/cltk
f4ab93b836a995f88a007ed78246ea6db0bef377
[ "MIT" ]
1
2018-03-15T07:20:19.000Z
2018-03-15T07:20:19.000Z
cltk/tests/test_akkadian/test_akkadian.py
michiboo/cltk
f4ab93b836a995f88a007ed78246ea6db0bef377
[ "MIT" ]
null
null
null
cltk/tests/test_akkadian/test_akkadian.py
michiboo/cltk
f4ab93b836a995f88a007ed78246ea6db0bef377
[ "MIT" ]
null
null
null
''' Various test cases for akkadian functions in the CLTK ''' __author__ = ['M. Willis Monroe <willismonroe@gmail.com>', 'Andrew Deloucas <adeloucas@g.harvard.com>'] __license__ = 'MIT License. See LICENSE.' from cltk.phonology.akkadian.stress import StressFinder # pylint: disable=import-error from cltk.corpus.akkadian.cdli_corpus import CDLICorpus # pylint: disable=import-error from cltk.corpus.akkadian.pretty_print import PrettyPrint # pylint: disable=import-error from cltk.corpus.akkadian.file_importer import FileImport # pylint: disable=import-error from cltk.corpus.akkadian.tokenizer import Tokenizer # pylint: disable=import-error import unittest import os TOKENIZER = Tokenizer(preserve_damage=False) SAMPLE_TEXT = \ ['Primary publication: ARM 01, 001', 'Author(s): Dossin, Georges', 'Publication date: 1946', 'Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0305', 'Collection: National Museum of Syria, Damascus, Syria', 'Museum no.: NMSD —', 'Accession no.:', 'Provenience: Mari (mod. Tell Hariri)', 'Excavation no.:', 'Period: Old Babylonian (ca. 1900-1600 BC)', 'Dates referenced:', 'Object type: tablet', 'Remarks:', 'Material: clay', 'Language: Akkadian', 'Genre: Letter', 'Sub-genre:', 'CDLI comments:', 'Catalogue source: 20050104 cdliadmin', 'ATF source: cdlistaff', 'Translation: Durand, Jean-Marie (fr); Guerra, Dylan M. (en)', 'UCLA Library ARK: 21198/zz001rsp8x', 'Composite no.:', 'Seal no.:', 'CDLI no.: P254202', 'Transliteration:', '&P254202 = ARM 01, 001', '#atf: lang akk', '@tablet', '@obverse', '1. a-na ia-ah-du-li-[im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar#-[ma]', '4. sa-li-ma-am e-pu-[usz]', '5. asz-szum mu-sze-zi-ba-am# [la i-szu]', '6. [sa]-li#-ma-am sza e-[pu-szu]', '7. [u2-ul] e-pu-usz sa#-[li-mu-um]', '8. [u2-ul] sa-[li-mu-um-ma]', '$ rest broken', '@reverse', '$ beginning broken', "1'. isz#-tu mu#-[sze-zi-ba-am la i-szu]", "2'. a-la-nu-ia sza la is,-s,a-ab#-[tu]", "3'. i-na-an-na is,-s,a-ab-[tu]", "4'. i-na ne2-kur-ti _lu2_ ha-szi-[im{ki}]", "5'. ur-si-im{ki} _lu2_ ka-ar-ka#-[mi-is{ki}]", "6'. u3 ia-am-ha-ad[{ki}]", "7'. a-la-nu an-nu-tum u2-ul ih-li-qu2#", "8'. i-na ne2-kur-ti {disz}sa-am-si-{d}iszkur#-ma", "9'. ih-ta-al-qu2", "10'. u3 a-la-nu sza ki-ma u2-hu-ru u2-sze-zi-ib#", "11'. u3 na-pa-asz2-ti u2-ba-li-it,", "12'. pi2-qa-at ha-s,e-ra#-at", "13'. asz-szum a-la-nu-ka", "14'. u3 ma-ru-ka sza-al#-[mu]", "15'. [a-na na-pa]-asz2#-ti-ia i-tu-ur", '', '', 'Primary publication: ARM 01, 002', 'Author(s): Dossin, Georges', 'Publication date: 1946', 'Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0306', 'Collection: National Museum of Syria, Damascus, Syria', 'Museum no.: NMSD —', 'Accession no.:', 'Provenience: Mari (mod. Tell Hariri)', 'Excavation no.:', 'Period: Old Babylonian (ca. 1900-1600 BC)', 'Dates referenced:', 'Object type: tablet', 'Remarks:', 'Material: clay', 'Language: Akkadian', 'Genre: Letter', 'Sub-genre:', 'CDLI comments:', 'Catalogue source: 20050104 cdliadmin', 'ATF source: cdlistaff', 'Translation:', 'UCLA Library ARK: 21198/zz001rsp9f', 'Composite no.:', 'Seal no.:', 'CDLI no.: P254203', 'Transliteration:', '&P254203 = ARM 01, 002', '#atf: lang akk', '@tablet', '@obverse', '1. a-na ia-ah-du-[li-im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar-[ma]', '4. asz-szum sza a-qa-bi-kum la ta-ha-asz2#', '5. a-na ma-ni-im lu-ud-bu-ub', '6. szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub]', '7. szum-ma a-bi-sa-mar te-zi-ir#', '8. u3 a-la#-ni#-ka te-zi-ir-ma#', '9. i-na an-ni-a-tim sza a-da-bu-[bu]', '10. a-na-ku mi-im-ma u2-ul e-le#-[i]', '11. sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz]', '12. u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i]', '13. u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz]', '14. u3 lu ma-at ia-ma-ha-ad#{ki}', '15. u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na]', '$ rest broken', '@reverse', '$ beginning broken', "1'. um#-[...]", "2'. lu#-[...]", "3'. a-[...]", "4'. szum#-[...]", "5'. a-na# [...]", "6'. ma-li# [...]", "7'. u3 u2-hu-ur# [...]", "8'. a-su2-ur-ri [...]", "9'. szu-zi-ba-an#-[ni ...]", "10'. a-na [...]", "11'. pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma]", '@left', '1. {disz}a-bi-sa-mar u2-ul ma-ri u3 bi-ti a-na la bi-tu#-[tu-ur2-ma]', '2. bi-tum bi-it-ka u3 {disz}a-bi#-[sa]-mar# ma-ru-ka-[ma]'] class TestSequenceFunctions(unittest.TestCase): # pylint: disable=R0904 ''' An experiment to use Huehnergard's grammar and key to test the functions in the cltk. ''' def test_lesson_1_exercise_d(self): """Tests stresser""" nouns = ['abum', 'ālum', 'amtum', 'bēlum', 'ḫurāṣum', 'iltum', 'ilum', 'kaspum', 'mārtum', 'mārum', 'qaqqadum', 'ṣābum', 'šarratum', 'šarrum', 'wardum'] stresser = StressFinder() stress = [] for noun in nouns: stress.append(stresser.find_stress(noun)) target = [['[a]', 'bum'], ['[ā]', 'lum'], ['[am]', 'tum'], ['[bē]', 'lum'], ['ḫu', '[rā]', 'ṣum'], ['[il]', 'tum'], ['[i]', 'lum'], ['[kas]', 'pum'], ['[mār]', 'tum'], ['[mā]', 'rum'], ['[qaq]', 'qa', 'dum'], ['[ṣā]', 'bum'], ['[šar]', 'ra', 'tum'], ['[šar]', 'rum'], ['[war]', 'dum']] self.assertEqual(stress, target) def test_lesson_1_exercise_e(self): """Tests Stresser""" nouns = ['mušallimum', 'išāl', 'idin', 'iddinūniššum', 'tabnianni', 'niqīaš', 'epēšum', 'kullumum', 'tabnû', 'iššiakkum', 'rēdûm', 'iqbi', 'paris', 'išmeānim', 'pete', 'šūṣû'] stresser = StressFinder() stress = [] for noun in nouns: stress.append(stresser.find_stress(noun)) target = [['mu', '[šal]', 'li', 'mum'], ['i', '[šāl]'], ['[i]', 'din'], ['id', 'di', 'nū', '[niš]', 'šum'], ['tab', 'ni', '[an]', 'ni'], ['ni', '[qī]', 'aš'], ['e', '[pē]', 'šum'], ['[kul]', 'lu', 'mum'], ['tab', '[nû]'], ['iš', 'ši', '[ak]', 'kum'], ['rē', '[dûm]'], ['[iq]', 'bi'], ['[pa]', 'ris'], ['iš', 'me', '[ā]', 'nim'], ['[pe]', 'te'], ['šū', '[ṣû]']] self.assertEqual(stress, target) def test_lesson_2_exercise_b(self): """Tests Stresser""" nouns = ['aššatum', 'bītum', 'emūqum', 'īnum', 'išdum', 'libbum', 'mutum', 'nārum', 'šīpātum', 'ṭuppum', 'ummum', 'uznum'] stresser = StressFinder() stress = [] for noun in nouns: stress.append(stresser.find_stress(noun)) target = [['[aš]', 'ša', 'tum'], ['[bī]', 'tum'], ['e', '[mū]', 'qum'], ['[ī]', 'num'], ['[iš]', 'dum'], ['[lib]', 'bum'], ['[mu]', 'tum'], ['[nā]', 'rum'], ['šī', '[pā]', 'tum'], ['[ṭup]', 'pum'], ['[um]', 'mum'], ['[uz]', 'num']] self.assertEqual(stress, target) class TestcasesfromGSOC(unittest.TestCase): # pylint: disable=R0904 """Class for unittest""" def test_read_file(self): """ Tests read_file. """ cdli = FileImport(os.path.join(os.path.dirname(__file__), 'single_text.txt')) cdli.read_file() final = cdli.file_lines goal = ['Primary publication: ARM 01, 001', 'Author(s): Dossin, Georges', 'Publication date: 1946', 'Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0305', 'Collection: National Museum of Syria, Damascus, Syria', 'Museum no.: NMSD —', 'Accession no.:', 'Provenience: Mari (mod. Tell Hariri)', 'Excavation no.:', 'Period: Old Babylonian (ca. 1900-1600 BC)', 'Dates referenced:', 'Object type: tablet', 'Remarks:', 'Material: clay', 'Language: Akkadian', 'Genre: Letter', 'Sub-genre:', 'CDLI comments:', 'Catalogue source: 20050104 cdliadmin', 'ATF source: cdlistaff', 'Translation: Durand, Jean-Marie (fr); Guerra, Dylan M. (en)', 'UCLA Library ARK: 21198/zz001rsp8x', 'Composite no.:', 'Seal no.:', 'CDLI no.: P254202', 'Transliteration:', '&P254202 = ARM 01, 001', '#atf: lang akk', '@tablet', '@obverse', '1. a-na ia-ah-du-li-[im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar#-[ma]', '4. sa-li-ma-am e-pu-[usz]', '5. asz-szum mu-sze-zi-ba-am# [la i-szu]', '6. [sa]-li#-ma-am sza e-[pu-szu]', '7. [u2-ul] e-pu-usz sa#-[li-mu-um]', '8. [u2-ul] sa-[li-mu-um-ma]', '$ rest broken', '@reverse', '$ beginning broken', "1'. isz#-tu mu#-[sze-zi-ba-am la i-szu]", "2'. a-la-nu-ia sza la is,-s,a-ab#-[tu]", "3'. i-na-an-na is,-s,a-ab-[tu]", "4'. i-na ne2-kur-ti _lu2_ ha-szi-[im{ki}]", "5'. ur-si-im{ki} _lu2_ ka-ar-ka#-[mi-is{ki}]", "6'. u3 ia-am-ha-ad[{ki}]", "7'. a-la-nu an-nu-tum u2-ul ih-li-qu2#", "8'. i-na ne2-kur-ti {disz}sa-am-si-{d}iszkur#-ma", "9'. ih-ta-al-qu2", "10'. u3 a-la-nu sza ki-ma u2-hu-ru u2-sze-zi-ib#", "11'. u3 na-pa-asz2-ti u2-ba-li-it,", "12'. pi2-qa-at ha-s,e-ra#-at", "13'. asz-szum a-la-nu-ka", "14'. u3 ma-ru-ka sza-al#-[mu]", "15'. [a-na na-pa]-asz2#-ti-ia i-tu-ur"] print(os.getcwd()) self.assertEqual(final, goal) def test_file_catalog(self): """ Tests file_catalog. """ cdli = FileImport(os.path.join(os.path.dirname(__file__), 'single_text.txt')) cdli.file_catalog() final = cdli.catalog goal = ['__pycache__', 'html_file.html', 'html_single_text.html', 'single_text.txt', 'test_akkadian.py', 'two_text_abnormalities.txt'] self.assertEqual(final, goal) def test_parse_file(self): """ Tests parse_file. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = cdli.chunks goal = [['Primary publication: ARM 01, 001', 'Author(s): Dossin, Georges', 'Publication date: 1946', 'Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0305', 'Collection: National Museum of Syria, Damascus, Syria', 'Museum no.: NMSD —', 'Accession no.:', 'Provenience: Mari (mod. Tell Hariri)', 'Excavation no.:', 'Period: Old Babylonian (ca. 1900-1600 BC)', 'Dates referenced:', 'Object type: tablet', 'Remarks:', 'Material: clay', 'Language: Akkadian', 'Genre: Letter', 'Sub-genre:', 'CDLI comments:', 'Catalogue source: 20050104 cdliadmin', 'ATF source: cdlistaff', 'Translation: Durand, Jean-Marie (fr); Guerra, Dylan M. (en)', 'UCLA Library ARK: 21198/zz001rsp8x', 'Composite no.:', 'Seal no.:', 'CDLI no.: P254202', 'Transliteration:', '&P254202 = ARM 01, 001', '#atf: lang akk', '@tablet', '@obverse', '1. a-na ia-ah-du-li-[im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar#-[ma]', '4. sa-li-ma-am e-pu-[usz]', '5. asz-szum mu-sze-zi-ba-am# [la i-szu]', '6. [sa]-li#-ma-am sza e-[pu-szu]', '7. [u2-ul] e-pu-usz sa#-[li-mu-um]', '8. [u2-ul] sa-[li-mu-um-ma]', '$ rest broken', '@reverse', '$ beginning broken', "1'. isz#-tu mu#-[sze-zi-ba-am la i-szu]", "2'. a-la-nu-ia sza la is,-s,a-ab#-[tu]", "3'. i-na-an-na is,-s,a-ab-[tu]", "4'. i-na ne2-kur-ti _lu2_ ha-szi-[im{ki}]", "5'. ur-si-im{ki} _lu2_ ka-ar-ka#-[mi-is{ki}]", "6'. u3 ia-am-ha-ad[{ki}]", "7'. a-la-nu an-nu-tum u2-ul ih-li-qu2#", "8'. i-na ne2-kur-ti {disz}sa-am-si-{d}iszkur#-ma", "9'. ih-ta-al-qu2", "10'. u3 a-la-nu sza ki-ma u2-hu-ru u2-sze-zi-ib#", "11'. u3 na-pa-asz2-ti u2-ba-li-it,", "12'. pi2-qa-at ha-s,e-ra#-at", "13'. asz-szum a-la-nu-ka", "14'. u3 ma-ru-ka sza-al#-[mu]", "15'. [a-na na-pa]-asz2#-ti-ia i-tu-ur"], ['Primary publication: ARM 01, 002', 'Author(s): Dossin, Georges', 'Publication date: 1946', 'Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0306', 'Collection: National Museum of Syria, Damascus, Syria', 'Museum no.: NMSD —', 'Accession no.:', 'Provenience: Mari (mod. Tell Hariri)', 'Excavation no.:', 'Period: Old Babylonian (ca. 1900-1600 BC)', 'Dates referenced:', 'Object type: tablet', 'Remarks:', 'Material: clay', 'Language: Akkadian', 'Genre: Letter', 'Sub-genre:', 'CDLI comments:', 'Catalogue source: 20050104 cdliadmin', 'ATF source: cdlistaff', 'Translation:', 'UCLA Library ARK: 21198/zz001rsp9f', 'Composite no.:', 'Seal no.:', 'CDLI no.: P254203', 'Transliteration:', '&P254203 = ARM 01, 002', '#atf: lang akk', '@tablet', '@obverse', '1. a-na ia-ah-du-[li-im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar-[ma]', '4. asz-szum sza a-qa-bi-kum la ta-ha-asz2#', '5. a-na ma-ni-im lu-ud-bu-ub', '6. szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub]', '7. szum-ma a-bi-sa-mar te-zi-ir#', '8. u3 a-la#-ni#-ka te-zi-ir-ma#', '9. i-na an-ni-a-tim sza a-da-bu-[bu]', '10. a-na-ku mi-im-ma u2-ul e-le#-[i]', '11. sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz]', '12. u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i]', '13. u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz]', '14. u3 lu ma-at ia-ma-ha-ad#{ki}', '15. u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na]', '$ rest broken', '@reverse', '$ beginning broken', "1'. um#-[...]", "2'. lu#-[...]", "3'. a-[...]", "4'. szum#-[...]", "5'. a-na# [...]", "6'. ma-li# [...]", "7'. u3 u2-hu-ur# [...]", "8'. a-su2-ur-ri [...]", "9'. szu-zi-ba-an#-[ni ...]", "10'. a-na [...]", "11'. pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma]", '@left', '1. {disz}a-bi-sa-mar u2-ul ma-ri u3 bi-ti a-na ' 'la bi-tu#-[tu-ur2-ma]', '2. bi-tum bi-it-ka u3 {disz}a-bi#-[sa]-mar# ma-ru-ka-[ma]']] self.assertEqual(output, goal) def test_call_text(self): """ Tests calling a text. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = cdli.catalog['P254203']['raw_text'] goal = ['@obverse', '1. a-na ia-ah-du-[li-im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar-[ma]', '4. asz-szum sza a-qa-bi-kum la ta-ha-asz2#', '5. a-na ma-ni-im lu-ud-bu-ub', '6. szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub]', '7. szum-ma a-bi-sa-mar te-zi-ir#', '8. u3 a-la#-ni#-ka te-zi-ir-ma#', '9. i-na an-ni-a-tim sza a-da-bu-[bu]', '10. a-na-ku mi-im-ma u2-ul e-le#-[i]', '11. sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz]', '12. u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i]', '13. u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz]', '14. u3 lu ma-at ia-ma-ha-ad#{ki}', '15. u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na]', '$ rest broken', '@reverse', '$ beginning broken', "1'. um#-[...]", "2'. lu#-[...]", "3'. a-[...]", "4'. szum#-[...]", "5'. a-na# [...]", "6'. ma-li# [...]", "7'. u3 u2-hu-ur# [...]", "8'. a-su2-ur-ri [...]", "9'. szu-zi-ba-an#-[ni ...]", "10'. a-na [...]", "11'. pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma]", '@left', '1. {disz}a-bi-sa-mar u2-ul ma-ri u3 bi-ti a-na la bi-tu#-[tu-ur2-ma]', '2. bi-tum bi-it-ka u3 {disz}a-bi#-[sa]-mar# ma-ru-ka-[ma]'] self.assertEqual(output, goal) def test_find_cdli_number(self): """ Tests list_pnums. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = cdli.list_pnums() goal = ['P254202', 'P254203'] self.assertEqual(output, goal) def test_find_edition(self): """ Tests list_editions. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = cdli.list_editions() goal = ['ARM 01, 001', 'ARM 01, 002'] self.assertEqual(output, goal) def test_find_metadata(self): """ Tests calling metadata in a file. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = [cdli.catalog[text]['metadata'] for text in cdli.catalog] goal = [['Primary publication: ARM 01, 001', 'Author(s): Dossin, Georges', 'Publication date: 1946', 'Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0305', 'Collection: National Museum of Syria, Damascus, Syria', 'Museum no.: NMSD —', 'Accession no.:', 'Provenience: Mari (mod. Tell Hariri)', 'Excavation no.:', 'Period: Old Babylonian (ca. 1900-1600 BC)', 'Dates referenced:', 'Object type: tablet', 'Remarks:', 'Material: clay', 'Language: Akkadian', 'Genre: Letter', 'Sub-genre:', 'CDLI comments:', 'Catalogue source: 20050104 cdliadmin', 'ATF source: cdlistaff', 'Translation: Durand, Jean-Marie (fr); Guerra, Dylan M. (en)', 'UCLA Library ARK: 21198/zz001rsp8x', 'Composite no.:', 'Seal no.:', 'CDLI no.: P254202'], ['Primary publication: ARM 01, 002', 'Author(s): Dossin, Georges', 'Publication date: 1946', 'Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0306', 'Collection: National Museum of Syria, Damascus, Syria', 'Museum no.: NMSD —', 'Accession no.:', 'Provenience: Mari (mod. Tell Hariri)', 'Excavation no.:', 'Period: Old Babylonian (ca. 1900-1600 BC)', 'Dates referenced:', 'Object type: tablet', 'Remarks:', 'Material: clay', 'Language: Akkadian', 'Genre: Letter', 'Sub-genre:', 'CDLI comments:', 'Catalogue source: 20050104 cdliadmin', 'ATF source: cdlistaff', 'Translation:', 'UCLA Library ARK: 21198/zz001rsp9f', 'Composite no.:', 'Seal no.:', 'CDLI no.: P254203']] self.assertEqual(output, goal) def test_find_transliteration(self): """ Tests calling transliteration in a file. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = [cdli.catalog[text]['transliteration'] for text in cdli.catalog] goal = [['a-na ia-ah-du-li-[im]', 'qi2-bi2-[ma]', 'um-ma a-bi-sa-mar#-[ma]', 'sa-li-ma-am e-pu-[usz]', 'asz-szum mu-sze-zi-ba-am# [la i-szu]', '[sa]-li#-ma-am sza e-[pu-szu]', '[u2-ul] e-pu-usz sa#-[li-mu-um]', '[u2-ul] sa-[li-mu-um-ma]', 'isz#-tu mu#-[sze-zi-ba-am la i-szu]', 'a-la-nu-ia sza la is,-s,a-ab#-[tu]', 'i-na-an-na is,-s,a-ab-[tu]', 'i-na ne2-kur-ti _lu2_ ha-szi-[im{ki}]', 'ur-si-im{ki} _lu2_ ka-ar-ka#-[mi-is{ki}]', 'u3 ia-am-ha-ad[{ki}]', 'a-la-nu an-nu-tum u2-ul ih-li-qu2#', 'i-na ne2-kur-ti {disz}sa-am-si-{d}iszkur#-ma', 'ih-ta-al-qu2', 'u3 a-la-nu sza ki-ma u2-hu-ru u2-sze-zi-ib#', 'u3 na-pa-asz2-ti u2-ba-li-it,', 'pi2-qa-at ha-s,e-ra#-at', 'asz-szum a-la-nu-ka', 'u3 ma-ru-ka sza-al#-[mu]', '[a-na na-pa]-asz2#-ti-ia i-tu-ur'], ['a-na ia-ah-du-[li-im]', 'qi2-bi2-[ma]', 'um-ma a-bi-sa-mar-[ma]', 'asz-szum sza a-qa-bi-kum la ta-ha-asz2#', 'a-na ma-ni-im lu-ud-bu-ub', 'szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub]', 'szum-ma a-bi-sa-mar te-zi-ir#', 'u3 a-la#-ni#-ka te-zi-ir-ma#', 'i-na an-ni-a-tim sza a-da-bu-[bu]', 'a-na-ku mi-im-ma u2-ul e-le#-[i]', 'sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz]', 'u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i]', 'u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz]', 'u3 lu ma-at ia-ma-ha-ad#{ki}', 'u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na]', 'um#-[...]', 'lu#-[...]', 'a-[...]', 'szum#-[...]', 'a-na# [...]', 'ma-li# [...]', 'u3 u2-hu-ur# [...]', 'a-su2-ur-ri [...]', 'szu-zi-ba-an#-[ni ...]', 'a-na [...]', 'pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma]', '{disz}a-bi-sa-mar u2-ul ma-ri u3 bi-ti a-na la bi-tu#-[tu-ur2-ma]', 'bi-tum bi-it-ka u3 {disz}a-bi#-[sa]-mar# ma-ru-ka-[ma]']] self.assertEqual(output, goal) def test_table_of_contents(self): """ Tests toc. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = cdli.toc() goal = ['Pnum: P254202, Edition: ARM 01, 001, length: 23 line(s)', 'Pnum: P254203, Edition: ARM 01, 002, length: 28 line(s)'] self.assertEqual(output, goal) def test_abnormalities(self): """Tests lines 83, 102, 121-2""" f_i = FileImport(os.path.join(os.path.dirname(__file__), 'two_text_abnormalities.txt')) f_i.read_file() text_file = f_i.file_lines cdli = CDLICorpus() cdli.parse_file(text_file) goal = \ {'P254202': {'edition': 'ARM 01, 001', 'metadata': [], 'normalization': [], 'pnum': 'P254202', 'raw_text': ['@obverse', '1. a-na ia-ah-du-li-[im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar#-[ma]', '4. sa-li-ma-am e-pu-[usz]', '5. asz-szum mu-sze-zi-ba-am# [la i-szu]', '6. [sa]-li#-ma-am sza e-[pu-szu]', '7. [u2-ul] e-pu-usz sa#-[li-mu-um]', '8. [u2-ul] sa-[li-mu-um-ma]', '$ rest broken', '@reverse', '$ beginning broken', "1'. isz#-tu mu#-[sze-zi-ba-am la i-szu]", "2'. a-la-nu-ia sza la is,-s,a-ab#-[tu]", "3'. i-na-an-na is,-s,a-ab-[tu]", "4'. i-na ne2-kur-ti _lu2_ ha-szi-[im{ki}]", "5'. ur-si-im{ki} _lu2_ ka-ar-ka#-[mi-is{ki}]", "6'. u3 ia-am-ha-ad[{ki}]", "7'. a-la-nu an-nu-tum u2-ul ih-li-qu2#", "8'. i-na ne2-kur-ti {disz}sa-am-si-{d}iszkur#-ma", "9'. ih-ta-al-qu2", "10'. u3 a-la-nu sza ki-ma u2-hu-ru u2-sze-zi-ib#", "11'. u3 na-pa-asz2-ti u2-ba-li-it,", "12'. pi2-qa-at ha-s,e-ra#-at", "13'. asz-szum a-la-nu-ka", "14'. u3 ma-ru-ka sza-al#-[mu]", "15'. [a-na na-pa]-asz2#-ti-ia i-tu-ur"], 'translation': [], 'transliteration': ['a-na ia-ah-du-li-[im]', 'qi2-bi2-[ma]', 'um-ma a-bi-sa-mar#-[ma]', 'sa-li-ma-am e-pu-[usz]', 'asz-szum mu-sze-zi-ba-am# [la i-szu]', '[sa]-li#-ma-am sza e-[pu-szu]', '[u2-ul] e-pu-usz sa#-[li-mu-um]', '[u2-ul] sa-[li-mu-um-ma]', 'isz#-tu mu#-[sze-zi-ba-am la i-szu]', 'a-la-nu-ia sza la is,-s,a-ab#-[tu]', 'i-na-an-na is,-s,a-ab-[tu]', 'i-na ne2-kur-ti _lu2_ ha-szi-[im{ki}]', 'ur-si-im{ki} _lu2_ ka-ar-ka#-[mi-is{ki}]', 'u3 ia-am-ha-ad[{ki}]', 'a-la-nu an-nu-tum u2-ul ih-li-qu2#', 'i-na ne2-kur-ti {disz}sa-am-si-{d}iszkur#-ma', 'ih-ta-al-qu2', 'u3 a-la-nu sza ki-ma u2-hu-ru u2-sze-zi-ib#', 'u3 na-pa-asz2-ti u2-ba-li-it,', 'pi2-qa-at ha-s,e-ra#-at', 'asz-szum a-la-nu-ka', 'u3 ma-ru-ka sza-al#-[mu]', '[a-na na-pa]-asz2#-ti-ia i-tu-ur']}, 'P254203': {'edition': '', 'metadata': [], 'normalization': [], 'pnum': 'P254203', 'raw_text': ['@obverse', '1. a-na ia-ah-du-[li-im]', '2. qi2-bi2-[ma]', '3. um-ma a-bi-sa-mar-[ma]', '4. asz-szum sza a-qa-bi-kum la ta-ha-asz2#', '5. a-na ma-ni-im lu-ud-bu-ub', '6. szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub]', '7. szum-ma a-bi-sa-mar te-zi-ir#', '8. u3 a-la#-ni#-ka te-zi-ir-ma#', '9. i-na an-ni-a-tim sza a-da-bu-[bu]', '10. a-na-ku mi-im-ma u2-ul e-le#-[i]', '11. sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz]', '12. u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i]', '13. u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz]', '14. u3 lu ma-at ia-ma-ha-ad#{ki}', '15. u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na]', '$ rest broken', '@reverse', '$ beginning broken', "1'. um#-[...]", "2'. lu#-[...]", "3'. a-[...]", "4'. szum#-[...]", "5'. a-na# [...]", "6'. ma-li# [...]", "7'. u3 u2-hu-ur# [...]", "8'. a-su2-ur-ri [...]", "9'. szu-zi-ba-an#-[ni ...]", "10'. a-na [...]", "11'. pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma]", '@left', '1. {disz}a-bi-sa-mar u2-ul ma-ri u3 ' 'bi-ti a-na la bi-tu#-[tu-ur2-ma]', '2. bi-tum bi-it-ka u3 {disz}a-bi#-[sa]-mar# ma-ru-ka-[ma]'], 'translation': [], 'transliteration': ['a-na ia-ah-du-[li-im]', 'qi2-bi2-[ma]', 'um-ma a-bi-sa-mar-[ma]', 'asz-szum sza a-qa-bi-kum la ta-ha-asz2#', 'a-na ma-ni-im lu-ud-bu-ub', 'szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub]', 'szum-ma a-bi-sa-mar te-zi-ir#', 'u3 a-la#-ni#-ka te-zi-ir-ma#', 'i-na an-ni-a-tim sza a-da-bu-[bu]', 'a-na-ku mi-im-ma u2-ul e-le#-[i]', 'sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz]', 'u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i]', 'u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz]', 'u3 lu ma-at ia-ma-ha-ad#{ki}', 'u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na]', 'um#-[...]', 'lu#-[...]', 'a-[...]', 'szum#-[...]', 'a-na# [...]', 'ma-li# [...]', 'u3 u2-hu-ur# [...]', 'a-su2-ur-ri [...]', 'szu-zi-ba-an#-[ni ...]', 'a-na [...]', 'pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma]', '{disz}a-bi-sa-mar u2-ul ma-ri u3 ' 'bi-ti a-na la bi-tu#-[tu-ur2-ma]', 'bi-tum bi-it-ka u3 ' '{disz}a-bi#-[sa]-mar# ma-ru-ka-[ma]']}} self.assertEqual(cdli.catalog, goal) def test_print_catalog(self): """ Tests _chunk_text. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) output = cdli.print_catalog(catalog_filter=['transliteration']) goal = print(output) self.assertEqual(output, goal) def test_string_tokenizer(self): """ Tests string_tokenizer. """ text = '20. u2-sza-bi-la-kum\n1. a-na ia-as2-ma-ah-{d}iszkur#\n' \ '2. qi2-bi2-ma\n3. um-ma {d}utu-szi-{d}iszkur\n' \ '4. a-bu-ka-a-ma\n5. t,up-pa-[ka] sza#-[tu]-sza-bi-lam esz-me' \ '\n' '6. asz-szum t,e4#-em# {d}utu-illat-su2\n' \ '7. u3 ia#-szu-ub-dingir sza a-na la i-[zu]-zi-im\n' output = TOKENIZER.string_tokenizer(text, include_blanks=False) goal = ['20. u2-sza-bi-la-kum', '1. a-na ia-as2-ma-ah-{d}iszkur', '2. qi2-bi2-ma', '3. um-ma {d}utu-szi-{d}iszkur', '4. a-bu-ka-a-ma', '5. t,up-pa-ka sza-tu-sza-bi-lam esz-me', '6. asz-szum t,e4-em {d}utu-illat-su2', '7. u3 ia-szu-ub-dingir sza a-na la i-zu-zi-im'] self.assertEqual(output, goal) def test_line_tokenizer(self): """ Tests line_tokenizer. """ output = TOKENIZER.line_tokenizer(os.path.join( os.path.dirname(__file__), 'single_text.txt')) goal = ['1. a-na ia-ah-du-li-im', '2. qi2-bi2-ma', '3. um-ma a-bi-sa-mar-ma', '4. sa-li-ma-am e-pu-usz', '5. asz-szum mu-sze-zi-ba-am la i-szu', '6. sa-li-ma-am sza e-pu-szu', '7. u2-ul e-pu-usz sa-li-mu-um', '8. u2-ul sa-li-mu-um-ma', '$ rest broken', '@reverse'] self.assertEqual(output[30:40], goal) def test_markdown_single_text(self): """ Tests markdown_single_text. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) p_p = PrettyPrint() p_p.markdown_single_text(cdli.catalog, 'P254203') output = p_p.markdown_text goal = """ARM 01, 002 P254203 --- ### metadata Primary publication: ARM 01, 002 Author(s): Dossin, Georges Publication date: 1946 Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0306 Collection: National Museum of Syria, Damascus, Syria Museum no.: NMSD — Accession no.: Provenience: Mari (mod. Tell Hariri) Excavation no.: Period: Old Babylonian (ca. 1900-1600 BC) Dates referenced: Object type: tablet Remarks: Material: clay Language: Akkadian Genre: Letter Sub-genre: CDLI comments: Catalogue source: 20050104 cdliadmin ATF source: cdlistaff Translation: UCLA Library ARK: 21198/zz001rsp9f Composite no.: Seal no.: CDLI no.: P254203 ### transliteration a-na ia-ah-du-[li-im] qi2-bi2-[ma] um-ma a-bi-sa-mar-[ma] asz-szum sza a-qa-bi-kum la ta-ha-asz2# a-na ma-ni-im lu-ud-bu-ub szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub] szum-ma a-bi-sa-mar te-zi-ir# u3 a-la#-ni#-ka te-zi-ir-ma# i-na an-ni-a-tim sza a-da-bu-[bu] a-na-ku mi-im-ma u2-ul e-le#-[i] sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz] u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i] u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz] u3 lu ma-at ia-ma-ha-ad#{ki} u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na] um#-[...] lu#-[...] a-[...] szum#-[...] a-na# [...] ma-li# [...] u3 u2-hu-ur# [...] a-su2-ur-ri [...] szu-zi-ba-an#-[ni ...] a-na [...] pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma] {disz}a-bi-sa-mar u2-ul ma-ri u3 bi-ti a-na la bi-tu#-[tu-ur2-ma] bi-tum bi-it-ka u3 {disz}a-bi#-[sa]-mar# ma-ru-ka-[ma] ### normalization ### translation """ self.assertEqual(output, goal) def test_html_print_file(self): """ Tests html_print_file. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) p_p = PrettyPrint() p_p.html_print_file(cdli.catalog, os.path.join(os.path.dirname(__file__), 'html_file.html')) f_o = FileImport(os.path.join(os.path.dirname(__file__), 'html_file.html')) f_o.read_file() output = f_o.raw_file goal = \ """<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>ARM 01, 001</title> </head> <body><table cellpadding="10"; border="1"> <tr><th> <h2>ARM 01, 001<br>P254202</h2> </th><th> <h3>transliteration</h3> </th><th> <h3>normalization</h3> </th><th> <h3>translation</h3> </tr><tr><td> Primary publication: ARM 01, 001<br> Author(s): Dossin, Georges<br> Publication date: 1946<br> Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0305<br> Collection: National Museum of Syria, Damascus, Syria<br> Museum no.: NMSD —<br> Accession no.:<br> Provenience: Mari (mod. Tell Hariri)<br> Excavation no.:<br> Period: Old Babylonian (ca. 1900-1600 BC)<br> Dates referenced:<br> Object type: tablet<br> Remarks:<br> Material: clay<br> Language: Akkadian<br> Genre: Letter<br> Sub-genre:<br> CDLI comments:<br> Catalogue source: 20050104 cdliadmin<br> ATF source: cdlistaff<br> Translation: Durand, Jean-Marie (fr); Guerra, Dylan M. (en)<br> UCLA Library ARK: 21198/zz001rsp8x<br> Composite no.:<br> Seal no.:<br> CDLI no.: P254202</td><td> <p>a-na ia-ah-du-li-[im]<br> qi2-bi2-[ma]<br> um-ma a-bi-sa-mar#-[ma]<br> sa-li-ma-am e-pu-[usz]<br> asz-szum mu-sze-zi-ba-am# [la i-szu]<br> [sa]-li#-ma-am sza e-[pu-szu]<br> [u2-ul] e-pu-usz sa#-[li-mu-um]<br> [u2-ul] sa-[li-mu-um-ma]<br> isz#-tu mu#-[sze-zi-ba-am la i-szu]<br> a-la-nu-ia sza la is,-s,a-ab#-[tu]<br> i-na-an-na is,-s,a-ab-[tu]<br> i-na ne2-kur-ti _lu2_ ha-szi-[im{ki}]<br> ur-si-im{ki} _lu2_ ka-ar-ka#-[mi-is{ki}]<br> u3 ia-am-ha-ad[{ki}]<br> a-la-nu an-nu-tum u2-ul ih-li-qu2#<br> i-na ne2-kur-ti {disz}sa-am-si-{d}iszkur#-ma<br> ih-ta-al-qu2<br> u3 a-la-nu sza ki-ma u2-hu-ru u2-sze-zi-ib#<br> u3 na-pa-asz2-ti u2-ba-li-it,<br> pi2-qa-at ha-s,e-ra#-at<br> asz-szum a-la-nu-ka<br> u3 ma-ru-ka sza-al#-[mu]<br> [a-na na-pa]-asz2#-ti-ia i-tu-ur </td><td> <p> </td><td> <font size='2'> </font></td></tr> </table> <br> </body> </html><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>ARM 01, 002</title> </head> <body><table cellpadding="10"; border="1"> <tr><th> <h2>ARM 01, 002<br>P254203</h2> </th><th> <h3>transliteration</h3> </th><th> <h3>normalization</h3> </th><th> <h3>translation</h3> </tr><tr><td> Primary publication: ARM 01, 002<br> Author(s): Dossin, Georges<br> Publication date: 1946<br> Secondary publication(s): Durand, Jean-Marie, LAPO 16, 0306<br> Collection: National Museum of Syria, Damascus, Syria<br> Museum no.: NMSD —<br> Accession no.:<br> Provenience: Mari (mod. Tell Hariri)<br> Excavation no.:<br> Period: Old Babylonian (ca. 1900-1600 BC)<br> Dates referenced:<br> Object type: tablet<br> Remarks:<br> Material: clay<br> Language: Akkadian<br> Genre: Letter<br> Sub-genre:<br> CDLI comments:<br> Catalogue source: 20050104 cdliadmin<br> ATF source: cdlistaff<br> Translation:<br> UCLA Library ARK: 21198/zz001rsp9f<br> Composite no.:<br> Seal no.:<br> CDLI no.: P254203</td><td> <p>a-na ia-ah-du-[li-im]<br> qi2-bi2-[ma]<br> um-ma a-bi-sa-mar-[ma]<br> asz-szum sza a-qa-bi-kum la ta-ha-asz2#<br> a-na ma-ni-im lu-ud-bu-ub<br> szum-ma a-na?-<ku> a-na a-bi-ia la ad#-[bu-ub]<br> szum-ma a-bi-sa-mar te-zi-ir#<br> u3 a-la#-ni#-ka te-zi-ir-ma#<br> i-na an-ni-a-tim sza a-da-bu-[bu]<br> a-na-ku mi-im-ma u2-ul e-le#-[i]<br> sza sza-ru-ti-ka u3 sza ra-pa#-[szi-ka e-pu-usz]<br> u3 lu-u2 sza sza-ru-ut-ka u2-ul te-le#-[i]<br> u3 lu-u2 sza ra-pa-szi-ka [te-ep-pe2-esz]<br> u3 lu ma-at ia-ma-ha-ad#{ki}<br> u3# lu# _u4 8(disz)-kam_ isz-tu [i-na-an-na]<br> um#-[...]<br> lu#-[...]<br> a-[...]<br> szum#-[...]<br> a-na# [...]<br> ma-li# [...]<br> u3 u2-hu-ur# [...]<br> a-su2-ur-ri [...]<br> szu-zi-ba-an#-[ni ...]<br> a-na [...]<br> pi2-qa-at ta-qa-ab#-[bi um-ma at-ta-a-ma]<br> {disz}a-bi-sa-mar u2-ul ma-ri u3 bi-ti a-na la bi-tu#-[tu-ur2-ma]<br> bi-tum bi-it-ka u3 {disz}a-bi#-[sa]-mar# ma-ru-ka-[ma] </td><td> <p> </td><td> <font size='2'> </font></td></tr> </table> <br> </body> </html>""" self.assertEqual(output, goal) def test_html_print_single_text(self): """ Tests html_print_single_text. """ cdli = CDLICorpus() cdli.parse_file(SAMPLE_TEXT) p_p = PrettyPrint() p_p.html_print_single_text(cdli.catalog, 'P500444', os.path.join(os.path.dirname(__file__), 'html_single_text.html')) f_o = FileImport(os.path.join(os.path.dirname(__file__), 'html_single_text.html')) f_o.read_file() output = f_o.raw_file goal = \ """<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>NABU 2017/015</title> </head> <body><table cellpadding="10"; border="1"> <tr><th> <h2>NABU 2017/015<br>P500444</h2> </th><th> <h3>transliteration</h3> </th><th> <h3>normalization</h3> </th><th> <h3>translation</h3> </tr><tr><td> </td><td> <p>a-na {d}nin-urta<br> be-li2 ra-bi-i<br> be-li2-szu<br> ka-dasz2-man-{d}en-lil2<br> _lugal_ babila2{ki}<br> _dumu_ ka-dasz2-man-tur2-gu _lugal_<br> a-na szu-ru-uk _bala_-szu<br> i-qi2-isz </td><td> <p>ana ninurta<br> bēli rabî<br> bēlišu<br> kadašman-enlil<br> šar bābili<br> mār kadašman-turgu šarri<br> ana šūruk palîšu<br> iqīš </td><td> <font size='2'> For Ninurta,<br> the great lord,<br> his lord,<br> did Kadašman-Enlil,<br> king of Babylon,<br> son of Kadašman-Turgu, the king,<br> for the lengthening of his reign<br> offer (this seal). </font></td></tr> </table> <br> </body> </html>""" self.assertEqual(output, goal) if __name__ == '__main__': unittest.main()
39.036463
100
0.444551
5,941
42,823
3.161757
0.082646
0.013575
0.010647
0.017036
0.83981
0.823999
0.809093
0.797966
0.774808
0.760275
0
0.050578
0.35962
42,823
1,096
101
39.07208
0.63403
0.017934
0
0.737235
0
0.122042
0.483346
0.018297
0
0
0
0
0.023661
1
0.023661
false
0
0.014944
0
0.041096
0.011208
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
1373cf6a90b58826d58073631d1b7d65da258441
764
py
Python
argchecker/__init__.py
wenbobuaa/pykit
43e38fe40297a1e7a9329bcf3db3554c7ca48ead
[ "MIT" ]
13
2016-12-16T09:23:09.000Z
2018-03-10T08:04:00.000Z
argchecker/__init__.py
wenbobuaa/pykit
43e38fe40297a1e7a9329bcf3db3554c7ca48ead
[ "MIT" ]
74
2017-03-23T11:36:22.000Z
2018-04-02T06:19:09.000Z
argchecker/__init__.py
drmingdrmer/pykit
e25a71146e81aaf79625cf8d4f4c439ccd515b82
[ "MIT" ]
5
2016-12-27T07:30:47.000Z
2018-03-10T07:06:21.000Z
from .checker import ( InvalidArgumentError, InvalidLengthError, InvalidSchemaError, InvalidTypeError, InvalidValueError, LackArgumentError, NotInEnumError, OutOfRangeError, PatternNotMatchError, SchemaCheckerError, SchemaNotFoundError, UnexpectedArgumentError, check_arguments, read_schema, validate_schema, ) __all__ = [ "InvalidArgumentError", "InvalidLengthError", "InvalidSchemaError", "InvalidTypeError", "InvalidValueError", "LackArgumentError", "NotInEnumError", "OutOfRangeError", "PatternNotMatchError", "SchemaCheckerError", "SchemaNotFoundError", "UnexpectedArgumentError", "check_arguments", "read_schema", "validate_schema", ]
20.105263
30
0.701571
40
764
13.15
0.525
0.144487
0.212928
0.273764
0.961977
0.961977
0.961977
0.961977
0.961977
0.961977
0
0
0.212042
764
37
31
20.648649
0.873754
0
0
0
0
0
0.335079
0.030105
0
0
0
0
0
1
0
false
0
0.029412
0
0.029412
0
0
0
1
null
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
9
137ef24c86ce568a10ca0c08c2cd927474ea2eeb
10,544
py
Python
monitor/filegenerator.py
darkwizard242/sys-mon
9b46758ca6ed6384bcb3c6c0ecb19336ba1759ef
[ "BSD-2-Clause" ]
1
2018-10-09T05:10:27.000Z
2018-10-09T05:10:27.000Z
monitor/filegenerator.py
darkwizard242/sys-mon
9b46758ca6ed6384bcb3c6c0ecb19336ba1759ef
[ "BSD-2-Clause" ]
null
null
null
monitor/filegenerator.py
darkwizard242/sys-mon
9b46758ca6ed6384bcb3c6c0ecb19336ba1759ef
[ "BSD-2-Clause" ]
null
null
null
#! /usr/bin/env python3 import datetime import os import monitor.varslist as v import monitor.archiver as arch def fetch_time(): """ This function imports the current time details for both date and time. strftime() method from datetime module allows displaying the date & time in string format. strftime()strings Meaning %Y YEAR will be displayed as the century i.e. '2018' %y YEAR will be displayed without the century i.e. '18' %m MONTH will be displayed as decimal number from '01' to '12' %B MONTH will be displayed with full name i.e. 'August' %b MONTH will be displayed in abbreviated form i.e. 'Aug' %d DAY of the MONTH will be displayed in numeric form i.e. from '01' to '31' %j DAY of the YEAR will be displayed in numeric form i.e. from '001' to '366' %w DAY of the WEEK will be displayed in numeric form i.e. from '0'(Sunday) to '6'(Saturday). %A DAY of the WEEK will be displayed in alphabetic form i.e. 'Sunday' %a DAY of the WEEK will be displayed in abbreviated form i.e. 'Sun' %H HOUR will be displayed in 24 hours clock numeric form i.e. '00' to '23'. %I HOUR will be displayed in 12 hours clock numeric form i.e. '01' to '12'. %M MINUTES will be displayed in numeric form i.e. '00' to '59'. %S SECONDS will be displayed in numeric form i.e. '00' to '59'. %p HOUR MERIDIEM will be displayed in alphabetic form i.e. 'AM' or 'PM'. For both date and time outputs, format can be re-arranged by modifying the custom string. Date can be printed in numerical or alphanumerics values. Day is printed with an alphabetical value. Time is also printed in numeric format starting with HOUR:MINUTES:SECONDS :return: str """ def win_folder(): """ IF Statement verifies whether the directory specified against variable 'win_dir' exists or not. IF exists, then generate a couple of print statements. use of os functions for opening (or creating a file if it doesn't exist) based on the value of v.win_report_file_explicit. Prints the threshold limit set by the user. Prints the current RAM limit i.e. the exceeded limit. Nested IF/ELSE verifies what the data measurement type variable's value is & depending on that performs the following: 1. Prints Total RAM. 2. Prints Current Used RAM. 3. Prints Current Free RAM. Else, creates the directory and then generates a couple of print statements followed by the following actions: use of os functions for opening (or creating a file if it doesn't exist) based on the value of v.win_report_file_explicit. Prints the threshold limit set by the user. Prints the current RAM limit i.e. the exceeded limit. Nested IF/ELSE verifies what the data measurement type variable's value is & depending on that performs the following: 1. Prints Total RAM. 2. Prints Current Used RAM. 3. Prints Current Free RAM. :return: """ if os.path.exists(v.win_dir): print('Directory where reports are generated already exists. No new directory will be created.') print('Report Generation directory path is: ' + v.win_dir) print('Generated Report file is: ' + str(v.win_report_file_explicit)) thewriter = open(v.win_report_file, 'a') thewriter.write(v.incident_record) thewriter.write('\nDirectory is: ' + v.win_dir) thewriter.write('\nIncident Date: ' + v.d_date_report_input) thewriter.write('\nIncident Time of record: ' + v.d_time_report_input) thewriter.write('\nRAM usage has exceeded the specified threshold, which is: ' + str(v.threshold) + '%') thewriter.write('\nExceeded RAM record usage is: ' + str(v.ram_percentage) + '%') if v.data_measure == v.kilobyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_kb_total) + ' KBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_kb_used) + ' KBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_kb_free) + ' KBs') elif v.data_measure == v.megabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_mb_total) + ' MBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_mb_used) + ' MBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_mb_free) + ' MBs') elif v.data_measure == v.gigabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_gb_total) + ' GBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_gb_used) + ' GBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_gb_free) + ' GBs') else: print("Please correct the data_measurement variable value in varslist.") else: print('Directory where reports are generated does not exist and will now be created.') os.makedirs(v.win_dir, exist_ok=True) print('Report Generation directory has been created on: ' + v.win_dir) print('Generated Report file is: ' + str(v.win_report_file_explicit)) thewriter = open(v.win_report_file, 'a') thewriter.write(v.incident_record) thewriter.write('\nDirectory is: ' + v.win_dir) thewriter.write('\nIncident Date: ' + v.d_date_report_input) thewriter.write('\nIncident Time of record: ' + v.d_time_report_input) thewriter.write('\nRAM usage has exceeded the specified threshold, which is: ' + str(v.threshold) + '%') thewriter.write('\nExceeded RAM record usage is: ' + str(v.ram_percentage) + '%') if v.data_measure == v.kilobyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_kb_total) + ' KBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_kb_used) + ' KBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_kb_free) + ' KBs') elif v.data_measure == v.megabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_mb_total) + ' MBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_mb_used) + ' MBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_mb_free) + ' MBs') elif v.data_measure == v.gigabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_gb_total) + ' GBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_gb_used) + ' GBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_gb_free) + ' GBs') else: print("Please correct the data_measurement variable value in varslist.") def linux_folder(): if os.path.exists(v.nix_dir): print('Directory where reports are generated already exists. No new directory will be created.') print('Report Generation directory path is: ' + v.nix_dir) print('Generated Report file is: ' + str(v.nix_report_file_explicit)) thewriter = open(v.nix_report_file, 'a') thewriter.write(v.incident_record) thewriter.write('\nDirectory is: ' + v.nix_dir) thewriter.write('\nIncident Date: ' + v.d_date_report_input) thewriter.write('\nIncident Time of record: ' + v.d_time_report_input) thewriter.write('\nRAM usage has exceeded the specified threshold, which is: ' + str(v.threshold) + '%') thewriter.write('\nExceeded RAM record usage is: ' + str(v.ram_percentage) + '%') if v.data_measure == v.kilobyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_kb_total) + ' KBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_kb_used) + ' KBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_kb_free) + ' KBs') elif v.data_measure == v.megabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_mb_total) + ' MBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_mb_used) + ' MBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_mb_free) + ' MBs') elif v.data_measure == v.gigabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_gb_total) + ' GBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_gb_used) + ' GBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_gb_free) + ' GBs') else: print("Please correct the data_measurement variable value in varslist.") else: print('Directory where reports are generated does not exist and will now be created.') os.makedirs(v.nix_dir, exist_ok=True) print('Report Generation directory has been created on: ' + v.nix_dir) print('Generated Report file is: ' + str(v.nix_report_file_explicit)) thewriter = open(v.nix_report_file, 'a') thewriter.write(v.incident_record) thewriter.write('\nDirectory is: ' + v.nix_dir) thewriter.write('\nIncident Date: ' + v.d_date_report_input) thewriter.write('\nIncident Time of record: ' + v.d_time_report_input) thewriter.write('\nRAM usage has exceeded the specified threshold, which is: ' + str(v.threshold) + '%') thewriter.write('\nExceeded RAM record usage is: ' + str(v.ram_percentage) + '%') if v.data_measure == v.kilobyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_kb_total) + ' KBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_kb_used) + ' KBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_kb_free) + ' KBs') elif v.data_measure == v.megabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_mb_total) + ' MBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_mb_used) + ' MBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_mb_free) + ' MBs') elif v.data_measure == v.gigabyte: thewriter.write('\nTotal RAM is: ' + str(v.memory_gb_total) + ' GBs') thewriter.write('\nUsed RAM recorded: ' + str(v.memory_gb_used) + ' GBs') thewriter.write('\nFree RAM recorded: ' + str(v.memory_gb_free) + ' GBs') else: print("Please correct the data_measurement variable value in varslist.")
58.577778
117
0.625759
1,443
10,544
4.458766
0.154539
0.130556
0.055953
0.055953
0.863848
0.828412
0.82064
0.82064
0.803233
0.778054
0
0.00631
0.263467
10,544
179
118
58.905028
0.822174
0.289169
0
0.862385
0
0
0.317608
0
0
0
0
0
0
1
0.027523
false
0
0.036697
0
0.06422
0.146789
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
13986363666858f575aacab56216c765eed586c7
10,509
py
Python
tests/unit/modules/linux_acl_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
3
2015-04-16T18:42:35.000Z
2017-10-30T16:57:49.000Z
tests/unit/modules/linux_acl_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
16
2015-11-18T00:44:03.000Z
2018-10-29T20:48:27.000Z
tests/unit/modules/linux_acl_test.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
1
2019-08-01T15:14:19.000Z
2019-08-01T15:14:19.000Z
# -*- coding: utf-8 -*- # Import Pytohn libs from __future__ import absolute_import # Import Salt Testing libs from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, MagicMock ensure_in_syspath('../../') # Import salt libs from salt.modules import linux_acl from salt.exceptions import CommandExecutionError @skipIf(NO_MOCK, NO_MOCK_REASON) class LinuxAclTestCase(TestCase): def setUp(self): linux_acl.__salt__ = {'cmd.run': MagicMock()} self.cmdrun = linux_acl.__salt__['cmd.run'] self.file = '/tmp/file' self.files = ['/tmp/file1', '/tmp/file2'] self.u_acl = ['u', 'myuser', 'rwx'] self.user_acl = ['user', 'myuser', 'rwx'] self.user_acl_cmd = 'u:myuser:rwx' self.g_acl = ['g', 'mygroup', 'rwx'] self.group_acl = ['group', 'mygroup', 'rwx'] self.group_acl_cmd = 'g:mygroup:rwx' self.d_u_acl = ['d:u', 'myuser', 'rwx'] self.d_user_acl = ['d:user', 'myuser', 'rwx'] self.default_user_acl = ['d:user', 'myuser', 'rwx'] self.default_user_acl_cmd = 'd:u:myuser:rwx' # too easy to test (DRY) def test_version(self): pass def test_getfacl_wo_args(self): self.assertRaises(CommandExecutionError, linux_acl.getfacl) def test_getfacl_w_single_arg(self): linux_acl.getfacl(self.file) self.cmdrun.assert_called_once_with('getfacl --absolute-names ' + self.file, python_shell=False) def test_getfacl_w_multiple_args(self): linux_acl.getfacl(*self.files) self.cmdrun.assert_called_once_with('getfacl --absolute-names ' + ' '.join(self.files), python_shell=False) def test_getfacl__recursive_w_multiple_args(self): linux_acl.getfacl(*self.files, recursive=True) self.cmdrun.assert_called_once_with('getfacl --absolute-names -R ' + ' '.join(self.files), python_shell=False) def test_wipefacls_wo_args(self): self.assertRaises(CommandExecutionError, linux_acl.wipefacls) def test_wipefacls_w_single_arg(self): linux_acl.wipefacls(self.file) self.cmdrun.assert_called_once_with('setfacl -b ' + self.file, python_shell=False) def test_wipefacls_w_multiple_args(self): linux_acl.wipefacls(*self.files) self.cmdrun.assert_called_once_with('setfacl -b ' + ' '.join(self.files), python_shell=False) def test_wipefacls__recursive_w_multiple_args(self): linux_acl.wipefacls(*self.files, recursive=True) self.cmdrun.assert_called_once_with('setfacl -b -R ' + ' '.join(self.files), python_shell=False) def test_modfacl_wo_args(self): for acl in [self.u_acl, self.user_acl, self.g_acl, self.group_acl]: self.assertRaises(CommandExecutionError, linux_acl.modfacl, *acl) def test_modfacl__u_w_single_arg(self): linux_acl.modfacl(*(self.u_acl + [self.file])) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.user_acl_cmd, self.file]), python_shell=False) def test_modfacl__u_w_multiple_args(self): linux_acl.modfacl(*(self.u_acl + self.files)) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.user_acl_cmd] + self.files), python_shell=False) def test_modfacl__user_w_single_arg(self): linux_acl.modfacl(*(self.user_acl + [self.file])) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.user_acl_cmd, self.file]), python_shell=False) def test_modfacl__user_w_multiple_args(self): linux_acl.modfacl(*(self.user_acl + self.files)) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.user_acl_cmd] + self.files), python_shell=False) def test_modfacl__g_w_single_arg(self): linux_acl.modfacl(*(self.g_acl + [self.file])) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.group_acl_cmd, self.file]), python_shell=False) def test_modfacl__g_w_multiple_args(self): linux_acl.modfacl(*(self.g_acl + self.files)) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.group_acl_cmd] + self.files), python_shell=False) def test_modfacl__group_w_single_arg(self): linux_acl.modfacl(*(self.group_acl + [self.file])) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.group_acl_cmd, self.file]), python_shell=False) def test_modfacl__group_w_multiple_args(self): linux_acl.modfacl(*(self.group_acl + self.files)) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.group_acl_cmd] + self.files), python_shell=False) def test_modfacl__d_u_w_single_arg(self): linux_acl.modfacl(*(self.d_u_acl + [self.file])) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.default_user_acl_cmd, self.file]), python_shell=False) def test_modfacl__d_u_w_multiple_args(self): linux_acl.modfacl(*(self.d_u_acl + self.files)) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.default_user_acl_cmd] + self.files), python_shell=False) def test_modfacl__d_user_w_single_arg(self): linux_acl.modfacl(*(self.d_user_acl + [self.file])) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.default_user_acl_cmd, self.file]), python_shell=False) def test_modfacl__d_user_w_multiple_args(self): linux_acl.modfacl(*(self.d_user_acl + self.files)) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.default_user_acl_cmd] + self.files), python_shell=False) def test_modfacl__default_user_w_single_arg(self): linux_acl.modfacl(*(self.default_user_acl + [self.file])) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.default_user_acl_cmd, self.file]), python_shell=False) def test_modfacl__default_user_w_multiple_args(self): linux_acl.modfacl(*(self.default_user_acl + self.files)) self.cmdrun.assert_called_once_with('setfacl -m ' + ' '.join([self.default_user_acl_cmd] + self.files), python_shell=False) def test_modfacl__recursive_w_multiple_args(self): linux_acl.modfacl(*(self.user_acl + self.files), recursive=True) self.cmdrun.assert_called_once_with('setfacl -R -m ' + ' '.join([self.user_acl_cmd] + self.files), python_shell=False) def test_delfacl_wo_args(self): for acl in [self.u_acl, self.user_acl, self.g_acl, self.group_acl]: self.assertRaises(CommandExecutionError, linux_acl.delfacl, *acl[:-1]) def test_delfacl__u_w_single_arg(self): linux_acl.delfacl(*(self.u_acl[:-1] + [self.file])) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.user_acl_cmd.rpartition(':')[0], self.file]), python_shell=False) def test_delfacl__u_w_multiple_args(self): linux_acl.delfacl(*(self.u_acl[:-1] + self.files)) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.user_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False) def test_delfacl__user_w_single_arg(self): linux_acl.delfacl(*(self.user_acl[:-1] + [self.file])) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.user_acl_cmd.rpartition(':')[0], self.file]), python_shell=False) def test_delfacl__user_w_multiple_args(self): linux_acl.delfacl(*(self.user_acl[:-1] + self.files)) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.user_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False) def test_delfacl__g_w_single_arg(self): linux_acl.delfacl(*(self.g_acl[:-1] + [self.file])) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.group_acl_cmd.rpartition(':')[0], self.file]), python_shell=False) def test_delfacl__g_w_multiple_args(self): linux_acl.delfacl(*(self.g_acl[:-1] + self.files)) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.group_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False) def test_delfacl__group_w_single_arg(self): linux_acl.delfacl(*(self.group_acl[:-1] + [self.file])) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.group_acl_cmd.rpartition(':')[0], self.file]), python_shell=False) def test_delfacl__group_w_multiple_args(self): linux_acl.delfacl(*(self.group_acl[:-1] + self.files)) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.group_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False) def test_delfacl__d_u_w_single_arg(self): linux_acl.delfacl(*(self.d_u_acl[:-1] + [self.file])) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.default_user_acl_cmd.rpartition(':')[0], self.file]), python_shell=False) def test_delfacl__d_u_w_multiple_args(self): linux_acl.delfacl(*(self.d_u_acl[:-1] + self.files)) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.default_user_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False) def test_delfacl__d_user_w_single_arg(self): linux_acl.delfacl(*(self.d_user_acl[:-1] + [self.file])) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.default_user_acl_cmd.rpartition(':')[0], self.file]), python_shell=False) def test_delfacl__d_user_w_multiple_args(self): linux_acl.delfacl(*(self.d_user_acl[:-1] + self.files)) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.default_user_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False) def test_delfacl__default_user_w_single_arg(self): linux_acl.delfacl(*(self.default_user_acl[:-1] + [self.file])) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.default_user_acl_cmd.rpartition(':')[0], self.file]), python_shell=False) def test_delfacl__default_user_w_multiple_args(self): linux_acl.delfacl(*(self.default_user_acl[:-1] + self.files)) self.cmdrun.assert_called_once_with('setfacl -x ' + ' '.join([self.default_user_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False) def test_delfacl__recursive_w_multiple_args(self): linux_acl.delfacl(*(self.default_user_acl[:-1] + self.files), recursive=True) self.cmdrun.assert_called_once_with('setfacl -x -R ' + ' '.join([self.default_user_acl_cmd.rpartition(':')[0]] + self.files), python_shell=False)
53.345178
153
0.699305
1,525
10,509
4.436066
0.057049
0.05085
0.065632
0.117073
0.909978
0.87997
0.870067
0.85558
0.797635
0.621877
0
0.003814
0.15168
10,509
196
154
53.617347
0.75502
0.009991
0
0.208333
0
0
0.065205
0
0
0
0
0
0.277778
1
0.291667
false
0.006944
0.041667
0
0.340278
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
139d0632deaffcd4e836660b38d1d31d51813764
7,086
py
Python
src/backend/aspen/app/views/tests/test_phylo_runs.py
chanzuckerberg/covidr
afe05d703d30ec18ac83944bfb551c313cb216c4
[ "MIT" ]
2
2021-01-13T18:37:20.000Z
2021-01-16T02:17:38.000Z
src/backend/aspen/app/views/tests/test_phylo_runs.py
chanzuckerberg/covidr
afe05d703d30ec18ac83944bfb551c313cb216c4
[ "MIT" ]
16
2021-01-14T20:21:13.000Z
2021-01-29T22:23:13.000Z
src/backend/aspen/app/views/tests/test_phylo_runs.py
chanzuckerberg/covidr
afe05d703d30ec18ac83944bfb551c313cb216c4
[ "MIT" ]
null
null
null
from aspen.test_infra.models.gisaid_metadata import gisaid_metadata_factory from aspen.test_infra.models.sample import sample_factory from aspen.test_infra.models.sequences import uploaded_pathogen_genome_factory from aspen.test_infra.models.usergroup import group_factory, user_factory from aspen.test_infra.models.workflow import aligned_gisaid_dump_factory def test_create_phylo_run( session, app, client, ): """ Test phylo tree creation, local-only samples. """ group = group_factory() user = user_factory(group) sample = sample_factory(group, user) gisaid_dump = aligned_gisaid_dump_factory() uploaded_pathogen_genome_factory(sample, sequence="ATGCAAAAAA") session.add(group) session.add(gisaid_dump) session.commit() with client.session_transaction() as sess: sess["profile"] = {"name": user.name, "user_id": user.auth0_user_id} data = { "name": "test phylorun", "tree_type": "targeted", "samples": [sample.public_identifier], } res = client.post("/api/phylo_runs", json=data) assert res.status == "200 OK" response = res.json template_args = response["template_args"] assert template_args["division"] == group.division assert template_args["location"] == group.location assert "targeted.yaml" in response["template_file_path"] assert response["workflow_status"] == "STARTED" assert response["group"]["name"] == group.name assert "id" in response def test_create_phylo_run_with_gisaid_ids( session, app, client, ): """ Test phylo tree creation that includes a reference to a GISAID sequence. """ group = group_factory() user = user_factory(group) sample = sample_factory(group, user) uploaded_pathogen_genome_factory(sample, sequence="ATGCAAAAAA") gisaid_dump = aligned_gisaid_dump_factory() gisaid_sample = gisaid_metadata_factory() session.add(group) session.add(gisaid_dump) session.add(gisaid_sample) session.commit() with client.session_transaction() as sess: sess["profile"] = {"name": user.name, "user_id": user.auth0_user_id} data = { "name": "test phylorun", "tree_type": "non_contextualized", "samples": [sample.public_identifier, gisaid_sample.strain], } res = client.post("/api/phylo_runs", json=data) assert res.status == "200 OK" response = res.json template_args = response["template_args"] assert template_args["division"] == group.division assert template_args["location"] == group.location assert "non_contextualized.yaml" in response["template_file_path"] assert response["workflow_status"] == "STARTED" assert response["group"]["name"] == group.name assert "id" in response def test_create_invalid_phylo_run_name( session, app, client, ): """ Test a phylo tree run request with a bad tree name. """ group = group_factory() user = user_factory(group) sample = sample_factory(group, user) gisaid_dump = aligned_gisaid_dump_factory() uploaded_pathogen_genome_factory(sample, sequence="ATGCAAAAAA") session.add(group) session.add(gisaid_dump) session.commit() with client.session_transaction() as sess: sess["profile"] = {"name": user.name, "user_id": user.auth0_user_id} data = { "name": 3.1415926535, "tree_type": "targeted", "samples": [sample.public_identifier], } res = client.post("/api/phylo_runs", json=data) assert res.status == "400 BAD REQUEST" def test_create_invalid_phylo_run_tree_type( session, app, client, ): """ Test a phylo tree run request with a bad tree type. """ group = group_factory() user = user_factory(group) sample = sample_factory(group, user) gisaid_dump = aligned_gisaid_dump_factory() uploaded_pathogen_genome_factory(sample, sequence="ATGCAAAAAA") session.add(group) session.add(gisaid_dump) session.commit() with client.session_transaction() as sess: sess["profile"] = {"name": user.name, "user_id": user.auth0_user_id} data = { "name": "test phylorun", "tree_type": "global", "samples": [sample.public_identifier], } res = client.post("/api/phylo_runs", json=data) assert res.status == "400 BAD REQUEST" def test_create_invalid_phylo_run_bad_sample_id( session, app, client, ): """ Test a phylo tree run request with a bad sample id. """ group = group_factory() user = user_factory(group) sample = sample_factory(group, user) gisaid_dump = aligned_gisaid_dump_factory() uploaded_pathogen_genome_factory(sample, sequence="ATGCAAAAAA") session.add(group) session.add(gisaid_dump) session.commit() with client.session_transaction() as sess: sess["profile"] = {"name": user.name, "user_id": user.auth0_user_id} data = { "name": "test phylorun", "tree_type": "non_contextualized", "samples": [sample.public_identifier, "bad_sample_identifier"], } res = client.post("/api/phylo_runs", json=data) assert res.status == "400 BAD REQUEST" def test_create_invalid_phylo_run_sample_cannot_see( session, app, client, ): """ Test a phylo tree run request with a sample a group should not have access to. """ group = group_factory() user = user_factory(group) sample = sample_factory(group, user) group2 = group_factory(name="The Other Group") user2 = user_factory( group2, email="test_user@othergroup.org", auth0_user_id="other_test_auth0_id" ) sample2 = sample_factory(group2, user2, public_identifier="USA/OTHER/123456") gisaid_dump = aligned_gisaid_dump_factory() uploaded_pathogen_genome_factory(sample, sequence="ATGCAAAAAA") session.add(group) session.add(group2) session.add(gisaid_dump) session.commit() with client.session_transaction() as sess: sess["profile"] = {"name": user.name, "user_id": user.auth0_user_id} data = { "name": "test phylorun", "tree_type": "non_contextualized", "samples": [sample.public_identifier, sample2.public_identifier], } res = client.post("/api/phylo_runs", json=data) assert res.status == "400 BAD REQUEST" def test_create_phylo_run_unauthorized_access_redirect( session, app, client, ): """ Test a request from an outside, unauthorized source. """ group = group_factory() user = user_factory(group) sample = sample_factory(group, user) gisaid_dump = aligned_gisaid_dump_factory() uploaded_pathogen_genome_factory(sample, sequence="ATGCAAAAAA") session.add(group) session.add(gisaid_dump) session.commit() data = { "name": "test phylorun", "tree_type": "non_contextualized", "samples": [sample.public_identifier], } res = client.post("/api/phylo_runs", json=data) assert res.status == "302 FOUND" assert "/login" in res.location
31.078947
85
0.679227
866
7,086
5.308314
0.125866
0.047857
0.038286
0.050468
0.845551
0.827714
0.79008
0.762454
0.753317
0.753317
0
0.009568
0.2035
7,086
227
86
31.215859
0.804926
0.057296
0
0.802198
0
0
0.148007
0.010344
0
0
0
0
0.10989
1
0.038462
false
0
0.027473
0
0.065934
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
b92955bb7ca8af6382f548f31c18496a7fb3fbc6
20,333
py
Python
dfirtrack_main/tests/note/test_note_views.py
stuhli/dfirtrack
9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e
[ "Apache-2.0" ]
273
2018-04-18T22:09:15.000Z
2021-06-04T09:15:48.000Z
dfirtrack_main/tests/note/test_note_views.py
stuhli/dfirtrack
9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e
[ "Apache-2.0" ]
75
2018-08-31T11:05:37.000Z
2021-06-08T14:15:07.000Z
dfirtrack_main/tests/note/test_note_views.py
stuhli/dfirtrack
9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e
[ "Apache-2.0" ]
61
2018-11-12T22:55:48.000Z
2021-06-06T15:16:16.000Z
import urllib.parse from django.contrib.auth.models import User from django.test import TestCase from dfirtrack_main.models import ( Case, Casepriority, Casestatus, Note, Notestatus, Tag, Tagcolor, ) class NoteViewTestCase(TestCase): """note view tests""" @classmethod def setUpTestData(cls): # create user test_user = User.objects.create_user( username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21' ) # create object notestatus_1 = Notestatus.objects.create(notestatus_name='notestatus_1') # create object Note.objects.create( note_title='note_1', note_content='lorem ipsum', notestatus=notestatus_1, note_created_by_user_id=test_user, note_modified_by_user_id=test_user, ) # create object tagcolor_1 = Tagcolor.objects.create(tagcolor_name='tagcolor_1') # create object Tag.objects.create(tag_name='tag_1', tagcolor=tagcolor_1) # create objects casepriority_1 = Casepriority.objects.create(casepriority_name='casepriority_1') casestatus_1 = Casestatus.objects.create(casestatus_name='casestatus_1') # create object Case.objects.create( case_name='case_1', case_is_incident=True, case_created_by_user_id=test_user, casepriority=casepriority_1, casestatus=casestatus_1, ) def test_note_list_not_logged_in(self): """test list view""" # create url destination = '/login/?next=' + urllib.parse.quote('/note/', safe='') # get response response = self.client.get('/note/', follow=True) # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_list_logged_in(self): """test list view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/') # compare self.assertEqual(response.status_code, 200) def test_note_list_template(self): """test list view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/') # compare self.assertTemplateUsed(response, 'dfirtrack_main/note/note_list.html') def test_note_list_get_user_context(self): """test list view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/') # compare self.assertEqual(str(response.context['user']), 'testuser_note') def test_note_list_redirect(self): """test list view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # create url destination = urllib.parse.quote('/note/', safe='/') # get response response = self.client.get('/note', follow=True) # compare self.assertRedirects( response, destination, status_code=301, target_status_code=200 ) def test_note_detail_not_logged_in(self): """test detail view""" # get object note_1 = Note.objects.get(note_title='note_1') # create url destination = '/login/?next=' + urllib.parse.quote( '/note/' + str(note_1.note_id) + '/', safe='' ) # get response response = self.client.get('/note/' + str(note_1.note_id) + '/', follow=True) # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_detail_logged_in(self): """test detail view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/' + str(note_1.note_id) + '/') # compare self.assertEqual(response.status_code, 200) def test_note_detail_template(self): """test detail view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/' + str(note_1.note_id) + '/') # compare self.assertTemplateUsed(response, 'dfirtrack_main/note/note_detail.html') def test_note_detail_get_user_context(self): """test detail view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/' + str(note_1.note_id) + '/') # compare self.assertEqual(str(response.context['user']), 'testuser_note') def test_note_detail_redirect(self): """test detail view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # create url destination = urllib.parse.quote('/note/' + str(note_1.note_id) + '/', safe='/') # get response response = self.client.get('/note/' + str(note_1.note_id), follow=True) # compare self.assertRedirects( response, destination, status_code=301, target_status_code=200 ) def test_note_add_not_logged_in(self): """test add view""" # create url destination = '/login/?next=' + urllib.parse.quote('/note/add/', safe='') # get response response = self.client.get('/note/add/', follow=True) # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_add_logged_in(self): """test add view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/add/') # compare self.assertEqual(response.status_code, 200) def test_note_add_template(self): """test add view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/add/') # compare self.assertTemplateUsed(response, 'dfirtrack_main/note/note_generic_form.html') def test_note_add_get_user_context(self): """test add view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/add/') # compare self.assertEqual(str(response.context['user']), 'testuser_note') def test_note_add_redirect(self): """test add view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # create url destination = urllib.parse.quote('/note/add/', safe='/') # get response response = self.client.get('/note/add', follow=True) # compare self.assertRedirects( response, destination, status_code=301, target_status_code=200 ) def test_note_add_post_redirect(self): """test add view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get objects notestatus_id = Notestatus.objects.get( notestatus_name='notestatus_1' ).notestatus_id # create post data data_dict = { 'note_title': 'note_add_post_test', 'note_content': 'lorem ipsum', 'notestatus': notestatus_id, } # get response response = self.client.post('/note/add/', data_dict) # get object note_add_post_test = Note.objects.get(note_title='note_add_post_test') # create url destination = urllib.parse.quote( '/note/' + str(note_add_post_test.note_id) + '/', safe='/' ) # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) self.assertEqual(note_add_post_test.note_version, 1) def test_note_add_post_invalid_reload(self): """test add view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # create post data data_dict = {} # get response response = self.client.post('/note/add/', data_dict) # compare self.assertEqual(response.status_code, 200) def test_note_add_post_invalid_template(self): """test add view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # create post data data_dict = {} # get response response = self.client.post('/note/add/', data_dict) # compare self.assertTemplateUsed(response, 'dfirtrack_main/note/note_generic_form.html') def test_note_edit_not_logged_in(self): """test edit view""" # get object note_1 = Note.objects.get(note_title='note_1') # create url destination = '/login/?next=' + urllib.parse.quote( '/note/' + str(note_1.note_id) + '/edit/', safe='' ) # get response response = self.client.get( '/note/' + str(note_1.note_id) + '/edit/', follow=True ) # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_edit_logged_in(self): """test edit view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/' + str(note_1.note_id) + '/edit/') # compare self.assertEqual(response.status_code, 200) def test_note_edit_template(self): """test edit view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/' + str(note_1.note_id) + '/edit/') # compare self.assertTemplateUsed(response, 'dfirtrack_main/note/note_generic_form.html') def test_note_edit_get_user_context(self): """test edit view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get response response = self.client.get('/note/' + str(note_1.note_id) + '/edit/') # compare self.assertEqual(str(response.context['user']), 'testuser_note') def test_note_edit_redirect(self): """test edit view""" # get object note_1 = Note.objects.get(note_title='note_1') # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # create url destination = urllib.parse.quote( '/note/' + str(note_1.note_id) + '/edit/', safe='/' ) # get response response = self.client.get( '/note/' + str(note_1.note_id) + '/edit', follow=True ) # compare self.assertRedirects( response, destination, status_code=301, target_status_code=200 ) def test_note_edit_post_redirect(self): """test edit view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get user test_user = User.objects.get(username='testuser_note') # get objects notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1') # create object note_1 = Note.objects.create( note_title='note_edit_post_test_1', note_content='lorem ipsum', notestatus=notestatus_1, note_created_by_user_id=test_user, note_modified_by_user_id=test_user, ) # get note version because it needs to be (hidden) part of the form note_version = Note.objects.get(note_title='note_edit_post_test_1').note_version # compare self.assertEqual(note_1.note_version, 1) # create post data data_dict = { 'note_title': 'note_edit_post_test_2', 'note_content': 'lorem ipsum', 'note_version': note_version, 'notestatus': notestatus_1.notestatus_id, } # get response response = self.client.post( '/note/' + str(note_1.note_id) + '/edit/', data_dict ) # create url destination = urllib.parse.quote('/note/' + str(note_1.note_id) + '/', safe='/') # get object note_edit_post_test_2 = Note.objects.get(note_title='note_edit_post_test_2') # compare self.assertEqual(note_edit_post_test_2.note_version, 2) # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_edit_post_invalid_reload(self): """test edit view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get object note_id = Note.objects.get(note_title='note_1').note_id # create post data data_dict = {} # get response response = self.client.post('/note/' + str(note_id) + '/edit/', data_dict) # compare self.assertEqual(response.status_code, 200) def test_note_edit_post_invalid_template(self): """test edit view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get object note_id = Note.objects.get(note_title='note_1').note_id # create post data data_dict = {} # get response response = self.client.post('/note/' + str(note_id) + '/edit/', data_dict) # compare self.assertTemplateUsed(response, 'dfirtrack_main/note/note_generic_form.html') def test_note_edit_documentation_redirect(self): """test note edit documentation redirect""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get object note_1 = Note.objects.get(note_title='note_1') notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1') # create post data data_dict = data_dict = { 'note_title': note_1.note_title, 'note_content': 'lorem ipsum', 'note_version': note_1.note_version, 'notestatus': notestatus_1.notestatus_id, } # get response response = self.client.post( '/note/' + str(note_1.note_id) + '/edit/?documentation', data_dict ) # create url destination = urllib.parse.quote( f'/documentation/#note_id_{note_1.note_id}', safe='/#' ) # check self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_add_documentation_redirect(self): """test note add documentation redirect""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get object notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1') # create post data data_dict = data_dict = { 'note_title': "test add note redirect", 'note_content': 'lorem ipsum', 'notestatus': notestatus_1.notestatus_id, } # get response response = self.client.post('/note/add/?documentation', data_dict) # get latest note new_note = Note.objects.latest('note_create_time') # create url destination = urllib.parse.quote( f'/documentation/#note_id_{new_note.note_id}', safe='/#' ) # check self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_edit_valid_tag(self): """test edit view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get user test_user = User.objects.get(username='testuser_note') # get objects notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1') tag_1 = Tag.objects.get(tag_name='tag_1') # create object note_1 = Note.objects.create( note_title='tag_note_edit_post_test_1', note_content='lorem ipsum', notestatus=notestatus_1, note_created_by_user_id=test_user, note_modified_by_user_id=test_user, ) # create post data data_dict = { 'note_title': 'tag_note_edit_post_test_2', 'note_content': 'lorem ipsum', 'note_version': note_1.note_version, 'notestatus': notestatus_1.notestatus_id, 'tag': [ tag_1.tag_id, ], } # get response response = self.client.post( '/note/' + str(note_1.note_id) + '/edit/', data_dict ) # create url destination = urllib.parse.quote('/note/' + str(note_1.note_id) + '/', safe='/') # get object note_edit_post_test_2 = Note.objects.get(note_title='tag_note_edit_post_test_2') # compare self.assertEqual(len(note_edit_post_test_2.tag.all()), 1) self.assertEqual(note_edit_post_test_2.tag.all()[0].tag_name, 'tag_1') # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 ) def test_note_edit_valid_case(self): """test edit view""" # login testuser self.client.login(username='testuser_note', password='oh8Szsuk8BpbEJ1RRL21') # get user test_user = User.objects.get(username='testuser_note') # get objects notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1') case_1 = Case.objects.get(case_name='case_1') # create object note_1 = Note.objects.create( note_title='case_note_edit_post_test_1', note_content='lorem ipsum', notestatus=notestatus_1, note_created_by_user_id=test_user, note_modified_by_user_id=test_user, ) # create post data data_dict = { 'note_title': 'case_note_edit_post_test_2', 'note_content': 'lorem ipsum', 'note_version': note_1.note_version, 'notestatus': notestatus_1.notestatus_id, 'case': [ case_1.case_id, ], } # get response response = self.client.post( '/note/' + str(note_1.note_id) + '/edit/', data_dict ) # create url destination = urllib.parse.quote('/note/' + str(note_1.note_id) + '/', safe='/') # get object note_edit_post_test_2 = Note.objects.get( note_title='case_note_edit_post_test_2' ) # compare self.assertEqual(note_edit_post_test_2.case.case_name, 'case_1') # compare self.assertRedirects( response, destination, status_code=302, target_status_code=200 )
35.056897
88
0.610289
2,282
20,333
5.175723
0.047765
0.047413
0.033528
0.05842
0.902464
0.87664
0.853188
0.837186
0.816358
0.806536
0
0.024102
0.275611
20,333
579
89
35.117444
0.777785
0.117002
0
0.524691
0
0
0.152765
0.032922
0
0
0
0
0.111111
1
0.095679
false
0.083333
0.012346
0
0.111111
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
b937ba6ac58279d3478a680b3cb7c1db28838731
16
py
Python
python/testData/resolve/multiFile/relativePackageStarImport/b/__init__.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/resolve/multiFile/relativePackageStarImport/b/__init__.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/resolve/multiFile/relativePackageStarImport/b/__init__.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def foo(): pass
8
15
0.625
3
16
3.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.1875
16
1
16
16
0.769231
0
0
0
0
0
0
0
0
0
0
0
0
1
1
true
1
0
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
1
0
0
7
b9f113757d94b980e5e117b97b6d231dd65684e5
43,973
py
Python
core/target_assigner_test.py
zhonglihanzhu/tensorflow-objectDetection
aa3d1b754d5c78b8401ce86d4c20f45741fc2b77
[ "Apache-2.0" ]
1
2019-04-24T16:32:11.000Z
2019-04-24T16:32:11.000Z
core/target_assigner_test.py
zhonglihanzhu/tensorflow-objectDetection
aa3d1b754d5c78b8401ce86d4c20f45741fc2b77
[ "Apache-2.0" ]
null
null
null
core/target_assigner_test.py
zhonglihanzhu/tensorflow-objectDetection
aa3d1b754d5c78b8401ce86d4c20f45741fc2b77
[ "Apache-2.0" ]
3
2018-04-04T07:26:54.000Z
2020-08-14T01:43:29.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tests for object_detection.core.target_assigner.""" import numpy as np import tensorflow as tf from box_coders import keypoint_box_coder from box_coders import mean_stddev_box_coder from core import box_list from core import region_similarity_calculator from core import standard_fields as fields from core import target_assigner as targetassigner from matchers import argmax_matcher from matchers import bipartite_matcher from utils import test_case class TargetAssignerTest(test_case.TestCase): def test_assign_agnostic(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_box_corners): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=None) anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist) (cls_targets, cls_weights, reg_targets, reg_weights, _) = result return (cls_targets, cls_weights, reg_targets, reg_weights) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 0.8], [0, 0.5, .5, 1.0]], dtype=np.float32) anchor_stddevs = np.array(3 * [4 * [.1]], dtype=np.float32) groundtruth_box_corners = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 0.9, 0.9]], dtype=np.float32) exp_cls_targets = [[1], [1], [0]] exp_cls_weights = [1, 1, 1] exp_reg_targets = [[0, 0, 0, 0], [0, 0, -1, 1], [0, 0, 0, 0]] exp_reg_weights = [1, 1, 0] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_box_corners]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) self.assertEquals(cls_targets_out.dtype, np.float32) self.assertEquals(cls_weights_out.dtype, np.float32) self.assertEquals(reg_targets_out.dtype, np.float32) self.assertEquals(reg_weights_out.dtype, np.float32) def test_assign_class_agnostic_with_ignored_matches(self): # Note: test is very similar to above. The third box matched with an IOU # of 0.35, which is between the matched and unmatched threshold. This means # That like above the expected classification targets are [1, 1, 0]. # Unlike above, the third target is ignored and therefore expected # classification weights are [1, 1, 0]. def graph_fn(anchor_means, anchor_stddevs, groundtruth_box_corners): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.3) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=None) anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist) (cls_targets, cls_weights, reg_targets, reg_weights, _) = result return (cls_targets, cls_weights, reg_targets, reg_weights) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 0.8], [0.0, 0.5, .9, 1.0]], dtype=np.float32) anchor_stddevs = np.array(3 * [4 * [.1]], dtype=np.float32) groundtruth_box_corners = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 0.9, 0.9]], dtype=np.float32) exp_cls_targets = [[1], [1], [0]] exp_cls_weights = [1, 1, 0] exp_reg_targets = [[0, 0, 0, 0], [0, 0, -1, 1], [0, 0, 0, 0]] exp_reg_weights = [1, 1, 0] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_box_corners]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) self.assertEquals(cls_targets_out.dtype, np.float32) self.assertEquals(cls_weights_out.dtype, np.float32) self.assertEquals(reg_targets_out.dtype, np.float32) self.assertEquals(reg_weights_out.dtype, np.float32) def test_assign_agnostic_with_keypoints(self): def graph_fn(anchor_means, groundtruth_box_corners, groundtruth_keypoints): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = keypoint_box_coder.KeypointBoxCoder( num_keypoints=6, scale_factors=[10.0, 10.0, 5.0, 5.0]) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=None) anchors_boxlist = box_list.BoxList(anchor_means) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) groundtruth_boxlist.add_field(fields.BoxListFields.keypoints, groundtruth_keypoints) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist) (cls_targets, cls_weights, reg_targets, reg_weights, _) = result return (cls_targets, cls_weights, reg_targets, reg_weights) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 1.0], [0.0, 0.5, .9, 1.0]], dtype=np.float32) groundtruth_box_corners = np.array([[0.0, 0.0, 0.5, 0.5], [0.45, 0.45, 0.95, 0.95]], dtype=np.float32) groundtruth_keypoints = np.array( [[[0.1, 0.2], [0.1, 0.3], [0.2, 0.2], [0.2, 0.2], [0.1, 0.1], [0.9, 0]], [[0, 0.3], [0.2, 0.4], [0.5, 0.6], [0, 0.6], [0.8, 0.2], [0.2, 0.4]]], dtype=np.float32) exp_cls_targets = [[1], [1], [0]] exp_cls_weights = [1, 1, 1] exp_reg_targets = [[0, 0, 0, 0, -3, -1, -3, 1, -1, -1, -1, -1, -3, -3, 13, -5], [-1, -1, 0, 0, -15, -9, -11, -7, -5, -3, -15, -3, 1, -11, -11, -7], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] exp_reg_weights = [1, 1, 0] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, groundtruth_box_corners, groundtruth_keypoints]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) self.assertEquals(cls_targets_out.dtype, np.float32) self.assertEquals(cls_weights_out.dtype, np.float32) self.assertEquals(reg_targets_out.dtype, np.float32) self.assertEquals(reg_weights_out.dtype, np.float32) def test_assign_class_agnostic_with_keypoints_and_ignored_matches(self): # Note: test is very similar to above. The third box matched with an IOU # of 0.35, which is between the matched and unmatched threshold. This means # That like above the expected classification targets are [1, 1, 0]. # Unlike above, the third target is ignored and therefore expected # classification weights are [1, 1, 0]. def graph_fn(anchor_means, groundtruth_box_corners, groundtruth_keypoints): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = keypoint_box_coder.KeypointBoxCoder( num_keypoints=6, scale_factors=[10.0, 10.0, 5.0, 5.0]) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=None) anchors_boxlist = box_list.BoxList(anchor_means) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) groundtruth_boxlist.add_field(fields.BoxListFields.keypoints, groundtruth_keypoints) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist) (cls_targets, cls_weights, reg_targets, reg_weights, _) = result return (cls_targets, cls_weights, reg_targets, reg_weights) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 1.0], [0.0, 0.5, .9, 1.0]], dtype=np.float32) groundtruth_box_corners = np.array([[0.0, 0.0, 0.5, 0.5], [0.45, 0.45, 0.95, 0.95]], dtype=np.float32) groundtruth_keypoints = np.array( [[[0.1, 0.2], [0.1, 0.3], [0.2, 0.2], [0.2, 0.2], [0.1, 0.1], [0.9, 0]], [[0, 0.3], [0.2, 0.4], [0.5, 0.6], [0, 0.6], [0.8, 0.2], [0.2, 0.4]]], dtype=np.float32) exp_cls_targets = [[1], [1], [0]] exp_cls_weights = [1, 1, 1] exp_reg_targets = [[0, 0, 0, 0, -3, -1, -3, 1, -1, -1, -1, -1, -3, -3, 13, -5], [-1, -1, 0, 0, -15, -9, -11, -7, -5, -3, -15, -3, 1, -11, -11, -7], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] exp_reg_weights = [1, 1, 0] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, groundtruth_box_corners, groundtruth_keypoints]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) self.assertEquals(cls_targets_out.dtype, np.float32) self.assertEquals(cls_weights_out.dtype, np.float32) self.assertEquals(reg_targets_out.dtype, np.float32) self.assertEquals(reg_weights_out.dtype, np.float32) def test_assign_multiclass(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant([1, 0, 0, 0, 0, 0, 0], tf.float32) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist, groundtruth_labels) (cls_targets, cls_weights, reg_targets, reg_weights, _) = result return (cls_targets, cls_weights, reg_targets, reg_weights) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 0.8], [0, 0.5, .5, 1.0], [.75, 0, 1.0, .25]], dtype=np.float32) anchor_stddevs = np.array(4 * [4 * [.1]], dtype=np.float32) groundtruth_box_corners = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 0.9, 0.9], [.75, 0, .95, .27]], dtype=np.float32) groundtruth_labels = np.array([[0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0]], dtype=np.float32) exp_cls_targets = [[0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0]] exp_cls_weights = [1, 1, 1, 1] exp_reg_targets = [[0, 0, 0, 0], [0, 0, -1, 1], [0, 0, 0, 0], [0, 0, -.5, .2]] exp_reg_weights = [1, 1, 0, 1] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) self.assertEquals(cls_targets_out.dtype, np.float32) self.assertEquals(cls_weights_out.dtype, np.float32) self.assertEquals(reg_targets_out.dtype, np.float32) self.assertEquals(reg_weights_out.dtype, np.float32) def test_assign_multiclass_with_groundtruth_weights(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels, groundtruth_weights): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant([1, 0, 0, 0, 0, 0, 0], tf.float32) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist, groundtruth_labels, groundtruth_weights) (_, cls_weights, _, reg_weights, _) = result return (cls_weights, reg_weights) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 0.8], [0, 0.5, .5, 1.0], [.75, 0, 1.0, .25]], dtype=np.float32) anchor_stddevs = np.array(4 * [4 * [.1]], dtype=np.float32) groundtruth_box_corners = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 0.9, 0.9], [.75, 0, .95, .27]], dtype=np.float32) groundtruth_labels = np.array([[0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0]], dtype=np.float32) groundtruth_weights = np.array([0.3, 0., 0.5], dtype=np.float32) exp_cls_weights = [0.3, 0., 1, 0.5] # background class gets weight of 1. exp_reg_weights = [0.3, 0., 0., 0.5] # background class gets weight of 0. (cls_weights_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels, groundtruth_weights]) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_weights_out, exp_reg_weights) def test_assign_multidimensional_class_targets(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant([[0, 0], [0, 0]], tf.float32) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist, groundtruth_labels) (cls_targets, cls_weights, reg_targets, reg_weights, _) = result return (cls_targets, cls_weights, reg_targets, reg_weights) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 0.8], [0, 0.5, .5, 1.0], [.75, 0, 1.0, .25]], dtype=np.float32) anchor_stddevs = np.array(4 * [4 * [.1]], dtype=np.float32) groundtruth_box_corners = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 0.9, 0.9], [.75, 0, .95, .27]], dtype=np.float32) groundtruth_labels = np.array([[[0, 1], [1, 0]], [[1, 0], [0, 1]], [[0, 1], [1, .5]]], np.float32) exp_cls_targets = [[[0, 1], [1, 0]], [[1, 0], [0, 1]], [[0, 0], [0, 0]], [[0, 1], [1, .5]]] exp_cls_weights = [1, 1, 1, 1] exp_reg_targets = [[0, 0, 0, 0], [0, 0, -1, 1], [0, 0, 0, 0], [0, 0, -.5, .2]] exp_reg_weights = [1, 1, 0, 1] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) self.assertEquals(cls_targets_out.dtype, np.float32) self.assertEquals(cls_weights_out.dtype, np.float32) self.assertEquals(reg_targets_out.dtype, np.float32) self.assertEquals(reg_weights_out.dtype, np.float32) def test_assign_empty_groundtruth(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant([0, 0, 0], tf.float32) anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) result = target_assigner.assign(anchors_boxlist, groundtruth_boxlist, groundtruth_labels) (cls_targets, cls_weights, reg_targets, reg_weights, _) = result return (cls_targets, cls_weights, reg_targets, reg_weights) groundtruth_box_corners = np.zeros((0, 4), dtype=np.float32) groundtruth_labels = np.zeros((0, 3), dtype=np.float32) anchor_means = np.array([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 0.8], [0, 0.5, .5, 1.0], [.75, 0, 1.0, .25]], dtype=np.float32) anchor_stddevs = np.array(4 * [4 * [.1]], dtype=np.float32) exp_cls_targets = [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]] exp_cls_weights = [1, 1, 1, 1] exp_reg_targets = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] exp_reg_weights = [0, 0, 0, 0] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_box_corners, groundtruth_labels]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) self.assertEquals(cls_targets_out.dtype, np.float32) self.assertEquals(cls_weights_out.dtype, np.float32) self.assertEquals(reg_targets_out.dtype, np.float32) self.assertEquals(reg_weights_out.dtype, np.float32) def test_raises_error_on_incompatible_groundtruth_boxes_and_labels(self): similarity_calc = region_similarity_calculator.NegSqDistSimilarity() matcher = bipartite_matcher.GreedyBipartiteMatcher() box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant([1, 0, 0, 0, 0, 0, 0], tf.float32) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) prior_means = tf.constant([[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 0.8], [0, 0.5, .5, 1.0], [.75, 0, 1.0, .25]]) prior_stddevs = tf.constant(4 * [4 * [.1]]) priors = box_list.BoxList(prior_means) priors.add_field('stddev', prior_stddevs) box_corners = [[0.0, 0.0, 0.5, 0.5], [0.0, 0.0, 0.5, 0.8], [0.5, 0.5, 0.9, 0.9], [.75, 0, .95, .27]] boxes = box_list.BoxList(tf.constant(box_corners)) groundtruth_labels = tf.constant([[0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0]], tf.float32) with self.assertRaisesRegexp(ValueError, 'Unequal shapes'): target_assigner.assign(priors, boxes, groundtruth_labels, num_valid_rows=3) def test_raises_error_on_invalid_groundtruth_labels(self): similarity_calc = region_similarity_calculator.NegSqDistSimilarity() matcher = bipartite_matcher.GreedyBipartiteMatcher() box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant([[0, 0], [0, 0], [0, 0]], tf.float32) target_assigner = targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) prior_means = tf.constant([[0.0, 0.0, 0.5, 0.5]]) prior_stddevs = tf.constant([[1.0, 1.0, 1.0, 1.0]]) priors = box_list.BoxList(prior_means) priors.add_field('stddev', prior_stddevs) box_corners = [[0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 0.9, 0.9], [.75, 0, .95, .27]] boxes = box_list.BoxList(tf.constant(box_corners)) groundtruth_labels = tf.constant([[[0, 1], [1, 0]]], tf.float32) with self.assertRaises(ValueError): target_assigner.assign(priors, boxes, groundtruth_labels, num_valid_rows=3) class BatchTargetAssignerTest(test_case.TestCase): def _get_agnostic_target_assigner(self): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() return targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=None) def _get_multi_class_target_assigner(self, num_classes): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant([1] + num_classes * [0], tf.float32) return targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) def _get_multi_dimensional_target_assigner(self, target_dimensions): similarity_calc = region_similarity_calculator.IouSimilarity() matcher = argmax_matcher.ArgMaxMatcher(matched_threshold=0.5, unmatched_threshold=0.5) box_coder = mean_stddev_box_coder.MeanStddevBoxCoder() unmatched_cls_target = tf.constant(np.zeros(target_dimensions), tf.float32) return targetassigner.TargetAssigner( similarity_calc, matcher, box_coder, unmatched_cls_target=unmatched_cls_target) def test_batch_assign_targets(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2): box_list1 = box_list.BoxList(groundtruth_boxlist1) box_list2 = box_list.BoxList(groundtruth_boxlist2) gt_box_batch = [box_list1, box_list2] gt_class_targets = [None, None] anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) agnostic_target_assigner = self._get_agnostic_target_assigner() (cls_targets, cls_weights, reg_targets, reg_weights, _) = targetassigner.batch_assign_targets( agnostic_target_assigner, anchors_boxlist, gt_box_batch, gt_class_targets) return (cls_targets, cls_weights, reg_targets, reg_weights) groundtruth_boxlist1 = np.array([[0., 0., 0.2, 0.2]], dtype=np.float32) groundtruth_boxlist2 = np.array([[0, 0.25123152, 1, 1], [0.015789, 0.0985, 0.55789, 0.3842]], dtype=np.float32) anchor_means = np.array([[0, 0, .25, .25], [0, .25, 1, 1], [0, .1, .5, .5], [.75, .75, 1, 1]], dtype=np.float32) anchor_stddevs = np.array([[.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1]], dtype=np.float32) exp_reg_targets = [[[0, 0, -0.5, -0.5], [0, 0, 0, 0], [0, 0, 0, 0,], [0, 0, 0, 0,],], [[0, 0, 0, 0,], [0, 0.01231521, 0, 0], [0.15789001, -0.01500003, 0.57889998, -1.15799987], [0, 0, 0, 0]]] exp_cls_weights = [[1, 1, 1, 1], [1, 1, 1, 1]] exp_cls_targets = [[[1], [0], [0], [0]], [[0], [1], [1], [0]]] exp_reg_weights = [[1, 0, 0, 0], [0, 1, 1, 0]] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) def test_batch_assign_multiclass_targets(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2, class_targets1, class_targets2): box_list1 = box_list.BoxList(groundtruth_boxlist1) box_list2 = box_list.BoxList(groundtruth_boxlist2) gt_box_batch = [box_list1, box_list2] gt_class_targets = [class_targets1, class_targets2] anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) multiclass_target_assigner = self._get_multi_class_target_assigner( num_classes=3) (cls_targets, cls_weights, reg_targets, reg_weights, _) = targetassigner.batch_assign_targets( multiclass_target_assigner, anchors_boxlist, gt_box_batch, gt_class_targets) return (cls_targets, cls_weights, reg_targets, reg_weights) groundtruth_boxlist1 = np.array([[0., 0., 0.2, 0.2]], dtype=np.float32) groundtruth_boxlist2 = np.array([[0, 0.25123152, 1, 1], [0.015789, 0.0985, 0.55789, 0.3842]], dtype=np.float32) class_targets1 = np.array([[0, 1, 0, 0]], dtype=np.float32) class_targets2 = np.array([[0, 0, 0, 1], [0, 0, 1, 0]], dtype=np.float32) anchor_means = np.array([[0, 0, .25, .25], [0, .25, 1, 1], [0, .1, .5, .5], [.75, .75, 1, 1]], dtype=np.float32) anchor_stddevs = np.array([[.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1]], dtype=np.float32) exp_reg_targets = [[[0, 0, -0.5, -0.5], [0, 0, 0, 0], [0, 0, 0, 0,], [0, 0, 0, 0,],], [[0, 0, 0, 0,], [0, 0.01231521, 0, 0], [0.15789001, -0.01500003, 0.57889998, -1.15799987], [0, 0, 0, 0]]] exp_cls_weights = [[1, 1, 1, 1], [1, 1, 1, 1]] exp_cls_targets = [[[0, 1, 0, 0], [1, 0, 0, 0], [1, 0, 0, 0], [1, 0, 0, 0]], [[1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [1, 0, 0, 0]]] exp_reg_weights = [[1, 0, 0, 0], [0, 1, 1, 0]] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2, class_targets1, class_targets2]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) def test_batch_assign_multiclass_targets_with_padded_groundtruth(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2, class_targets1, class_targets2, groundtruth_weights1, groundtruth_weights2): box_list1 = box_list.BoxList(groundtruth_boxlist1) box_list2 = box_list.BoxList(groundtruth_boxlist2) gt_box_batch = [box_list1, box_list2] gt_class_targets = [class_targets1, class_targets2] gt_weights = [groundtruth_weights1, groundtruth_weights2] anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) multiclass_target_assigner = self._get_multi_class_target_assigner( num_classes=3) (cls_targets, cls_weights, reg_targets, reg_weights, _) = targetassigner.batch_assign_targets( multiclass_target_assigner, anchors_boxlist, gt_box_batch, gt_class_targets, gt_weights) return (cls_targets, cls_weights, reg_targets, reg_weights) groundtruth_boxlist1 = np.array([[0., 0., 0.2, 0.2], [0., 0., 0., 0.]], dtype=np.float32) groundtruth_weights1 = np.array([1, 0], dtype=np.float32) groundtruth_boxlist2 = np.array([[0, 0.25123152, 1, 1], [0.015789, 0.0985, 0.55789, 0.3842], [0, 0, 0, 0]], dtype=np.float32) groundtruth_weights2 = np.array([1, 1, 0], dtype=np.float32) class_targets1 = np.array([[0, 1, 0, 0], [0, 0, 0, 0]], dtype=np.float32) class_targets2 = np.array([[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 0, 0]], dtype=np.float32) anchor_means = np.array([[0, 0, .25, .25], [0, .25, 1, 1], [0, .1, .5, .5], [.75, .75, 1, 1]], dtype=np.float32) anchor_stddevs = np.array([[.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1]], dtype=np.float32) exp_reg_targets = [[[0, 0, -0.5, -0.5], [0, 0, 0, 0], [0, 0, 0, 0,], [0, 0, 0, 0,],], [[0, 0, 0, 0,], [0, 0.01231521, 0, 0], [0.15789001, -0.01500003, 0.57889998, -1.15799987], [0, 0, 0, 0]]] exp_cls_weights = [[1, 1, 1, 1], [1, 1, 1, 1]] exp_cls_targets = [[[0, 1, 0, 0], [1, 0, 0, 0], [1, 0, 0, 0], [1, 0, 0, 0]], [[1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [1, 0, 0, 0]]] exp_reg_weights = [[1, 0, 0, 0], [0, 1, 1, 0]] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2, class_targets1, class_targets2, groundtruth_weights1, groundtruth_weights2]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) def test_batch_assign_multidimensional_targets(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2, class_targets1, class_targets2): box_list1 = box_list.BoxList(groundtruth_boxlist1) box_list2 = box_list.BoxList(groundtruth_boxlist2) gt_box_batch = [box_list1, box_list2] gt_class_targets = [class_targets1, class_targets2] anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) multiclass_target_assigner = self._get_multi_dimensional_target_assigner( target_dimensions=(2, 3)) (cls_targets, cls_weights, reg_targets, reg_weights, _) = targetassigner.batch_assign_targets( multiclass_target_assigner, anchors_boxlist, gt_box_batch, gt_class_targets) return (cls_targets, cls_weights, reg_targets, reg_weights) groundtruth_boxlist1 = np.array([[0., 0., 0.2, 0.2]], dtype=np.float32) groundtruth_boxlist2 = np.array([[0, 0.25123152, 1, 1], [0.015789, 0.0985, 0.55789, 0.3842]], dtype=np.float32) class_targets1 = np.array([[0, 1, 0, 0]], dtype=np.float32) class_targets2 = np.array([[0, 0, 0, 1], [0, 0, 1, 0]], dtype=np.float32) class_targets1 = np.array([[[0, 1, 1], [1, 1, 0]]], dtype=np.float32) class_targets2 = np.array([[[0, 1, 1], [1, 1, 0]], [[0, 0, 1], [0, 0, 1]]], dtype=np.float32) anchor_means = np.array([[0, 0, .25, .25], [0, .25, 1, 1], [0, .1, .5, .5], [.75, .75, 1, 1]], dtype=np.float32) anchor_stddevs = np.array([[.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1], [.1, .1, .1, .1]], dtype=np.float32) exp_reg_targets = [[[0, 0, -0.5, -0.5], [0, 0, 0, 0], [0, 0, 0, 0,], [0, 0, 0, 0,],], [[0, 0, 0, 0,], [0, 0.01231521, 0, 0], [0.15789001, -0.01500003, 0.57889998, -1.15799987], [0, 0, 0, 0]]] exp_cls_weights = [[1, 1, 1, 1], [1, 1, 1, 1]] exp_cls_targets = [[[[0., 1., 1.], [1., 1., 0.]], [[0., 0., 0.], [0., 0., 0.]], [[0., 0., 0.], [0., 0., 0.]], [[0., 0., 0.], [0., 0., 0.]]], [[[0., 0., 0.], [0., 0., 0.]], [[0., 1., 1.], [1., 1., 0.]], [[0., 0., 1.], [0., 0., 1.]], [[0., 0., 0.], [0., 0., 0.]]]] exp_reg_weights = [[1, 0, 0, 0], [0, 1, 1, 0]] (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute(graph_fn, [anchor_means, anchor_stddevs, groundtruth_boxlist1, groundtruth_boxlist2, class_targets1, class_targets2]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) def test_batch_assign_empty_groundtruth(self): def graph_fn(anchor_means, anchor_stddevs, groundtruth_box_corners, gt_class_targets): groundtruth_boxlist = box_list.BoxList(groundtruth_box_corners) gt_box_batch = [groundtruth_boxlist] gt_class_targets_batch = [gt_class_targets] anchors_boxlist = box_list.BoxList(anchor_means) anchors_boxlist.add_field('stddev', anchor_stddevs) multiclass_target_assigner = self._get_multi_class_target_assigner( num_classes=3) (cls_targets, cls_weights, reg_targets, reg_weights, _) = targetassigner.batch_assign_targets( multiclass_target_assigner, anchors_boxlist, gt_box_batch, gt_class_targets_batch) return (cls_targets, cls_weights, reg_targets, reg_weights) groundtruth_box_corners = np.zeros((0, 4), dtype=np.float32) anchor_means = np.array([[0, 0, .25, .25], [0, .25, 1, 1]], dtype=np.float32) anchor_stddevs = np.array([[.1, .1, .1, .1], [.1, .1, .1, .1]], dtype=np.float32) exp_reg_targets = [[[0, 0, 0, 0], [0, 0, 0, 0]]] exp_cls_weights = [[1, 1]] exp_cls_targets = [[[1, 0, 0, 0], [1, 0, 0, 0]]] exp_reg_weights = [[0, 0]] num_classes = 3 pad = 1 gt_class_targets = np.zeros((0, num_classes + pad), dtype=np.float32) (cls_targets_out, cls_weights_out, reg_targets_out, reg_weights_out) = self.execute( graph_fn, [anchor_means, anchor_stddevs, groundtruth_box_corners, gt_class_targets]) self.assertAllClose(cls_targets_out, exp_cls_targets) self.assertAllClose(cls_weights_out, exp_cls_weights) self.assertAllClose(reg_targets_out, exp_reg_targets) self.assertAllClose(reg_weights_out, exp_reg_weights) class CreateTargetAssignerTest(tf.test.TestCase): def test_create_target_assigner(self): """Tests that named constructor gives working target assigners. TODO: Make this test more general. """ corners = [[0.0, 0.0, 1.0, 1.0]] groundtruth = box_list.BoxList(tf.constant(corners)) priors = box_list.BoxList(tf.constant(corners)) prior_stddevs = tf.constant([[1.0, 1.0, 1.0, 1.0]]) priors.add_field('stddev', prior_stddevs) multibox_ta = (targetassigner .create_target_assigner('Multibox', stage='proposal')) multibox_ta.assign(priors, groundtruth) # No tests on output, as that may vary arbitrarily as new target assigners # are added. As long as it is constructed correctly and runs without errors, # tests on the individual assigners cover correctness of the assignments. anchors = box_list.BoxList(tf.constant(corners)) faster_rcnn_proposals_ta = (targetassigner .create_target_assigner('FasterRCNN', stage='proposal')) faster_rcnn_proposals_ta.assign(anchors, groundtruth) fast_rcnn_ta = (targetassigner .create_target_assigner('FastRCNN')) fast_rcnn_ta.assign(anchors, groundtruth) faster_rcnn_detection_ta = (targetassigner .create_target_assigner('FasterRCNN', stage='detection')) faster_rcnn_detection_ta.assign(anchors, groundtruth) with self.assertRaises(ValueError): targetassigner.create_target_assigner('InvalidDetector', stage='invalid_stage') if __name__ == '__main__': tf.test.main()
50.197489
80
0.566006
5,417
43,973
4.318073
0.050212
0.046172
0.049891
0.047711
0.895686
0.883417
0.877089
0.86777
0.861442
0.858022
0
0.076122
0.31467
43,973
875
81
50.254857
0.70006
0.039274
0
0.804974
0
0
0.004621
0
0
0
0
0.001143
0.106021
1
0.041885
false
0
0.014398
0
0.081152
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
6a2525cb33d7fc3987fc1c37a07ba43a3cdfd440
22,381
py
Python
tests/chainerx_tests/unit_tests/routines_tests/test_rnn.py
mr4msm/chainer
7942e1cd425b29868ff872a5b9031f90a9bcda53
[ "MIT" ]
2
2018-10-09T15:37:43.000Z
2019-04-28T02:45:22.000Z
tests/chainerx_tests/unit_tests/routines_tests/test_rnn.py
blakexu/chainer
f3c2948af2796bb5096f628220fd7321120e1a75
[ "MIT" ]
1
2019-10-17T09:56:18.000Z
2019-10-17T09:56:18.000Z
tests/chainerx_tests/unit_tests/routines_tests/test_rnn.py
blakexu/chainer
f3c2948af2796bb5096f628220fd7321120e1a75
[ "MIT" ]
null
null
null
import chainer import chainerx from chainerx_tests import array_utils from chainerx_tests import dtype_utils from chainerx_tests import op_utils n_step_lstm_dtypes_valid = dtype_utils._permutate_dtype_mapping([ # Floats. (('float16', ), ()), (('float32', ), ()), (('float64', ), ()), ]) @op_utils.op_test(['native:0', 'cuda:0']) @chainer.testing.parameterize(*( chainer.testing.product([ chainer.testing.from_pytest_parameterize( 'n_layers,hidden_size,input_size,batches', [ (2, 2, 1, (1, 1, 1)), (2, 2, 3, (3, 2, 1)), (3, 8, 4, (4, 2, 1)), (4, 12, 4, (4, 3, 2)), ]), chainer.testing.from_pytest_parameterize( 'in_dtypes, out_dtype', n_step_lstm_dtypes_valid) ]) )) class TestNStepLstm(op_utils.ChainerOpTest): def setup(self): self.check_forward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_backward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_double_backward_options.update({ 'rtol': 5e-3, 'atol': 5e-2}) if self.in_dtypes[0] == 'float16': self.check_forward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_double_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) device = chainerx.get_default_device() if device.backend.name == 'cuda': if self.in_dtypes[0] != 'float32': self.skip_backward_test = True self.skip_double_backward_test = True def generate_inputs(self): h_shape = (self.n_layers, self.batches[0], self.hidden_size) dtype = self.in_dtypes[0] h = array_utils.uniform(h_shape, dtype) c = array_utils.uniform(h_shape, dtype) in_size = self.input_size out_size = self.hidden_size xs = [array_utils.uniform((self.batches[b], in_size), dtype) for b in range(len(self.batches))] def w_in(i, j): return in_size if i == 0 and j < 4 else out_size inputs = [] inputs.append(h) inputs.append(c) for i in range(len(self.batches)): inputs.append(xs[i]) for n in range(self.n_layers): for i in range(8): inputs.append(array_utils.uniform( (out_size, w_in(n, i)), dtype)) for i in range(8): inputs.append(array_utils.uniform((out_size,), dtype)) return tuple(inputs) def process_input(self, inputs): h = inputs[0] c = inputs[1] xs = inputs[2:2 + len(self.batches)] ws = [] bs = [] index = 2 + len(self.batches) for n in range(self.n_layers): ws.append(inputs[index: index + 8]) bs.append(inputs[index + 8: index + 16]) index += 16 return h, c, ws, bs, xs def forward_chainerx(self, inputs): h, c, ws, bs, xs = self.process_input(inputs) out = chainerx.n_step_lstm(self.n_layers, h, c, ws, bs, xs) rets = [] rets.append(out[0]) rets.append(out[1]) for i in range(len(out[2])): rets.append(out[2][i]) return tuple(rets) def forward_chainer(self, inputs): h, c, ws, bs, xs = self.process_input(inputs) out = chainer.functions.n_step_lstm( self.n_layers, 0.0, h, c, ws, bs, xs) rets = [] rets.append(out[0]) rets.append(out[1]) for i in range(len(out[2])): rets.append(out[2][i]) return tuple(rets) @op_utils.op_test(['native:0', 'cuda:0']) @chainer.testing.parameterize(*( chainer.testing.product([ chainer.testing.from_pytest_parameterize( 'n_layers,hidden_size,input_size,batches', [ (1, 2, 1, (1, 1, 1)), (2, 6, 8, (4, 2, 2)), (3, 8, 4, (4, 2, 1)), (4, 12, 4, (4, 3, 2)), ]), chainer.testing.from_pytest_parameterize( 'in_dtypes,out_dtype', n_step_lstm_dtypes_valid) ]) )) class TestNStepBiLstm(op_utils.ChainerOpTest): def setup(self): self.check_forward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_backward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_double_backward_options.update({ 'rtol': 5e-3, 'atol': 5e-2}) if self.in_dtypes[0] == 'float16': self.check_forward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_double_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) device = chainerx.get_default_device() if device.backend.name == 'cuda': if self.in_dtypes[0] != 'float32': self.skip_backward_test = True self.skip_double_backward_test = True def generate_inputs(self): h_shape = (self.n_layers * 2, self.batches[0], self.hidden_size) dtype = self.in_dtypes[0] h = array_utils.uniform(h_shape, dtype) c = array_utils.uniform(h_shape, dtype) in_size = self.input_size out_size = self.hidden_size xs = [array_utils.uniform((self.batches[b], in_size), dtype) for b in range(len(self.batches))] def w_in(i, j): if i == 0 and j < 4: return in_size elif i > 0 and j < 4: return out_size * 2 else: return out_size inputs = [] inputs.append(h) inputs.append(c) for i in range(len(self.batches)): inputs.append(xs[i]) for n in range(self.n_layers): for direction in (0, 1): for i in range(8): inputs.append(array_utils.uniform( (out_size, w_in(n, i)), dtype)) for i in range(8): inputs.append(array_utils.uniform((out_size,), dtype)) return tuple(inputs) def process_input(self, inputs): h = inputs[0] c = inputs[1] xs = inputs[2:2 + len(self.batches)] ws = [] bs = [] index = 2 + len(self.batches) for n in range(self.n_layers): ws.append(inputs[index: index + 8]) bs.append(inputs[index + 8: index + 16]) ws.append(inputs[index + 16: index + 24]) bs.append(inputs[index + 24: index + 32]) index += 32 return h, c, ws, bs, xs def forward_chainerx(self, inputs): h, c, ws, bs, xs = self.process_input(inputs) out = chainerx.n_step_bilstm(self.n_layers, h, c, ws, bs, xs) rets = [] rets.append(out[0]) rets.append(out[1]) for i in range(len(out[2])): rets.append(out[2][i]) return tuple(rets) def forward_chainer(self, inputs): h, c, ws, bs, xs = self.process_input(inputs) out = chainer.functions.n_step_bilstm( self.n_layers, 0.0, h, c, ws, bs, xs) rets = [] rets.append(out[0]) rets.append(out[1]) for i in range(len(out[2])): rets.append(out[2][i]) return tuple(rets) @op_utils.op_test(['native:0', 'cuda:0']) @chainer.testing.parameterize(*( chainer.testing.product([ chainer.testing.from_pytest_parameterize( 'n_layers,hidden_size,input_size,batches', [ (2, 2, 1, (1, 1, 1)), (2, 2, 3, (3, 2, 1)), (3, 8, 4, (4, 2, 1)), (4, 6, 4, (4, 3, 2)), ]), chainer.testing.from_pytest_parameterize( 'in_dtypes, out_dtype', n_step_lstm_dtypes_valid) ]) )) class TestNStepGru(op_utils.ChainerOpTest): def setup(self): self.check_forward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_backward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_double_backward_options.update({ 'rtol': 5e-3, 'atol': 5e-2}) if self.in_dtypes[0] == 'float16': self.check_forward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_double_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) device = chainerx.get_default_device() if device.backend.name == 'cuda': if self.in_dtypes[0] != 'float32': self.skip_backward_test = True self.skip_double_backward_test = True def generate_inputs(self): h_shape = (self.n_layers, self.batches[0], self.hidden_size) dtype = self.in_dtypes[0] h = array_utils.uniform(h_shape, dtype) in_size = self.input_size out_size = self.hidden_size xs = [array_utils.uniform((self.batches[b], in_size), dtype) for b in range(len(self.batches))] def w_in(i, j): return in_size if i == 0 and j < 3 else out_size inputs = [] inputs.append(h) for i in range(len(self.batches)): inputs.append(xs[i]) for n in range(self.n_layers): for i in range(6): inputs.append(array_utils.uniform( (out_size, w_in(n, i)), dtype)) for i in range(6): inputs.append(array_utils.uniform((out_size,), dtype)) return tuple(inputs) def process_input(self, inputs): h = inputs[0] xs = inputs[1:1 + len(self.batches)] ws = [] bs = [] index = 1 + len(self.batches) for n in range(self.n_layers): ws.append(inputs[index: index + 6]) bs.append(inputs[index + 6: index + 12]) index += 12 return h, ws, bs, xs def forward_chainerx(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainerx.n_step_gru(self.n_layers, h, ws, bs, xs) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets) def forward_chainer(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainer.functions.n_step_gru( self.n_layers, 0.0, h, ws, bs, xs) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets) @op_utils.op_test(['native:0', 'cuda:0']) @chainer.testing.parameterize(*( chainer.testing.product([ chainer.testing.from_pytest_parameterize( 'n_layers,hidden_size,input_size,batches', [ (2, 2, 1, (1, 1, 1)), (2, 2, 3, (3, 2, 1)), (3, 4, 4, (4, 2, 1)), (4, 5, 4, (4, 3, 2)), ]), chainer.testing.from_pytest_parameterize( 'in_dtypes,out_dtype', n_step_lstm_dtypes_valid) ]) )) class TestNStepBiGRU(op_utils.ChainerOpTest): def setup(self): self.check_forward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_backward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_double_backward_options.update({ 'rtol': 5e-2, 'atol': 5e-2}) if self.in_dtypes[0] == 'float16': self.check_forward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_double_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) device = chainerx.get_default_device() if device.backend.name == 'cuda': if self.in_dtypes[0] != 'float32': self.skip_backward_test = True self.skip_double_backward_test = True def generate_inputs(self): h_shape = (self.n_layers * 2, self.batches[0], self.hidden_size) dtype = self.in_dtypes[0] h = array_utils.uniform(h_shape, dtype) in_size = self.input_size out_size = self.hidden_size xs = [array_utils.uniform((self.batches[b], in_size), dtype) for b in range(len(self.batches))] def w_in(i, j): if i == 0 and j < 3: return in_size elif i > 0 and j < 3: return out_size * 2 else: return out_size inputs = [] inputs.append(h) for i in range(len(self.batches)): inputs.append(xs[i]) for n in range(self.n_layers): for direction in (0, 1): for i in range(6): inputs.append(array_utils.uniform( (out_size, w_in(n, i)), dtype)) for i in range(6): inputs.append(array_utils.uniform((out_size,), dtype)) return tuple(inputs) def process_input(self, inputs): h = inputs[0] xs = inputs[1:1 + len(self.batches)] ws = [] bs = [] index = 1 + len(self.batches) for n in range(self.n_layers): ws.append(inputs[index: index + 6]) bs.append(inputs[index + 6: index + 12]) ws.append(inputs[index + 12: index + 18]) bs.append(inputs[index + 18: index + 24]) index += 24 return h, ws, bs, xs def forward_chainerx(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainerx.n_step_bigru(self.n_layers, h, ws, bs, xs) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets) def forward_chainer(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainer.functions.n_step_bigru( self.n_layers, 0.0, h, ws, bs, xs) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets) @op_utils.op_test(['native:0', 'cuda:0']) # ReLU activation is unstable around 0 but can seemingly not be dodged # automatically. @op_utils.fix_random() @chainer.testing.parameterize(*( chainer.testing.product([ chainer.testing.from_pytest_parameterize( 'n_layers,hidden_size,input_size,batches,activation', [ (2, 2, 1, (1, 1, 1), "tanh"), (2, 2, 1, (1, 1, 1), "relu"), (2, 2, 3, (3, 2, 1), "tanh"), (2, 2, 3, (3, 2, 1), "relu"), (3, 4, 4, (4, 2, 1), "tanh"), (3, 4, 4, (4, 2, 1), "relu"), (4, 5, 4, (4, 3, 2), "tanh"), (4, 5, 4, (4, 3, 2), "relu"), ]), chainer.testing.from_pytest_parameterize( 'in_dtypes, out_dtype', n_step_lstm_dtypes_valid) ]) )) class TestNStepRNN(op_utils.ChainerOpTest): check_numpy_strides_compliance = False dodge_nondifferentiable = True def setup(self): self.check_forward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_backward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_double_backward_options.update({ 'rtol': 5e-2, 'atol': 5e-2}) if self.in_dtypes[0] == 'float16': self.check_forward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_double_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) device = chainerx.get_default_device() if device.backend.name == 'cuda': if self.in_dtypes[0] != 'float32': self.skip_forward_test = True self.skip_backward_test = True self.skip_double_backward_test = True def generate_inputs(self): h_shape = (self.n_layers, self.batches[0], self.hidden_size) dtype = self.in_dtypes[0] h = array_utils.uniform(h_shape, dtype) in_size = self.input_size out_size = self.hidden_size xs = [array_utils.uniform((self.batches[b], in_size), dtype) for b in range(len(self.batches))] def w_in(i, j): return in_size if i == 0 and j < 1 else out_size inputs = [] inputs.append(h) for i in range(len(self.batches)): inputs.append(xs[i]) for n in range(self.n_layers): for i in range(2): inputs.append(array_utils.uniform( (out_size, w_in(n, i)), dtype)) for i in range(2): inputs.append(array_utils.uniform((out_size,), dtype)) return tuple(inputs) def process_input(self, inputs): h = inputs[0] xs = inputs[1:1 + len(self.batches)] ws = [] bs = [] index = 1 + len(self.batches) for n in range(self.n_layers): ws.append(inputs[index: index + 2]) bs.append(inputs[index + 2: index + 4]) index += 4 return h, ws, bs, xs def forward_chainerx(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainerx.n_step_rnn( self.n_layers, h, ws, bs, xs, self.activation) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets) def forward_chainer(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainer.functions.n_step_rnn( self.n_layers, 0.0, h, ws, bs, xs, self.activation) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets) @op_utils.op_test(['native:0', 'cuda:0']) # ReLU activation is unstable around 0 but can seemingly not be dodged # automatically. @op_utils.fix_random() @chainer.testing.parameterize(*( chainer.testing.product([ chainer.testing.from_pytest_parameterize( 'n_layers,hidden_size,input_size,batches,activation', [ (2, 2, 1, (1, 1, 1), "tanh"), (2, 2, 1, (1, 1, 1), "relu"), (2, 2, 3, (3, 2, 1), "tanh"), (2, 2, 3, (3, 2, 1), "relu"), (3, 4, 4, (4, 2, 1), "tanh"), (3, 4, 4, (4, 2, 1), "relu"), ]), chainer.testing.from_pytest_parameterize( 'in_dtypes,out_dtype', n_step_lstm_dtypes_valid) ]) )) class TestNStepBiRNN(op_utils.ChainerOpTest): check_numpy_strides_compliance = False dodge_nondifferentiable = True def setup(self): self.check_forward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_backward_options.update({ 'rtol': 1e-2, 'atol': 1e-2}) self.check_double_backward_options.update({ 'rtol': 5e-2, 'atol': 5e-2}) if self.in_dtypes[0] == 'float16': self.check_forward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) self.check_double_backward_options.update({ 'rtol': 1e-1, 'atol': 1e-1}) device = chainerx.get_default_device() if device.backend.name == 'cuda': if self.in_dtypes[0] != 'float32': self.skip_forward_test = True self.skip_backward_test = True self.skip_double_backward_test = True def generate_inputs(self): h_shape = (self.n_layers * 2, self.batches[0], self.hidden_size) dtype = self.in_dtypes[0] low = -1.0 high = 1.0 if dtype == 'float16': low = -0.5 high = 0.5 h = array_utils.uniform(h_shape, dtype) in_size = self.input_size out_size = self.hidden_size xs = [array_utils.uniform((self.batches[b], in_size), dtype, low=low, high=high) for b in range(len(self.batches))] def w_in(i, j): if i == 0 and j < 1: return in_size elif i > 0 and j < 1: return out_size * 2 else: return out_size inputs = [] inputs.append(h) for i in range(len(self.batches)): inputs.append(xs[i]) for n in range(self.n_layers): for direction in (0, 1): for i in range(2): inputs.append(array_utils.uniform( (out_size, w_in(n, i)), dtype, low=low, high=high)) for i in range(2): inputs.append(array_utils.uniform( (out_size,), dtype, low=low, high=high)) return tuple(inputs) def process_input(self, inputs): h = inputs[0] xs = inputs[1:1 + len(self.batches)] ws = [] bs = [] index = 1 + len(self.batches) for n in range(self.n_layers): ws.append(inputs[index: index + 2]) bs.append(inputs[index + 2: index + 4]) ws.append(inputs[index + 4: index + 6]) bs.append(inputs[index + 6: index + 8]) index += 8 return h, ws, bs, xs def forward_chainerx(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainerx.n_step_birnn( self.n_layers, h, ws, bs, xs, self.activation) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets) def forward_chainer(self, inputs): h, ws, bs, xs = self.process_input(inputs) out = chainer.functions.n_step_birnn( self.n_layers, 0.0, h, ws, bs, xs, self.activation) rets = [] rets.append(out[0]) for i in range(len(out[1])): rets.append(out[1][i]) return tuple(rets)
34.013678
75
0.529199
2,974
22,381
3.822798
0.044048
0.029554
0.053831
0.050136
0.962618
0.955933
0.944674
0.944322
0.93579
0.93579
0
0.038557
0.332514
22,381
657
76
34.065449
0.722471
0.007819
0
0.886726
0
0
0.042207
0.011532
0
0
0
0
0
1
0.063717
false
0
0.00885
0.00531
0.153982
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
6a2fc7662bfc89d6ef6bac31f5df562e398e2a49
15,143
py
Python
django/Avinash/College_Management_System/CMS_project/CMS_app/urls.py
profMsaif/web_applications_2022
849cfeb396b82551e2553028d03fe9693773fc49
[ "MIT" ]
null
null
null
django/Avinash/College_Management_System/CMS_project/CMS_app/urls.py
profMsaif/web_applications_2022
849cfeb396b82551e2553028d03fe9693773fc49
[ "MIT" ]
null
null
null
django/Avinash/College_Management_System/CMS_project/CMS_app/urls.py
profMsaif/web_applications_2022
849cfeb396b82551e2553028d03fe9693773fc49
[ "MIT" ]
4
2022-03-12T10:17:00.000Z
2022-03-26T08:40:43.000Z
from .import HodViews, StaffViews, StudentViews from . import views from django.urls import path, include from django.contrib import admin urlpatterns = [ path('', views.home, name="home"), path('contact', views.contact, name="contact"), path('login', views.loginUser, name="login"), path('logout_user/', views.logout_user, name="logout_user"), path('registration/', views.registration, name="registration"), path('doLogin/', views.doLogin, name="doLogin"), path('doRegistration/', views.doRegistration, name="doRegistration"), # URLS for Student path('student_home/', StudentViews.student_home, name="student_home"), path('student_view_attendance/', StudentViews.student_view_attendance, name="student_view_attendance"), path('student_view_attendance_post/', StudentViews.student_view_attendance_post, name="student_view_attendance_post"), path('student_apply_leave/', StudentViews.student_apply_leave, name="student_apply_leave"), path('student_apply_leave_save/', StudentViews.student_apply_leave_save, name="student_apply_leave_save"), path('student_feedback/', StudentViews.student_feedback, name="student_feedback"), path('student_feedback_save/', StudentViews.student_feedback_save, name="student_feedback_save"), path('student_profile/', StudentViews.student_profile, name="student_profile"), path('student_profile_update/', StudentViews.student_profile_update, name="student_profile_update"), path('student_view_result/', StudentViews.student_view_result, name="student_view_result"), # URLS for Staff path('staff_home/', StaffViews.staff_home, name="staff_home"), path('staff_take_attendance/', StaffViews.staff_take_attendance, name="staff_take_attendance"), path('get_students/', StaffViews.get_students, name="get_students"), path('save_attendance_data/', StaffViews.save_attendance_data, name="save_attendance_data"), path('staff_update_attendance/', StaffViews.staff_update_attendance, name="staff_update_attendance"), path('get_attendance_dates/', StaffViews.get_attendance_dates, name="get_attendance_dates"), path('get_attendance_student/', StaffViews.get_attendance_student, name="get_attendance_student"), path('update_attendance_data/', StaffViews.update_attendance_data, name="update_attendance_data"), path('staff_apply_leave/', StaffViews.staff_apply_leave, name="staff_apply_leave"), path('staff_apply_leave_save/', StaffViews.staff_apply_leave_save, name="staff_apply_leave_save"), path('staff_feedback/', StaffViews.staff_feedback, name="staff_feedback"), path('staff_feedback_save/', StaffViews.staff_feedback_save, name="staff_feedback_save"), path('staff_profile/', StaffViews.staff_profile, name="staff_profile"), path('staff_profile_update/', StaffViews.staff_profile_update, name="staff_profile_update"), path('staff_add_result/', StaffViews.staff_add_result, name="staff_add_result"), path('staff_add_result_save/', StaffViews.staff_add_result_save, name="staff_add_result_save"), # URL for Admin path('admin_home/', HodViews.admin_home, name="admin_home"), path('add_staff/', HodViews.add_staff, name="add_staff"), path('add_staff_save/', HodViews.add_staff_save, name="add_staff_save"), path('manage_staff/', HodViews.manage_staff, name="manage_staff"), path('edit_staff/<staff_id>/', HodViews.edit_staff, name="edit_staff"), path('edit_staff_save/', HodViews.edit_staff_save, name="edit_staff_save"), path('delete_staff/<staff_id>/', HodViews.delete_staff, name="delete_staff"), path('add_course/', HodViews.add_course, name="add_course"), path('add_course_save/', HodViews.add_course_save, name="add_course_save"), path('manage_course/', HodViews.manage_course, name="manage_course"), path('edit_course/<course_id>/', HodViews.edit_course, name="edit_course"), path('edit_course_save/', HodViews.edit_course_save, name="edit_course_save"), path('delete_course/<course_id>/', HodViews.delete_course, name="delete_course"), path('manage_session/', HodViews.manage_session, name="manage_session"), path('add_session/', HodViews.add_session, name="add_session"), path('add_session_save/', HodViews.add_session_save, name="add_session_save"), path('edit_session/<session_id>', HodViews.edit_session, name="edit_session"), path('edit_session_save/', HodViews.edit_session_save, name="edit_session_save"), path('delete_session/<session_id>/', HodViews.delete_session, name="delete_session"), path('add_student/', HodViews.add_student, name="add_student"), path('add_student_save/', HodViews.add_student_save, name="add_student_save"), path('edit_student/<student_id>', HodViews.edit_student, name="edit_student"), path('edit_student_save/', HodViews.edit_student_save, name="edit_student_save"), path('manage_student/', HodViews.manage_student, name="manage_student"), path('delete_student/<student_id>/', HodViews.delete_student, name="delete_student"), path('add_subject/', HodViews.add_subject, name="add_subject"), path('add_subject_save/', HodViews.add_subject_save, name="add_subject_save"), path('manage_subject/', HodViews.manage_subject, name="manage_subject"), path('edit_subject/<subject_id>/', HodViews.edit_subject, name="edit_subject"), path('edit_subject_save/', HodViews.edit_subject_save, name="edit_subject_save"), path('delete_subject/<subject_id>/', HodViews.delete_subject, name="delete_subject"), path('check_email_exist/', HodViews.check_email_exist, name="check_email_exist"), path('check_username_exist/', HodViews.check_username_exist, name="check_username_exist"), path('student_feedback_message/', HodViews.student_feedback_message, name="student_feedback_message"), path('student_feedback_message_reply/', HodViews.student_feedback_message_reply, name="student_feedback_message_reply"), path('staff_feedback_message/', HodViews.staff_feedback_message, name="staff_feedback_message"), path('staff_feedback_message_reply/', HodViews.staff_feedback_message_reply, name="staff_feedback_message_reply"), path('student_leave_view/', HodViews.student_leave_view, name="student_leave_view"), path('student_leave_approve/<leave_id>/', HodViews.student_leave_approve, name="student_leave_approve"), path('student_leave_reject/<leave_id>/', HodViews.student_leave_reject, name="student_leave_reject"), path('staff_leave_view/', HodViews.staff_leave_view, name="staff_leave_view"), path('staff_leave_approve/<leave_id>/', HodViews.staff_leave_approve, name="staff_leave_approve"), path('staff_leave_reject/<leave_id>/', HodViews.staff_leave_reject, name="staff_leave_reject"), path('admin_view_attendance/', HodViews.admin_view_attendance, name="admin_view_attendance"), path('admin_get_attendance_dates/', HodViews.admin_get_attendance_dates, name="admin_get_attendance_dates"), path('admin_get_attendance_student/', HodViews.admin_get_attendance_student, name="admin_get_attendance_student"), path('admin_profile/', HodViews.admin_profile, name="admin_profile"), path('admin_profile_update/', HodViews.admin_profile_update, name="admin_profile_update"), ] urlpatterns = [ path('admin/', admin.site.urls), path('', views.home, name="home"), path('contact', views.contact, name="contact"), path('login', views.loginUser, name="login"), path('logout_user', views.logout_user, name="logout_user"), path('registration', views.registration, name="registration"), path('doLogin', views.doLogin, name="doLogin"), path('doRegistration', views.doRegistration, name="doRegistration"), # URLS for Student path('student_home/', StudentViews.student_home, name="student_home"), path('student_view_attendance/', StudentViews.student_view_attendance, name="student_view_attendance"), path('student_view_attendance_post/', StudentViews.student_view_attendance_post, name="student_view_attendance_post"), path('student_apply_leave/', StudentViews.student_apply_leave, name="student_apply_leave"), path('student_apply_leave_save/', StudentViews.student_apply_leave_save, name="student_apply_leave_save"), path('student_feedback/', StudentViews.student_feedback, name="student_feedback"), path('student_feedback_save/', StudentViews.student_feedback_save, name="student_feedback_save"), path('student_profile/', StudentViews.student_profile, name="student_profile"), path('student_profile_update/', StudentViews.student_profile_update, name="student_profile_update"), path('student_view_result/', StudentViews.student_view_result, name="student_view_result"), # URLS for Staff path('staff_home/', StaffViews.staff_home, name="staff_home"), path('staff_take_attendance/', StaffViews.staff_take_attendance, name="staff_take_attendance"), path('get_students/', StaffViews.get_students, name="get_students"), path('save_attendance_data/', StaffViews.save_attendance_data, name="save_attendance_data"), path('staff_update_attendance/', StaffViews.staff_update_attendance, name="staff_update_attendance"), path('get_attendance_dates/', StaffViews.get_attendance_dates, name="get_attendance_dates"), path('get_attendance_student/', StaffViews.get_attendance_student, name="get_attendance_student"), path('update_attendance_data/', StaffViews.update_attendance_data, name="update_attendance_data"), path('staff_apply_leave/', StaffViews.staff_apply_leave, name="staff_apply_leave"), path('staff_apply_leave_save/', StaffViews.staff_apply_leave_save, name="staff_apply_leave_save"), path('staff_feedback/', StaffViews.staff_feedback, name="staff_feedback"), path('staff_feedback_save/', StaffViews.staff_feedback_save, name="staff_feedback_save"), path('staff_profile/', StaffViews.staff_profile, name="staff_profile"), path('staff_profile_update/', StaffViews.staff_profile_update, name="staff_profile_update"), path('staff_add_result/', StaffViews.staff_add_result, name="staff_add_result"), path('staff_add_result_save/', StaffViews.staff_add_result_save, name="staff_add_result_save"), # URL for Admin path('admin_home/', HodViews.admin_home, name="admin_home"), path('add_staff/', HodViews.add_staff, name="add_staff"), path('add_staff_save/', HodViews.add_staff_save, name="add_staff_save"), path('manage_staff/', HodViews.manage_staff, name="manage_staff"), path('edit_staff/<staff_id>/', HodViews.edit_staff, name="edit_staff"), path('edit_staff_save/', HodViews.edit_staff_save, name="edit_staff_save"), path('delete_staff/<staff_id>/', HodViews.delete_staff, name="delete_staff"), path('add_course/', HodViews.add_course, name="add_course"), path('add_course_save/', HodViews.add_course_save, name="add_course_save"), path('manage_course/', HodViews.manage_course, name="manage_course"), path('edit_course/<course_id>/', HodViews.edit_course, name="edit_course"), path('edit_course_save/', HodViews.edit_course_save, name="edit_course_save"), path('delete_course/<course_id>/', HodViews.delete_course, name="delete_course"), path('manage_session/', HodViews.manage_session, name="manage_session"), path('add_session/', HodViews.add_session, name="add_session"), path('add_session_save/', HodViews.add_session_save, name="add_session_save"), path('edit_session/<session_id>', HodViews.edit_session, name="edit_session"), path('edit_session_save/', HodViews.edit_session_save, name="edit_session_save"), path('delete_session/<session_id>/', HodViews.delete_session, name="delete_session"), path('add_student/', HodViews.add_student, name="add_student"), path('add_student_save/', HodViews.add_student_save, name="add_student_save"), path('edit_student/<student_id>', HodViews.edit_student, name="edit_student"), path('edit_student_save/', HodViews.edit_student_save, name="edit_student_save"), path('manage_student/', HodViews.manage_student, name="manage_student"), path('delete_student/<student_id>/', HodViews.delete_student, name="delete_student"), path('add_subject/', HodViews.add_subject, name="add_subject"), path('add_subject_save/', HodViews.add_subject_save, name="add_subject_save"), path('manage_subject/', HodViews.manage_subject, name="manage_subject"), path('edit_subject/<subject_id>/', HodViews.edit_subject, name="edit_subject"), path('edit_subject_save/', HodViews.edit_subject_save, name="edit_subject_save"), path('delete_subject/<subject_id>/', HodViews.delete_subject, name="delete_subject"), path('check_email_exist/', HodViews.check_email_exist, name="check_email_exist"), path('check_username_exist/', HodViews.check_username_exist, name="check_username_exist"), path('student_feedback_message/', HodViews.student_feedback_message, name="student_feedback_message"), path('student_feedback_message_reply/', HodViews.student_feedback_message_reply, name="student_feedback_message_reply"), path('staff_feedback_message/', HodViews.staff_feedback_message, name="staff_feedback_message"), path('staff_feedback_message_reply/', HodViews.staff_feedback_message_reply, name="staff_feedback_message_reply"), path('student_leave_view/', HodViews.student_leave_view, name="student_leave_view"), path('student_leave_approve/<leave_id>/', HodViews.student_leave_approve, name="student_leave_approve"), path('student_leave_reject/<leave_id>/', HodViews.student_leave_reject, name="student_leave_reject"), path('staff_leave_view/', HodViews.staff_leave_view, name="staff_leave_view"), path('staff_leave_approve/<leave_id>/', HodViews.staff_leave_approve, name="staff_leave_approve"), path('staff_leave_reject/<leave_id>/', HodViews.staff_leave_reject, name="staff_leave_reject"), path('admin_view_attendance/', HodViews.admin_view_attendance, name="admin_view_attendance"), path('admin_get_attendance_dates/', HodViews.admin_get_attendance_dates, name="admin_get_attendance_dates"), path('admin_get_attendance_student/', HodViews.admin_get_attendance_student, name="admin_get_attendance_student"), path('admin_profile/', HodViews.admin_profile, name="admin_profile"), path('admin_profile_update/', HodViews.admin_profile_update, name="admin_profile_update"), ]
55.878229
84
0.734465
1,838
15,143
5.618063
0.0321
0.027891
0.024404
0.014526
0.984699
0.984699
0.984699
0.984699
0.984699
0.984699
0
0
0.130687
15,143
270
85
56.085185
0.784412
0.006009
0
0.941176
0
0
0.384048
0.183716
0
0
0
0
0
1
0
false
0
0.015686
0
0.015686
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
6a447067f79a24f9a96374b62dd4f696aab9a5b9
66,824
py
Python
google/ads/google_ads/v6/proto/resources/ad_group_criterion_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/resources/ad_group_criterion_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/resources/ad_group_criterion_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v6/resources/ad_group_criterion.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.ads.google_ads.v6.proto.common import criteria_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2 from google.ads.google_ads.v6.proto.common import custom_parameter_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_common_dot_custom__parameter__pb2 from google.ads.google_ads.v6.proto.enums import ad_group_criterion_approval_status_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__group__criterion__approval__status__pb2 from google.ads.google_ads.v6.proto.enums import ad_group_criterion_status_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__group__criterion__status__pb2 from google.ads.google_ads.v6.proto.enums import bidding_source_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_bidding__source__pb2 from google.ads.google_ads.v6.proto.enums import criterion_system_serving_status_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_criterion__system__serving__status__pb2 from google.ads.google_ads.v6.proto.enums import criterion_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_criterion__type__pb2 from google.ads.google_ads.v6.proto.enums import quality_score_bucket_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_quality__score__bucket__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='google/ads/googleads/v6/resources/ad_group_criterion.proto', package='google.ads.googleads.v6.resources', syntax='proto3', serialized_options=b'\n%com.google.ads.googleads.v6.resourcesB\025AdGroupCriterionProtoP\001ZJgoogle.golang.org/genproto/googleapis/ads/googleads/v6/resources;resources\242\002\003GAA\252\002!Google.Ads.GoogleAds.V6.Resources\312\002!Google\\Ads\\GoogleAds\\V6\\Resources\352\002%Google::Ads::GoogleAds::V6::Resources', create_key=_descriptor._internal_create_key, serialized_pb=b'\n:google/ads/googleads/v6/resources/ad_group_criterion.proto\x12!google.ads.googleads.v6.resources\x1a-google/ads/googleads/v6/common/criteria.proto\x1a\x35google/ads/googleads/v6/common/custom_parameter.proto\x1a\x46google/ads/googleads/v6/enums/ad_group_criterion_approval_status.proto\x1a=google/ads/googleads/v6/enums/ad_group_criterion_status.proto\x1a\x32google/ads/googleads/v6/enums/bidding_source.proto\x1a\x43google/ads/googleads/v6/enums/criterion_system_serving_status.proto\x1a\x32google/ads/googleads/v6/enums/criterion_type.proto\x1a\x38google/ads/googleads/v6/enums/quality_score_bucket.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/api/annotations.proto\"\xe2$\n\x10\x41\x64GroupCriterion\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/AdGroupCriterion\x12\x1e\n\x0c\x63riterion_id\x18\x38 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12`\n\x06status\x18\x03 \x01(\x0e\x32P.google.ads.googleads.v6.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus\x12Z\n\x0cquality_info\x18\x04 \x01(\x0b\x32?.google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfoB\x03\xe0\x41\x03\x12?\n\x08\x61\x64_group\x18\x39 \x01(\tB(\xe0\x41\x05\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x02\x88\x01\x01\x12Q\n\x04type\x18\x19 \x01(\x0e\x32>.google.ads.googleads.v6.enums.CriterionTypeEnum.CriterionTypeB\x03\xe0\x41\x03\x12\x1a\n\x08negative\x18: \x01(\x08\x42\x03\xe0\x41\x05H\x03\x88\x01\x01\x12\x80\x01\n\x15system_serving_status\x18\x34 \x01(\x0e\x32\\.google.ads.googleads.v6.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatusB\x03\xe0\x41\x03\x12~\n\x0f\x61pproval_status\x18\x35 \x01(\x0e\x32`.google.ads.googleads.v6.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatusB\x03\xe0\x41\x03\x12 \n\x13\x64isapproval_reasons\x18; \x03(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x62id_modifier\x18= \x01(\x01H\x04\x88\x01\x01\x12\x1b\n\x0e\x63pc_bid_micros\x18> \x01(\x03H\x05\x88\x01\x01\x12\x1b\n\x0e\x63pm_bid_micros\x18? \x01(\x03H\x06\x88\x01\x01\x12\x1b\n\x0e\x63pv_bid_micros\x18@ \x01(\x03H\x07\x88\x01\x01\x12#\n\x16percent_cpc_bid_micros\x18\x41 \x01(\x03H\x08\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_cpc_bid_micros\x18\x42 \x01(\x03\x42\x03\xe0\x41\x03H\t\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_cpm_bid_micros\x18\x43 \x01(\x03\x42\x03\xe0\x41\x03H\n\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_cpv_bid_micros\x18\x44 \x01(\x03\x42\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12\x32\n effective_percent_cpc_bid_micros\x18\x45 \x01(\x03\x42\x03\xe0\x41\x03H\x0c\x88\x01\x01\x12\x65\n\x18\x65\x66\x66\x65\x63tive_cpc_bid_source\x18\x15 \x01(\x0e\x32>.google.ads.googleads.v6.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12\x65\n\x18\x65\x66\x66\x65\x63tive_cpm_bid_source\x18\x16 \x01(\x0e\x32>.google.ads.googleads.v6.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12\x65\n\x18\x65\x66\x66\x65\x63tive_cpv_bid_source\x18\x17 \x01(\x0e\x32>.google.ads.googleads.v6.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12m\n effective_percent_cpc_bid_source\x18# \x01(\x0e\x32>.google.ads.googleads.v6.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12\x66\n\x12position_estimates\x18\n \x01(\x0b\x32\x45.google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimatesB\x03\xe0\x41\x03\x12\x12\n\nfinal_urls\x18\x46 \x03(\t\x12\x19\n\x11\x66inal_mobile_urls\x18G \x03(\t\x12\x1d\n\x10\x66inal_url_suffix\x18H \x01(\tH\r\x88\x01\x01\x12\"\n\x15tracking_url_template\x18I \x01(\tH\x0e\x88\x01\x01\x12N\n\x15url_custom_parameters\x18\x0e \x03(\x0b\x32/.google.ads.googleads.v6.common.CustomParameter\x12\x43\n\x07keyword\x18\x1b \x01(\x0b\x32+.google.ads.googleads.v6.common.KeywordInfoB\x03\xe0\x41\x05H\x00\x12G\n\tplacement\x18\x1c \x01(\x0b\x32-.google.ads.googleads.v6.common.PlacementInfoB\x03\xe0\x41\x05H\x00\x12Y\n\x13mobile_app_category\x18\x1d \x01(\x0b\x32\x35.google.ads.googleads.v6.common.MobileAppCategoryInfoB\x03\xe0\x41\x05H\x00\x12X\n\x12mobile_application\x18\x1e \x01(\x0b\x32\x35.google.ads.googleads.v6.common.MobileApplicationInfoB\x03\xe0\x41\x05H\x00\x12N\n\rlisting_group\x18 \x01(\x0b\x32\x30.google.ads.googleads.v6.common.ListingGroupInfoB\x03\xe0\x41\x05H\x00\x12\x46\n\tage_range\x18$ \x01(\x0b\x32,.google.ads.googleads.v6.common.AgeRangeInfoB\x03\xe0\x41\x05H\x00\x12\x41\n\x06gender\x18% \x01(\x0b\x32*.google.ads.googleads.v6.common.GenderInfoB\x03\xe0\x41\x05H\x00\x12L\n\x0cincome_range\x18& \x01(\x0b\x32/.google.ads.googleads.v6.common.IncomeRangeInfoB\x03\xe0\x41\x05H\x00\x12R\n\x0fparental_status\x18\' \x01(\x0b\x32\x32.google.ads.googleads.v6.common.ParentalStatusInfoB\x03\xe0\x41\x05H\x00\x12\x46\n\tuser_list\x18* \x01(\x0b\x32,.google.ads.googleads.v6.common.UserListInfoB\x03\xe0\x41\x05H\x00\x12N\n\ryoutube_video\x18( \x01(\x0b\x32\x30.google.ads.googleads.v6.common.YouTubeVideoInfoB\x03\xe0\x41\x05H\x00\x12R\n\x0fyoutube_channel\x18) \x01(\x0b\x32\x32.google.ads.googleads.v6.common.YouTubeChannelInfoB\x03\xe0\x41\x05H\x00\x12?\n\x05topic\x18+ \x01(\x0b\x32).google.ads.googleads.v6.common.TopicInfoB\x03\xe0\x41\x05H\x00\x12N\n\ruser_interest\x18- \x01(\x0b\x32\x30.google.ads.googleads.v6.common.UserInterestInfoB\x03\xe0\x41\x05H\x00\x12\x43\n\x07webpage\x18. \x01(\x0b\x32+.google.ads.googleads.v6.common.WebpageInfoB\x03\xe0\x41\x05H\x00\x12U\n\x11\x61pp_payment_model\x18/ \x01(\x0b\x32\x33.google.ads.googleads.v6.common.AppPaymentModelInfoB\x03\xe0\x41\x05H\x00\x12R\n\x0f\x63ustom_affinity\x18\x30 \x01(\x0b\x32\x32.google.ads.googleads.v6.common.CustomAffinityInfoB\x03\xe0\x41\x05H\x00\x12N\n\rcustom_intent\x18\x31 \x01(\x0b\x32\x30.google.ads.googleads.v6.common.CustomIntentInfoB\x03\xe0\x41\x05H\x00\x12R\n\x0f\x63ustom_audience\x18J \x01(\x0b\x32\x32.google.ads.googleads.v6.common.CustomAudienceInfoB\x03\xe0\x41\x05H\x00\x12V\n\x11\x63ombined_audience\x18K \x01(\x0b\x32\x34.google.ads.googleads.v6.common.CombinedAudienceInfoB\x03\xe0\x41\x05H\x00\x1a\x8d\x03\n\x0bQualityInfo\x12\x1f\n\rquality_score\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12m\n\x16\x63reative_quality_score\x18\x02 \x01(\x0e\x32H.google.ads.googleads.v6.enums.QualityScoreBucketEnum.QualityScoreBucketB\x03\xe0\x41\x03\x12o\n\x18post_click_quality_score\x18\x03 \x01(\x0e\x32H.google.ads.googleads.v6.enums.QualityScoreBucketEnum.QualityScoreBucketB\x03\xe0\x41\x03\x12k\n\x14search_predicted_ctr\x18\x04 \x01(\x0e\x32H.google.ads.googleads.v6.enums.QualityScoreBucketEnum.QualityScoreBucketB\x03\xe0\x41\x03\x42\x10\n\x0e_quality_score\x1a\xbc\x03\n\x11PositionEstimates\x12\'\n\x15\x66irst_page_cpc_micros\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12+\n\x19\x66irst_position_cpc_micros\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12(\n\x16top_of_page_cpc_micros\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12<\n*estimated_add_clicks_at_first_position_cpc\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12:\n(estimated_add_cost_at_first_position_cpc\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x42\x18\n\x16_first_page_cpc_microsB\x1c\n\x1a_first_position_cpc_microsB\x19\n\x17_top_of_page_cpc_microsB-\n+_estimated_add_clicks_at_first_position_cpcB+\n)_estimated_add_cost_at_first_position_cpc:t\xea\x41q\n)googleads.googleapis.com/AdGroupCriterion\x12\x44\x63ustomers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}B\x0b\n\tcriterionB\x0f\n\r_criterion_idB\x0b\n\t_ad_groupB\x0b\n\t_negativeB\x0f\n\r_bid_modifierB\x11\n\x0f_cpc_bid_microsB\x11\n\x0f_cpm_bid_microsB\x11\n\x0f_cpv_bid_microsB\x19\n\x17_percent_cpc_bid_microsB\x1b\n\x19_effective_cpc_bid_microsB\x1b\n\x19_effective_cpm_bid_microsB\x1b\n\x19_effective_cpv_bid_microsB#\n!_effective_percent_cpc_bid_microsB\x13\n\x11_final_url_suffixB\x18\n\x16_tracking_url_templateB\x82\x02\n%com.google.ads.googleads.v6.resourcesB\x15\x41\x64GroupCriterionProtoP\x01ZJgoogle.golang.org/genproto/googleapis/ads/googleads/v6/resources;resources\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V6.Resources\xca\x02!Google\\Ads\\GoogleAds\\V6\\Resources\xea\x02%Google::Ads::GoogleAds::V6::Resourcesb\x06proto3' , dependencies=[google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_common_dot_custom__parameter__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__group__criterion__approval__status__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__group__criterion__status__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_bidding__source__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_criterion__system__serving__status__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_criterion__type__pb2.DESCRIPTOR,google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_quality__score__bucket__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,]) _ADGROUPCRITERION_QUALITYINFO = _descriptor.Descriptor( name='QualityInfo', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='quality_score', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfo.quality_score', index=0, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='creative_quality_score', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfo.creative_quality_score', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='post_click_quality_score', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfo.post_click_quality_score', index=2, number=3, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='search_predicted_ctr', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfo.search_predicted_ctr', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_quality_score', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfo._quality_score', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=4072, serialized_end=4469, ) _ADGROUPCRITERION_POSITIONESTIMATES = _descriptor.Descriptor( name='PositionEstimates', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='first_page_cpc_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates.first_page_cpc_micros', index=0, number=6, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='first_position_cpc_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates.first_position_cpc_micros', index=1, number=7, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='top_of_page_cpc_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates.top_of_page_cpc_micros', index=2, number=8, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='estimated_add_clicks_at_first_position_cpc', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates.estimated_add_clicks_at_first_position_cpc', index=3, number=9, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='estimated_add_cost_at_first_position_cpc', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates.estimated_add_cost_at_first_position_cpc', index=4, number=10, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_first_page_cpc_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates._first_page_cpc_micros', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_first_position_cpc_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates._first_position_cpc_micros', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_top_of_page_cpc_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates._top_of_page_cpc_micros', index=2, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_estimated_add_clicks_at_first_position_cpc', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates._estimated_add_clicks_at_first_position_cpc', index=3, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_estimated_add_cost_at_first_position_cpc', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates._estimated_add_cost_at_first_position_cpc', index=4, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=4472, serialized_end=4916, ) _ADGROUPCRITERION = _descriptor.Descriptor( name='AdGroupCriterion', full_name='google.ads.googleads.v6.resources.AdGroupCriterion', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='resource_name', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.resource_name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005\372A+\n)googleads.googleapis.com/AdGroupCriterion', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='criterion_id', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.criterion_id', index=1, number=56, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='status', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.status', index=2, number=3, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='quality_info', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.quality_info', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ad_group', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.ad_group', index=4, number=57, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005\372A\"\n googleads.googleapis.com/AdGroup', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='type', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.type', index=5, number=25, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='negative', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.negative', index=6, number=58, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='system_serving_status', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.system_serving_status', index=7, number=52, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='approval_status', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.approval_status', index=8, number=53, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='disapproval_reasons', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.disapproval_reasons', index=9, number=59, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bid_modifier', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.bid_modifier', index=10, number=61, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.cpc_bid_micros', index=11, number=62, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='cpm_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.cpm_bid_micros', index=12, number=63, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='cpv_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.cpv_bid_micros', index=13, number=64, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='percent_cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.percent_cpc_bid_micros', index=14, number=65, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_cpc_bid_micros', index=15, number=66, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_cpm_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_cpm_bid_micros', index=16, number=67, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_cpv_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_cpv_bid_micros', index=17, number=68, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_percent_cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_percent_cpc_bid_micros', index=18, number=69, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_cpc_bid_source', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_cpc_bid_source', index=19, number=21, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_cpm_bid_source', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_cpm_bid_source', index=20, number=22, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_cpv_bid_source', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_cpv_bid_source', index=21, number=23, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='effective_percent_cpc_bid_source', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.effective_percent_cpc_bid_source', index=22, number=35, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='position_estimates', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.position_estimates', index=23, number=10, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='final_urls', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.final_urls', index=24, number=70, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='final_mobile_urls', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.final_mobile_urls', index=25, number=71, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='final_url_suffix', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.final_url_suffix', index=26, number=72, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tracking_url_template', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.tracking_url_template', index=27, number=73, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='url_custom_parameters', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.url_custom_parameters', index=28, number=14, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='keyword', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.keyword', index=29, number=27, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='placement', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.placement', index=30, number=28, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='mobile_app_category', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.mobile_app_category', index=31, number=29, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='mobile_application', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.mobile_application', index=32, number=30, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='listing_group', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.listing_group', index=33, number=32, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='age_range', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.age_range', index=34, number=36, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gender', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.gender', index=35, number=37, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='income_range', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.income_range', index=36, number=38, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='parental_status', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.parental_status', index=37, number=39, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user_list', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.user_list', index=38, number=42, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='youtube_video', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.youtube_video', index=39, number=40, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='youtube_channel', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.youtube_channel', index=40, number=41, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='topic', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.topic', index=41, number=43, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user_interest', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.user_interest', index=42, number=45, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='webpage', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.webpage', index=43, number=46, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='app_payment_model', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.app_payment_model', index=44, number=47, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='custom_affinity', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.custom_affinity', index=45, number=48, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='custom_intent', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.custom_intent', index=46, number=49, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='custom_audience', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.custom_audience', index=47, number=74, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='combined_audience', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.combined_audience', index=48, number=75, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\005', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_ADGROUPCRITERION_QUALITYINFO, _ADGROUPCRITERION_POSITIONESTIMATES, ], enum_types=[ ], serialized_options=b'\352Aq\n)googleads.googleapis.com/AdGroupCriterion\022Dcustomers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='criterion', full_name='google.ads.googleads.v6.resources.AdGroupCriterion.criterion', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_criterion_id', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._criterion_id', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_ad_group', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._ad_group', index=2, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_negative', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._negative', index=3, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_bid_modifier', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._bid_modifier', index=4, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._cpc_bid_micros', index=5, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_cpm_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._cpm_bid_micros', index=6, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_cpv_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._cpv_bid_micros', index=7, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_percent_cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._percent_cpc_bid_micros', index=8, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_effective_cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._effective_cpc_bid_micros', index=9, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_effective_cpm_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._effective_cpm_bid_micros', index=10, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_effective_cpv_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._effective_cpv_bid_micros', index=11, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_effective_percent_cpc_bid_micros', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._effective_percent_cpc_bid_micros', index=12, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_final_url_suffix', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._final_url_suffix', index=13, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_tracking_url_template', full_name='google.ads.googleads.v6.resources.AdGroupCriterion._tracking_url_template', index=14, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=656, serialized_end=5362, ) _ADGROUPCRITERION_QUALITYINFO.fields_by_name['creative_quality_score'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_quality__score__bucket__pb2._QUALITYSCOREBUCKETENUM_QUALITYSCOREBUCKET _ADGROUPCRITERION_QUALITYINFO.fields_by_name['post_click_quality_score'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_quality__score__bucket__pb2._QUALITYSCOREBUCKETENUM_QUALITYSCOREBUCKET _ADGROUPCRITERION_QUALITYINFO.fields_by_name['search_predicted_ctr'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_quality__score__bucket__pb2._QUALITYSCOREBUCKETENUM_QUALITYSCOREBUCKET _ADGROUPCRITERION_QUALITYINFO.containing_type = _ADGROUPCRITERION _ADGROUPCRITERION_QUALITYINFO.oneofs_by_name['_quality_score'].fields.append( _ADGROUPCRITERION_QUALITYINFO.fields_by_name['quality_score']) _ADGROUPCRITERION_QUALITYINFO.fields_by_name['quality_score'].containing_oneof = _ADGROUPCRITERION_QUALITYINFO.oneofs_by_name['_quality_score'] _ADGROUPCRITERION_POSITIONESTIMATES.containing_type = _ADGROUPCRITERION _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_first_page_cpc_micros'].fields.append( _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['first_page_cpc_micros']) _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['first_page_cpc_micros'].containing_oneof = _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_first_page_cpc_micros'] _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_first_position_cpc_micros'].fields.append( _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['first_position_cpc_micros']) _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['first_position_cpc_micros'].containing_oneof = _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_first_position_cpc_micros'] _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_top_of_page_cpc_micros'].fields.append( _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['top_of_page_cpc_micros']) _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['top_of_page_cpc_micros'].containing_oneof = _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_top_of_page_cpc_micros'] _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_estimated_add_clicks_at_first_position_cpc'].fields.append( _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['estimated_add_clicks_at_first_position_cpc']) _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['estimated_add_clicks_at_first_position_cpc'].containing_oneof = _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_estimated_add_clicks_at_first_position_cpc'] _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_estimated_add_cost_at_first_position_cpc'].fields.append( _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['estimated_add_cost_at_first_position_cpc']) _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['estimated_add_cost_at_first_position_cpc'].containing_oneof = _ADGROUPCRITERION_POSITIONESTIMATES.oneofs_by_name['_estimated_add_cost_at_first_position_cpc'] _ADGROUPCRITERION.fields_by_name['status'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__group__criterion__status__pb2._ADGROUPCRITERIONSTATUSENUM_ADGROUPCRITERIONSTATUS _ADGROUPCRITERION.fields_by_name['quality_info'].message_type = _ADGROUPCRITERION_QUALITYINFO _ADGROUPCRITERION.fields_by_name['type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_criterion__type__pb2._CRITERIONTYPEENUM_CRITERIONTYPE _ADGROUPCRITERION.fields_by_name['system_serving_status'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_criterion__system__serving__status__pb2._CRITERIONSYSTEMSERVINGSTATUSENUM_CRITERIONSYSTEMSERVINGSTATUS _ADGROUPCRITERION.fields_by_name['approval_status'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_ad__group__criterion__approval__status__pb2._ADGROUPCRITERIONAPPROVALSTATUSENUM_ADGROUPCRITERIONAPPROVALSTATUS _ADGROUPCRITERION.fields_by_name['effective_cpc_bid_source'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_bidding__source__pb2._BIDDINGSOURCEENUM_BIDDINGSOURCE _ADGROUPCRITERION.fields_by_name['effective_cpm_bid_source'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_bidding__source__pb2._BIDDINGSOURCEENUM_BIDDINGSOURCE _ADGROUPCRITERION.fields_by_name['effective_cpv_bid_source'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_bidding__source__pb2._BIDDINGSOURCEENUM_BIDDINGSOURCE _ADGROUPCRITERION.fields_by_name['effective_percent_cpc_bid_source'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_bidding__source__pb2._BIDDINGSOURCEENUM_BIDDINGSOURCE _ADGROUPCRITERION.fields_by_name['position_estimates'].message_type = _ADGROUPCRITERION_POSITIONESTIMATES _ADGROUPCRITERION.fields_by_name['url_custom_parameters'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_custom__parameter__pb2._CUSTOMPARAMETER _ADGROUPCRITERION.fields_by_name['keyword'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._KEYWORDINFO _ADGROUPCRITERION.fields_by_name['placement'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._PLACEMENTINFO _ADGROUPCRITERION.fields_by_name['mobile_app_category'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._MOBILEAPPCATEGORYINFO _ADGROUPCRITERION.fields_by_name['mobile_application'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._MOBILEAPPLICATIONINFO _ADGROUPCRITERION.fields_by_name['listing_group'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._LISTINGGROUPINFO _ADGROUPCRITERION.fields_by_name['age_range'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._AGERANGEINFO _ADGROUPCRITERION.fields_by_name['gender'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._GENDERINFO _ADGROUPCRITERION.fields_by_name['income_range'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._INCOMERANGEINFO _ADGROUPCRITERION.fields_by_name['parental_status'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._PARENTALSTATUSINFO _ADGROUPCRITERION.fields_by_name['user_list'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._USERLISTINFO _ADGROUPCRITERION.fields_by_name['youtube_video'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._YOUTUBEVIDEOINFO _ADGROUPCRITERION.fields_by_name['youtube_channel'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._YOUTUBECHANNELINFO _ADGROUPCRITERION.fields_by_name['topic'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._TOPICINFO _ADGROUPCRITERION.fields_by_name['user_interest'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._USERINTERESTINFO _ADGROUPCRITERION.fields_by_name['webpage'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._WEBPAGEINFO _ADGROUPCRITERION.fields_by_name['app_payment_model'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._APPPAYMENTMODELINFO _ADGROUPCRITERION.fields_by_name['custom_affinity'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._CUSTOMAFFINITYINFO _ADGROUPCRITERION.fields_by_name['custom_intent'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._CUSTOMINTENTINFO _ADGROUPCRITERION.fields_by_name['custom_audience'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._CUSTOMAUDIENCEINFO _ADGROUPCRITERION.fields_by_name['combined_audience'].message_type = google_dot_ads_dot_googleads_dot_v6_dot_common_dot_criteria__pb2._COMBINEDAUDIENCEINFO _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['keyword']) _ADGROUPCRITERION.fields_by_name['keyword'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['placement']) _ADGROUPCRITERION.fields_by_name['placement'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['mobile_app_category']) _ADGROUPCRITERION.fields_by_name['mobile_app_category'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['mobile_application']) _ADGROUPCRITERION.fields_by_name['mobile_application'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['listing_group']) _ADGROUPCRITERION.fields_by_name['listing_group'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['age_range']) _ADGROUPCRITERION.fields_by_name['age_range'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['gender']) _ADGROUPCRITERION.fields_by_name['gender'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['income_range']) _ADGROUPCRITERION.fields_by_name['income_range'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['parental_status']) _ADGROUPCRITERION.fields_by_name['parental_status'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['user_list']) _ADGROUPCRITERION.fields_by_name['user_list'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['youtube_video']) _ADGROUPCRITERION.fields_by_name['youtube_video'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['youtube_channel']) _ADGROUPCRITERION.fields_by_name['youtube_channel'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['topic']) _ADGROUPCRITERION.fields_by_name['topic'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['user_interest']) _ADGROUPCRITERION.fields_by_name['user_interest'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['webpage']) _ADGROUPCRITERION.fields_by_name['webpage'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['app_payment_model']) _ADGROUPCRITERION.fields_by_name['app_payment_model'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['custom_affinity']) _ADGROUPCRITERION.fields_by_name['custom_affinity'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['custom_intent']) _ADGROUPCRITERION.fields_by_name['custom_intent'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['custom_audience']) _ADGROUPCRITERION.fields_by_name['custom_audience'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['criterion'].fields.append( _ADGROUPCRITERION.fields_by_name['combined_audience']) _ADGROUPCRITERION.fields_by_name['combined_audience'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['criterion'] _ADGROUPCRITERION.oneofs_by_name['_criterion_id'].fields.append( _ADGROUPCRITERION.fields_by_name['criterion_id']) _ADGROUPCRITERION.fields_by_name['criterion_id'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_criterion_id'] _ADGROUPCRITERION.oneofs_by_name['_ad_group'].fields.append( _ADGROUPCRITERION.fields_by_name['ad_group']) _ADGROUPCRITERION.fields_by_name['ad_group'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_ad_group'] _ADGROUPCRITERION.oneofs_by_name['_negative'].fields.append( _ADGROUPCRITERION.fields_by_name['negative']) _ADGROUPCRITERION.fields_by_name['negative'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_negative'] _ADGROUPCRITERION.oneofs_by_name['_bid_modifier'].fields.append( _ADGROUPCRITERION.fields_by_name['bid_modifier']) _ADGROUPCRITERION.fields_by_name['bid_modifier'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_bid_modifier'] _ADGROUPCRITERION.oneofs_by_name['_cpc_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['cpc_bid_micros']) _ADGROUPCRITERION.fields_by_name['cpc_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_cpc_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_cpm_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['cpm_bid_micros']) _ADGROUPCRITERION.fields_by_name['cpm_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_cpm_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_cpv_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['cpv_bid_micros']) _ADGROUPCRITERION.fields_by_name['cpv_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_cpv_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_percent_cpc_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['percent_cpc_bid_micros']) _ADGROUPCRITERION.fields_by_name['percent_cpc_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_percent_cpc_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_effective_cpc_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['effective_cpc_bid_micros']) _ADGROUPCRITERION.fields_by_name['effective_cpc_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_effective_cpc_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_effective_cpm_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['effective_cpm_bid_micros']) _ADGROUPCRITERION.fields_by_name['effective_cpm_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_effective_cpm_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_effective_cpv_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['effective_cpv_bid_micros']) _ADGROUPCRITERION.fields_by_name['effective_cpv_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_effective_cpv_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_effective_percent_cpc_bid_micros'].fields.append( _ADGROUPCRITERION.fields_by_name['effective_percent_cpc_bid_micros']) _ADGROUPCRITERION.fields_by_name['effective_percent_cpc_bid_micros'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_effective_percent_cpc_bid_micros'] _ADGROUPCRITERION.oneofs_by_name['_final_url_suffix'].fields.append( _ADGROUPCRITERION.fields_by_name['final_url_suffix']) _ADGROUPCRITERION.fields_by_name['final_url_suffix'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_final_url_suffix'] _ADGROUPCRITERION.oneofs_by_name['_tracking_url_template'].fields.append( _ADGROUPCRITERION.fields_by_name['tracking_url_template']) _ADGROUPCRITERION.fields_by_name['tracking_url_template'].containing_oneof = _ADGROUPCRITERION.oneofs_by_name['_tracking_url_template'] DESCRIPTOR.message_types_by_name['AdGroupCriterion'] = _ADGROUPCRITERION _sym_db.RegisterFileDescriptor(DESCRIPTOR) AdGroupCriterion = _reflection.GeneratedProtocolMessageType('AdGroupCriterion', (_message.Message,), { 'QualityInfo' : _reflection.GeneratedProtocolMessageType('QualityInfo', (_message.Message,), { 'DESCRIPTOR' : _ADGROUPCRITERION_QUALITYINFO, '__module__' : 'google.ads.googleads.v6.resources.ad_group_criterion_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.resources.AdGroupCriterion.QualityInfo) }) , 'PositionEstimates' : _reflection.GeneratedProtocolMessageType('PositionEstimates', (_message.Message,), { 'DESCRIPTOR' : _ADGROUPCRITERION_POSITIONESTIMATES, '__module__' : 'google.ads.googleads.v6.resources.ad_group_criterion_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.resources.AdGroupCriterion.PositionEstimates) }) , 'DESCRIPTOR' : _ADGROUPCRITERION, '__module__' : 'google.ads.googleads.v6.resources.ad_group_criterion_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.resources.AdGroupCriterion) }) _sym_db.RegisterMessage(AdGroupCriterion) _sym_db.RegisterMessage(AdGroupCriterion.QualityInfo) _sym_db.RegisterMessage(AdGroupCriterion.PositionEstimates) DESCRIPTOR._options = None _ADGROUPCRITERION_QUALITYINFO.fields_by_name['quality_score']._options = None _ADGROUPCRITERION_QUALITYINFO.fields_by_name['creative_quality_score']._options = None _ADGROUPCRITERION_QUALITYINFO.fields_by_name['post_click_quality_score']._options = None _ADGROUPCRITERION_QUALITYINFO.fields_by_name['search_predicted_ctr']._options = None _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['first_page_cpc_micros']._options = None _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['first_position_cpc_micros']._options = None _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['top_of_page_cpc_micros']._options = None _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['estimated_add_clicks_at_first_position_cpc']._options = None _ADGROUPCRITERION_POSITIONESTIMATES.fields_by_name['estimated_add_cost_at_first_position_cpc']._options = None _ADGROUPCRITERION.fields_by_name['resource_name']._options = None _ADGROUPCRITERION.fields_by_name['criterion_id']._options = None _ADGROUPCRITERION.fields_by_name['quality_info']._options = None _ADGROUPCRITERION.fields_by_name['ad_group']._options = None _ADGROUPCRITERION.fields_by_name['type']._options = None _ADGROUPCRITERION.fields_by_name['negative']._options = None _ADGROUPCRITERION.fields_by_name['system_serving_status']._options = None _ADGROUPCRITERION.fields_by_name['approval_status']._options = None _ADGROUPCRITERION.fields_by_name['disapproval_reasons']._options = None _ADGROUPCRITERION.fields_by_name['effective_cpc_bid_micros']._options = None _ADGROUPCRITERION.fields_by_name['effective_cpm_bid_micros']._options = None _ADGROUPCRITERION.fields_by_name['effective_cpv_bid_micros']._options = None _ADGROUPCRITERION.fields_by_name['effective_percent_cpc_bid_micros']._options = None _ADGROUPCRITERION.fields_by_name['effective_cpc_bid_source']._options = None _ADGROUPCRITERION.fields_by_name['effective_cpm_bid_source']._options = None _ADGROUPCRITERION.fields_by_name['effective_cpv_bid_source']._options = None _ADGROUPCRITERION.fields_by_name['effective_percent_cpc_bid_source']._options = None _ADGROUPCRITERION.fields_by_name['position_estimates']._options = None _ADGROUPCRITERION.fields_by_name['keyword']._options = None _ADGROUPCRITERION.fields_by_name['placement']._options = None _ADGROUPCRITERION.fields_by_name['mobile_app_category']._options = None _ADGROUPCRITERION.fields_by_name['mobile_application']._options = None _ADGROUPCRITERION.fields_by_name['listing_group']._options = None _ADGROUPCRITERION.fields_by_name['age_range']._options = None _ADGROUPCRITERION.fields_by_name['gender']._options = None _ADGROUPCRITERION.fields_by_name['income_range']._options = None _ADGROUPCRITERION.fields_by_name['parental_status']._options = None _ADGROUPCRITERION.fields_by_name['user_list']._options = None _ADGROUPCRITERION.fields_by_name['youtube_video']._options = None _ADGROUPCRITERION.fields_by_name['youtube_channel']._options = None _ADGROUPCRITERION.fields_by_name['topic']._options = None _ADGROUPCRITERION.fields_by_name['user_interest']._options = None _ADGROUPCRITERION.fields_by_name['webpage']._options = None _ADGROUPCRITERION.fields_by_name['app_payment_model']._options = None _ADGROUPCRITERION.fields_by_name['custom_affinity']._options = None _ADGROUPCRITERION.fields_by_name['custom_intent']._options = None _ADGROUPCRITERION.fields_by_name['custom_audience']._options = None _ADGROUPCRITERION.fields_by_name['combined_audience']._options = None _ADGROUPCRITERION._options = None # @@protoc_insertion_point(module_scope)
78.065421
8,184
0.814378
8,956
66,824
5.637115
0.055159
0.02876
0.038268
0.054272
0.872856
0.844293
0.786198
0.730143
0.694727
0.619815
0
0.041642
0.077517
66,824
855
8,185
78.156725
0.777351
0.008201
0
0.529554
1
0.004825
0.282797
0.232166
0
0
0
0
0
1
0
false
0
0.018094
0
0.018094
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
dbe072a739bc065f5922502916209034fdee220a
15,371
py
Python
src/django/addr/adr/models.py
deshk04/addressparser
03c33859bb585a6cf767e0f4d3dfd23cabd2d78b
[ "MIT" ]
null
null
null
src/django/addr/adr/models.py
deshk04/addressparser
03c33859bb585a6cf767e0f4d3dfd23cabd2d78b
[ "MIT" ]
null
null
null
src/django/addr/adr/models.py
deshk04/addressparser
03c33859bb585a6cf767e0f4d3dfd23cabd2d78b
[ "MIT" ]
null
null
null
from django.db import models class AddressDetails(models.Model): system_creation_date = models.DateTimeField(blank=True, null=True) system_update_date = models.DateTimeField(blank=True, null=True) user_id = models.TextField(blank=True, null=True) address_id = models.BigIntegerField(unique=True) pobox_type = models.TextField(blank=True, null=True) pobox_number = models.TextField(blank=True, null=True) building_name = models.TextField(blank=True, null=True) department_name = models.TextField(blank=True, null=True) flat_number = models.TextField(blank=True, null=True) flat_type = models.TextField(blank=True, null=True) flat_number_suffix = models.TextField(blank=True, null=True) level_number = models.TextField(blank=True, null=True) level_type = models.TextField(blank=True, null=True) level_number_suffix = models.TextField(blank=True, null=True) number_first = models.TextField(blank=True, null=True) number_suffix = models.TextField(blank=True, null=True) number_last = models.TextField(blank=True, null=True) street_name = models.TextField(blank=True, null=True) street_type = models.TextField(blank=True, null=True) suburb = models.TextField(blank=True, null=True) postcode = models.CharField(max_length=4, blank=True, null=True) state = models.CharField(max_length=4, blank=True, null=True) latitude = models.DecimalField(max_digits=11, decimal_places=8, blank=True, null=True) longitude = models.DecimalField(max_digits=11, decimal_places=8, blank=True, null=True) parcel_id = models.TextField(blank=True, null=True) premises_type = models.TextField(blank=True, null=True) postal_id = models.TextField(blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'address_details' class DimAddrAbbrWords(models.Model): suffixword = models.CharField(primary_key=True, max_length=30) primaryword = models.CharField(max_length=60) typeflag = models.CharField(max_length=1, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_addr_abbr_words' unique_together = (('suffixword', 'primaryword'),) class DimAddrCommonwords(models.Model): word = models.CharField(max_length=100, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_addr_commonwords' class DimAddrPatch(models.Model): sourcestring = models.CharField(max_length=80, blank=True, null=True) destinationstring = models.CharField(max_length=80, blank=True, null=True) type = models.CharField(max_length=1, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_addr_patch' class DimAddrPobox(models.Model): pobox = models.CharField(max_length=20, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_addr_pobox' class DimAddressType(models.Model): address_type = models.CharField(primary_key=True, max_length=1) address_type_desc = models.CharField(max_length=60, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_address_type' class DimCommonWords(models.Model): word = models.TextField(blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_common_words' class DimGnafAddressDetails(models.Model): address_detail_pid = models.CharField(max_length=15, blank=True, null=True) street_locality_pid = models.CharField(max_length=15, blank=True, null=True) locality_pid = models.CharField(max_length=15, blank=True, null=True) building_name = models.TextField(blank=True, null=True) lot_number_prefix = models.TextField(blank=True, null=True) lot_number = models.CharField(max_length=5, blank=True, null=True) lot_number_suffix = models.TextField(blank=True, null=True) flat_type = models.TextField(blank=True, null=True) flat_number_prefix = models.TextField(blank=True, null=True) flat_number = models.DecimalField(max_digits=5, decimal_places=0, blank=True, null=True) flat_number_suffix = models.TextField(blank=True, null=True) level_type = models.TextField(blank=True, null=True) level_number_prefix = models.TextField(blank=True, null=True) level_number = models.DecimalField(max_digits=3, decimal_places=0, blank=True, null=True) level_number_suffix = models.TextField(blank=True, null=True) number_first_prefix = models.TextField(blank=True, null=True) number_first = models.DecimalField(max_digits=6, decimal_places=0, blank=True, null=True) number_first_suffix = models.TextField(blank=True, null=True) number_last_prefix = models.TextField(blank=True, null=True) number_last = models.DecimalField(max_digits=6, decimal_places=0, blank=True, null=True) number_last_suffix = models.TextField(blank=True, null=True) street_name = models.TextField(blank=True, null=True) street_class_code = models.TextField(blank=True, null=True) street_class_type = models.TextField(blank=True, null=True) street_type_code = models.TextField(blank=True, null=True) street_suffix_code = models.TextField(blank=True, null=True) street_suffix_type = models.TextField(blank=True, null=True) locality_name = models.TextField(blank=True, null=True) state_abbreviation = models.TextField(blank=True, null=True) postcode = models.CharField(max_length=4, blank=True, null=True) latitude = models.DecimalField(max_digits=10, decimal_places=8, blank=True, null=True) longitude = models.DecimalField(max_digits=11, decimal_places=8, blank=True, null=True) geocode_type = models.TextField(blank=True, null=True) confidence = models.DecimalField(max_digits=1, decimal_places=0, blank=True, null=True) alias_principal = models.CharField(max_length=1, blank=True, null=True) primary_secondary = models.CharField(max_length=1, blank=True, null=True) legal_parcel_id = models.CharField(max_length=20, blank=True, null=True) date_created = models.DateField(blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_gnaf_address_details' unique_together = (('address_detail_pid', 'street_name', 'locality_name', 'state_abbreviation', 'postcode', 'latitude', 'longitude'),) class DimGnafPostcode(models.Model): postcode = models.CharField(max_length=4, blank=True, null=True) state = models.CharField(max_length=3, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_gnaf_postcode' class DimGnafStreets(models.Model): street_name = models.CharField(max_length=100, blank=True, null=True) street_type = models.CharField(max_length=15, blank=True, null=True) suburb = models.CharField(max_length=100, blank=True, null=True) postcode = models.CharField(max_length=4, blank=True, null=True) state = models.CharField(max_length=3, blank=True, null=True) street_length = models.IntegerField(blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_gnaf_streets' class DimNameAbbr(models.Model): name = models.CharField(max_length=60, blank=True, null=True) shortname = models.CharField(max_length=20, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_name_abbr' class DimPobox(models.Model): pobox = models.CharField(max_length=20, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_pobox' class DimWordDictionary(models.Model): mainword = models.TextField(blank=True, null=True) suffixword = models.TextField(blank=True, null=True) wordtype = models.TextField(blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'dim_word_dictionary' class GooglePlaces(models.Model): place_id = models.TextField(unique=True, blank=True, null=True) sys_creation_date = models.DateTimeField(blank=True, null=True) sys_update_date = models.DateTimeField(blank=True, null=True) user_id = models.CharField(max_length=30, blank=True, null=True) street_number = models.TextField(blank=True, null=True) street_name = models.TextField(blank=True, null=True) state = models.TextField(blank=True, null=True) suburb = models.TextField(blank=True, null=True) county = models.TextField(blank=True, null=True) country = models.TextField(blank=True, null=True) postcode = models.TextField(blank=True, null=True) neighborhood = models.TextField(blank=True, null=True) sublocality = models.TextField(blank=True, null=True) housenumber = models.TextField(blank=True, null=True) town = models.TextField(blank=True, null=True) subpremise = models.TextField(blank=True, null=True) latitude = models.TextField(blank=True, null=True) longitude = models.TextField(blank=True, null=True) location_type = models.TextField(blank=True, null=True) postal_code_suffix = models.TextField(blank=True, null=True) business_name = models.TextField(blank=True, null=True) formatted_phone_number = models.TextField(blank=True, null=True) international_phone_number = models.TextField(blank=True, null=True) trading_hours_mon = models.TextField(blank=True, null=True) trading_hours_tue = models.TextField(blank=True, null=True) trading_hours_wed = models.TextField(blank=True, null=True) trading_hours_thu = models.TextField(blank=True, null=True) trading_hours_fri = models.TextField(blank=True, null=True) trading_hours_sat = models.TextField(blank=True, null=True) trading_hours_sun = models.TextField(blank=True, null=True) web_website = models.TextField(blank=True, null=True) permanently_closed = models.TextField(blank=True, null=True) rating = models.DecimalField(max_digits=2, decimal_places=0, blank=True, null=True) price_level = models.TextField(blank=True, null=True) scope = models.TextField(blank=True, null=True) types = models.TextField(blank=True, null=True) # This field type is a guess. exception_flag = models.CharField(max_length=1, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'google_places' class StagingInputData(models.Model): system_creation_date = models.DateTimeField(blank=True, null=True) system_update_date = models.DateTimeField(blank=True, null=True) user_id = models.TextField(blank=True, null=True) system_type = models.TextField(blank=True, null=True) source_key = models.TextField(blank=True, null=True) address_type = models.TextField(blank=True, null=True) address_line1 = models.TextField(blank=True, null=True) address_line2 = models.TextField(blank=True, null=True) suburb = models.CharField(max_length=100, blank=True, null=True) postcode = models.CharField(max_length=4, blank=True, null=True) state = models.CharField(max_length=4, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'staging_input_data' class StagingProcessedAddress(models.Model): system_creation_date = models.DateTimeField(blank=True, null=True) system_update_date = models.DateTimeField(blank=True, null=True) user_id = models.TextField(blank=True, null=True) source_input = models.ForeignKey(StagingInputData, models.DO_NOTHING, blank=True, null=True) pobox_type = models.TextField(blank=True, null=True) pobox_number = models.TextField(blank=True, null=True) building_name = models.TextField(blank=True, null=True) department_name = models.TextField(blank=True, null=True) flat_number = models.TextField(blank=True, null=True) flat_type = models.TextField(blank=True, null=True) flat_number_suffix = models.TextField(blank=True, null=True) level_number = models.TextField(blank=True, null=True) level_type = models.TextField(blank=True, null=True) level_number_suffix = models.TextField(blank=True, null=True) number_first = models.TextField(blank=True, null=True) number_suffix = models.TextField(blank=True, null=True) number_last = models.TextField(blank=True, null=True) street_name = models.TextField(blank=True, null=True) street_type = models.TextField(blank=True, null=True) suburb = models.TextField(blank=True, null=True) postcode = models.CharField(max_length=4, blank=True, null=True) state = models.CharField(max_length=4, blank=True, null=True) latitude = models.DecimalField(max_digits=11, decimal_places=8, blank=True, null=True) longitude = models.DecimalField(max_digits=11, decimal_places=8, blank=True, null=True) parcel_id = models.TextField(blank=True, null=True) premises_type = models.TextField(blank=True, null=True) postal_id = models.TextField(blank=True, null=True) rank = models.IntegerField(blank=True, null=True) exception_flag = models.CharField(max_length=1, blank=True, null=True) def __str__(self): """ print all the variables """ return str(self.__class__) + ": " + str(self.__dict__) class Meta: managed = False db_table = 'staging_processed_address'
40.556728
142
0.697287
1,968
15,371
5.20935
0.092988
0.143094
0.206691
0.270289
0.861881
0.843835
0.781701
0.731565
0.658896
0.590129
0
0.007434
0.18613
15,371
378
143
40.664021
0.81207
0.026804
0
0.530075
0
0
0.02795
0.003373
0
0
0
0
0
1
0.06015
false
0
0.003759
0
0.87218
0
0
0
0
null
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
7
e008f58a407457d6c743cbedf52c0462ce7930bd
7,584
py
Python
common/src/pileups.py
gwcbi/HorvathLabNGS
20c87dfcad236990ce1a3ed6e9d180de10ca9dbc
[ "MIT" ]
1
2018-08-27T15:10:17.000Z
2018-08-27T15:10:17.000Z
common/src/pileups.py
HorvathLab/SNPlice
20c87dfcad236990ce1a3ed6e9d180de10ca9dbc
[ "MIT" ]
1
2016-12-16T20:55:00.000Z
2016-12-16T20:55:00.000Z
common/src/pileups.py
gwcbi/HorvathLabNGS
20c87dfcad236990ce1a3ed6e9d180de10ca9dbc
[ "MIT" ]
null
null
null
import threading import multiprocessing from collections import Counter, namedtuple from pysamimport import pysam from util import BadRead import Queue import time, math, sys class Pileups(object): def __init__(self,loci,samfiles,filter,chrreg): self.loci = loci self.samfiles = samfiles self.filter = filter self.chrreg = chrreg class SerialPileups(Pileups): def iterator(self): samfiles = [] chrommap = [] for al in self.samfiles: samfile = pysam.Samfile(al, "rb") assert samfile._hasIndex(), "Cannot open BAM index for file %s"%sf samfiles.append(samfile) chrommap.append(self.chrreg.chrommap(al)) for snvchr, snvpos, ref, alt, snvextra in self.loci: cnts = Counter() total = Counter() reads = [] snvpos1 = snvpos - 1 for i, samfile in enumerate(samfiles): try: snvlabel = chrommap[i](snvchr) if snvlabel != None: for pileupcolumn in samfile.pileup(snvlabel, snvpos1, snvpos1 + 1, truncate=True): total[i] += pileupcolumn.n for pileupread in pileupcolumn.pileups: try: al, pos, base, nseg = self.filter.test(pileupread) except BadRead, e: cnts[(i, e.message)] += 1 continue reads.append((al, pos, base, i)) cnts[(i, 'Good')] += 1 except ValueError: pass total[i] -= cnts[(i,"GapInQueryAtSNVLocus")] # del cnts[(i,"GapInQueryAtSNVLocus")] yield (snvchr, snvpos, ref, alt, total, reads, cnts) class ThreadedPileups(Pileups): def __init__(self,*args,**kw): super(ThreadedPileups,self).__init__(*args) self.tpb = kw.get('threadsperbam',1) self.nb = len(self.samfiles) self.nt = self.tpb*self.nb self._queue = [] k = 0; for j in range(self.tpb): for i in range(self.nb): self._queue.append(Queue.Queue(20)) t = threading.Thread(target=self.worker,args=(i,j,k)) t.daemon = True t.start() k += 1 time.sleep(1) def worker(self,i,j,k): samfile = pysam.Samfile(self.samfiles[i], "rb") assert samfile._hasIndex(), "Cannot open BAM index for file %s"%sf chrommap = self.chrreg.chrommap(self.samfiles[i]) # blocksize = int(math.ceil(len(self.loci)/self.tpb)) # for l in range(j*blocksize,min((j+1)*blocksize,len(self.loci))): for l in range(j,len(self.loci),self.tpb): snvchr, snvpos, ref, alt, snvextra = self.loci[l] cnts = Counter() total = Counter() reads = [] snvpos1 = snvpos - 1 try: snvlabel = chrommap(snvchr) if snvlabel != None: for pileupcolumn in samfile.pileup(snvlabel, snvpos1, snvpos1 + 1, truncate=True): total[i] += pileupcolumn.n for pileupread in pileupcolumn.pileups: try: al, pos, base, nseg = self.filter.test(pileupread) except BadRead, e: cnts[(i, e.message)] += 1 continue reads.append((al, pos, base, i)) cnts[(i, 'Good')] += 1 except ValueError, e: pass # raise e total[i] -= cnts[(i,"GapInQueryAtSNVLocus")] # del cnts[(i,"GapInQueryAtSNVLocus")] # print >>sys.stderr, (snvchr, snvpos, ref, alt, total, cnts) self._queue[k].put((snvchr, snvpos, ref, alt, total, reads, cnts)) return def iterator(self): k = 0 # for i in range(len(self.loci)): for snvchr, snvpos, ref, alt, snvextra in self.loci: cnts = Counter() total = Counter() reads = [] for i in range(len(self.samfiles)): snvchri, snvposi, refi, alti, totali, readsi, cntsi = self._queue[k].get() assert(snvchri == snvchr and snvposi == snvpos) assert(i in totali or len(totali.keys()) == 0) reads.extend(readsi) cnts.update(cntsi) total.update(totali) self._queue[k].task_done() k = (k+1)%self.nt yield (snvchr, snvpos, ref, alt, total, reads, cnts) PileupAlignment = namedtuple('PileupAlignment',['seq','is_reverse']) class MultiprocPileups(Pileups): # A python class for alignments since the C++ wrapped data-structure # doesn't survive the multiprocess communication process... def __init__(self,*args,**kw): super(MultiprocPileups,self).__init__(*args) self.tpb = kw.get('procperbam',1) self.nb = len(self.samfiles) self.nt = self.tpb*self.nb self._queue = [] k = 0; for j in range(self.tpb): for i in range(self.nb): self._queue.append(multiprocessing.Queue(20)) t = multiprocessing.Process(target=self.worker,args=(i,j,k)) t.daemon = True t.start() k += 1 time.sleep(1) def worker(self,i,j,k): samfile = pysam.Samfile(self.samfiles[i], "rb") assert samfile._hasIndex(), "Cannot open BAM index for file %s"%sf chrommap = self.chrreg.chrommap(self.samfiles[i]) # blocksize = int(math.ceil(len(self.loci)/self.tpb)) # for l in range(j*blocksize,min((j+1)*blocksize,len(self.loci))): for l in range(j,len(self.loci),self.tpb): snvchr, snvpos, ref, alt, snvextra = self.loci[l] cnts = Counter() total = Counter() reads = [] snvpos1 = snvpos - 1 try: snvlabel = chrommap(snvchr) if snvlabel != None: for pileupcolumn in samfile.pileup(snvlabel, snvpos1, snvpos1 + 1, truncate=True): total[i] += pileupcolumn.n for pileupread in pileupcolumn.pileups: try: al, pos, base, nseg = self.filter.test(pileupread) except BadRead, e: cnts[(i, e.message)] += 1 continue reads.append((PileupAlignment(al.seq,al.is_reverse), pos, base, i)) cnts[(i, 'Good')] += 1 except ValueError, e: pass # raise e total[i] -= cnts[(i,"GapInQueryAtSNVLocus")] # del cnts[(i,"GapInQueryAtSNVLocus")] # print >>sys.stderr, (snvchr, snvpos, ref, alt, total, cnts) self._queue[k].put((snvchr, snvpos, ref, alt, total, reads, cnts)) return def iterator(self): k = 0 # for i in range(len(self.loci)): for snvchr, snvpos, ref, alt, snvextra in self.loci: cnts = Counter() total = Counter() reads = [] for i in range(len(self.samfiles)): snvchri, snvposi, refi, alti, totali, readsi, cntsi = self._queue[k].get() assert(snvchri == snvchr and snvposi == snvpos) assert(i in totali or len(totali.keys()) == 0) reads.extend(readsi) cnts.update(cntsi) total.update(totali) # self._queue[k].task_done() k = (k+1)%self.nt yield (snvchr, snvpos, ref, alt, total, reads, cnts)
39.295337
104
0.531382
867
7,584
4.605536
0.167243
0.030053
0.045079
0.054095
0.790133
0.790133
0.779113
0.767092
0.75432
0.739544
0
0.008276
0.346783
7,584
192
105
39.5
0.797739
0.091772
0
0.781818
0
0
0.033193
0
0
0
0
0
0.042424
0
null
null
0.018182
0.042424
null
null
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
7
e01fb1006245c2b1fd3b76f6857b6fec2ef87685
23,695
py
Python
FusionIIIT/applications/leave/forms.py
pTidke/Fusion
7a0da7239bd97df7a9849163c5438c0c917c2e55
[ "bzip2-1.0.6" ]
1
2019-01-24T07:17:54.000Z
2019-01-24T07:17:54.000Z
FusionIIIT/applications/leave/forms.py
sayali1909/Fusion
acb4f43e97f73c0f757511a3e9fcc4e1dff2d0ab
[ "bzip2-1.0.6" ]
1
2019-03-27T20:54:19.000Z
2019-03-27T20:54:19.000Z
FusionIIIT/applications/leave/forms.py
sayali1909/Fusion
acb4f43e97f73c0f757511a3e9fcc4e1dff2d0ab
[ "bzip2-1.0.6" ]
4
2019-01-31T09:50:43.000Z
2019-03-28T09:17:07.000Z
from django import forms from django.contrib.auth.models import User from django.db.models import Q from django.forms import ValidationError as VE from django.forms.formsets import BaseFormSet from django.utils import timezone from applications.leave.models import LeavesCount, LeaveSegment, LeaveType, LeaveSegmentOffline from .helpers import get_leave_days, get_special_leave_count, get_user_choices, get_vacation_leave_count class StudentApplicationForm(forms.Form): STUDENT_LEAVE_CHOICES = ( ('Casual', 'Casual'), ('Medical', 'Medical') ) leave_type = forms.ChoiceField(label='Leave Type', choices=STUDENT_LEAVE_CHOICES) start_date = forms.DateField(label='From') end_date = forms.DateField(label='To') purpose = forms.CharField(label='Purpose', widget=forms.TextInput) address = forms.CharField(label='Address') document = forms.FileField(label='Related Document', required=False) def __init__(self, *args, **kwargs): if 'user' in kwargs: self.user = kwargs.pop('user') super(StudentApplicationForm, self).__init__(*args, **kwargs) def clean(self, *args, **kwargs): super(StudentApplicationForm, self).clean(*args, **kwargs) data = self.cleaned_data errors = dict() today = timezone.now().date() """if data.get('start_date') < today: errors['start_date'] = ['Past Dates are not allowed'] if data.get('end_date') < today: errors['end_date'] = ['Past Dates are not allowed'] """ lt = LeaveType.objects.filter(name=data.get('leave_type')).first() if lt.requires_proof and not data.get('document'): errors['document'] = [f'{lt.name} Leave requires document proof'] if data.get('start_date') > data.get('end_date'): if 'start_date' in errors: errors['start_date'].append('Start Date must be less than End Date') else: errors['start_date'] = ['Start Date must be less than End Date'] leave_type = LeaveType.objects.get(name=data.get('leave_type')) count = get_leave_days(data.get('start_date'), data.get('end_date'), leave_type, False, False) remaining_leaves = LeavesCount.objects.get(user=self.user, leave_type=leave_type) \ .remaining_leaves if remaining_leaves < count: errors['leave_type'] = f'You have only {remaining_leaves} {leave_type.name} leaves' \ ' remaining.' raise VE(errors) class EmployeeCommonForm(forms.Form): purpose = forms.CharField(widget=forms.TextInput) #is_station = forms.BooleanField(initial=False, required=False) leave_info = forms.CharField(label='Information', widget=forms.Textarea, required=False) def clean(self): super(EmployeeCommonForm, self).clean() data = self.cleaned_data #if data.get('is_station') and not data.get('leave_info'): #if not data.get('leave_info'): # raise VE({'leave_info': ['If there is a station leave, provide details about it.']}) if not data.get('purpose'): raise VE({'purpose': ['Please provide purpose of the leave.']}) return self.cleaned_data class LeaveSegmentForm(forms.Form): try: LEAVE_TYPES = list((leave_type.id, leave_type.name) for leave_type in LeaveType.objects.all()) except: LEAVE_TYPES = [] #Changed by Abhay Gupta l_type_fac=list((leave_type.id, leave_type.name) for leave_type in LeaveType.objects.all()) l_type_staff=list((leave_type.id, leave_type.name) for leave_type in LeaveType.objects.filter(for_staff=1)) #l_type=list(leave_type.name for leave_type in LeaveType.objects.all()) leave_type = forms.ChoiceField(label='Leave Type', choices=LEAVE_TYPES) start_date = forms.DateField(label='Leave From', required=True) end_date = forms.DateField(label='Leave To', required=True) document = forms.FileField(label='Related Document', required=False) start_half = forms.BooleanField(label='Half Day at start', required=False) end_half = forms.BooleanField(label='Half Day at end', required=False) address = forms.CharField(label='Out of Station Address', required=False) def clean(self, *args, **kwargs): super(LeaveSegmentForm, self).clean(*args, **kwargs) data = self.cleaned_data errors = dict() def check_special_leave_overlap(start_date, end_date, leave_type_id): leave_type = LeaveType.objects.get(id=leave_type_id) if leave_type.name.lower() in ['restricted']: count = get_special_leave_count(start_date, end_date, leave_type.name.lower()) if count < 0: return 'The period for this leave doesn\'t match with restricted holiday calendar' \ '. Check Academic Calendar.' elif leave_type.name.lower() in ['vacation']: count = get_vacation_leave_count(start_date,end_date,leave_type.name.lower()) if count < 0: return 'The period for this leave doesn\'t match with vacation holidays' \ '. Check Academic Calendar.' return '' if data['start_date'] < data['end_date']: error = check_special_leave_overlap(data.get('start_date'), data.get('end_date'), data.get('leave_type')) if error: if 'leave_type' in errors: errors['leave_type'].append(error) else: errors['leave_type'] = [error, ] elif data['start_date'] == data['end_date']: #if data.get('leave_type')==2: # restricted_holidays=list(res.date for res in RestrictedHoliday.objects.all()) # print(restricted_holidays) # print(data.get('start_date')) if data['start_half'] and data['end_half']: errors['start_half'] = ['Invalid Input'] errors['end_half'] = ['Invalid Input'] else: error = check_special_leave_overlap(data.get('start_date'), data.get('end_date'), data.get('leave_type')) if error: if 'leave_type' in errors: errors['leave_type'].append(error) else: errors['leave_type'] = [error, ] else: errors['start_date'] = ['Start date must not be more than End date.'] #now = timezone.now().date() """if data['start_date'] < now: error = 'You have inserted past date in Start Date Field' if 'start_date' in errors: errors['start_date'].append(error) else: errors['start_date'] = error if data['end_date'] < now: error = 'You have inserted past date in End Date Field' if 'end_date' in errors: errors['end_date'].append(error) else: errors['end_date'] = error """ leave_type = LeaveType.objects.filter(id=data['leave_type']).first() if leave_type and leave_type.requires_proof and not data.get('document'): errors['document'] = [f'{leave_type.name} requires a document for proof.'] #leave_type = LeaveType.objects.filter(id=data['leave_type']).first() if leave_type and leave_type.requires_address and not data.get('address'): errors['address'] = [f'{leave_type.name} requires Out of Station address.'] if errors.keys(): raise VE(errors) return self.cleaned_data class AdminReplacementForm(forms.Form): admin_start_date = forms.DateField(label='From') admin_end_date = forms.DateField(label='To') def __init__(self, *args, **kwargs): if 'user' in kwargs: self.user = kwargs.pop('user') super(AdminReplacementForm, self).__init__(*args, **kwargs) USER_CHOICES = get_user_choices(self.user) # print(USER_CHOICES) self.fields['admin_rep'] = forms.ChoiceField(label='Administrative Responsibility To: ', choices=USER_CHOICES) def clean(self): super(AdminReplacementForm, self).clean() data = self.cleaned_data start_date, end_date = data['admin_start_date'], data['admin_end_date'] errors = dict() if start_date > end_date: errors['admin_start_date'] = ['Administrative Start Date must not be more than the End Date'] """now = timezone.now().date() if data['admin_start_date'] < now: error = 'You have inserted past date.' if 'admin_start_date' in errors: errors['admin_start_date'].append(error) else: errors['admin_start_date'] = error if data['admin_end_date'] < now: error = 'You have inserted past date.' if 'admin_end_date' in errors: errors['admin_end_date'].append(error) else: errors['admin_end_date'] = error""" rep_user = User.objects.get(username=data['admin_rep']) if LeaveSegment.objects.filter(Q(leave__applicant=rep_user), ~Q(leave__status='rejected'), Q(start_date__range=[start_date, end_date]) | Q(end_date__range=[start_date, end_date])).exists(): errors['admin_rep'] = [f'{rep_user.get_full_name()} may be on leave in this period.'] if errors.keys(): raise VE(errors) return self.cleaned_data class AcademicReplacementForm(forms.Form): acad_start_date = forms.DateField(label='From') acad_end_date = forms.DateField(label='To') def __init__(self, *args, **kwargs): if 'user' in kwargs: self.user = kwargs.pop('user') super(AcademicReplacementForm, self).__init__(*args, **kwargs) USER_CHOICES = get_user_choices(self.user) self.fields['acad_rep'] = forms.ChoiceField(label='Academic Responsibility To: ', choices=USER_CHOICES) def clean(self): super(AcademicReplacementForm, self).clean() data = self.cleaned_data errors = dict() start_date, end_date = data['acad_start_date'], data['acad_end_date'] if start_date > end_date: errors['acad_start_date'] = ['Academic Start Date must not be more than End Date'] """now = timezone.now().date() if data['acad_start_date'] < now: error = 'You have inserted past date.' if 'acad_start_date' in errors: errors['acad_start_date'].append(error) else: errors['acad_start_date'] = error if data['acad_end_date'] < now: error = 'You have inserted past date.' if 'acad_end_date' in errors: errors['acad_end_date'].append(error) else: errors['acad_end_date'] = error""" rep_user = User.objects.get(username=data['acad_rep']) if LeaveSegment.objects.filter(Q(leave__applicant=rep_user), ~Q(leave__status='rejected'), Q(start_date__range=[start_date, end_date]) | Q(end_date__range=[start_date, end_date])).exists(): errors['acad_rep'] = [f'{rep_user.get_full_name()} may be on leave in this period.'] if errors.keys(): raise VE(errors) return self.cleaned_data class BaseLeaveFormSet(BaseFormSet): def __init__(self, *args, **kwargs): if 'user' in kwargs: self.user = kwargs.pop('user') super(BaseLeaveFormSet, self).__init__(*args, **kwargs) def clean(self): super(BaseLeaveFormSet, self).clean() curr_year = timezone.now().year leave_counts = LeavesCount.objects.filter(user=self.user, year=curr_year) mapping = dict() for form in self.forms: try: data = form.cleaned_data leave_type = LeaveType.objects.get(id=data.get('leave_type')) #if leave_type.is_station: # continue count = get_leave_days(data.get('start_date'), data.get('end_date'), leave_type, data.get('start_half'), data.get('end_half')) if leave_type in mapping.keys(): mapping[leave_type] += count else: mapping[leave_type] = count except: raise VE('Some error occured, please contact admin.') for key, value in mapping.items(): tp = leave_counts.get(leave_type=key) if tp.remaining_leaves < value: raise VE(f'There are only {tp.remaining_leaves} {tp.leave_type.name} ' f'Leaves remaining and you have filled {value}.') class BaseAcadFormSet(BaseFormSet): def clean(self): pass class BaseAdminFormSet(BaseFormSet): def clean(self): pass class BaseCommonFormSet(BaseFormSet): def clean(self): pass class LeaveSegmentFormOffline(forms.Form): try: LEAVE_TYPES = list((leave_type.id, leave_type.name) for leave_type in LeaveType.objects.all()) except: LEAVE_TYPES = [] #Changed by Abhay Gupta l_type_fac=list((leave_type.id, leave_type.name) for leave_type in LeaveType.objects.all()) l_type_staff=list((leave_type.id, leave_type.name) for leave_type in LeaveType.objects.filter(for_staff=1)) #l_type=list(leave_type.name for leave_type in LeaveType.objects.all()) leave_type = forms.ChoiceField(label='Leave Type', choices=LEAVE_TYPES) start_date = forms.DateField(label='Leave From', required=True) end_date = forms.DateField(label='Leave To', required=True) document = forms.FileField(label='Related Document', required=False) start_half = forms.BooleanField(label='Half Day at start', required=False) end_half = forms.BooleanField(label='Half Day at end', required=False) address = forms.CharField(label='Out of Station Address', required=False) def clean(self, *args, **kwargs): super(LeaveSegmentFormOffline, self).clean(*args, **kwargs) data = self.cleaned_data errors = dict() def check_special_leave_overlap(start_date, end_date, leave_type_id): leave_type = LeaveType.objects.get(id=leave_type_id) if leave_type.name.lower() in ['restricted']: count = get_special_leave_count(start_date, end_date, leave_type.name.lower()) if count < 0: return 'The period for this leave doesn\'t match with Restricted holiday calendar' \ '. Check Academic Calendar.' elif leave_type.name.lower() in ['vacation']: count = get_vacation_leave_count(start_date,end_date,leave_type.name.lower()) if count < 0: return 'The period for this leave doesn\'t match with Vacation holidays' \ '. Check Academic Calendar.' return '' if data['start_date'] < data['end_date']: error = check_special_leave_overlap(data.get('start_date'), data.get('end_date'), data.get('leave_type')) if error: if 'leave_type' in errors: errors['leave_type'].append(error) else: errors['leave_type'] = [error, ] elif data['start_date'] == data['end_date']: if data['start_half'] and data['end_half']: errors['start_half'] = ['Invalid Input'] errors['end_half'] = ['Invalid Input'] else: error = check_special_leave_overlap(data.get('start_date'), data.get('end_date'), data.get('leave_type')) if error: if 'leave_type' in errors: errors['leave_type'].append(error) else: errors['leave_type'] = [error, ] else: errors['start_date'] = ['Start date must not be more than End date.'] leave_type = LeaveType.objects.filter(id=data['leave_type']).first() if leave_type and leave_type.requires_proof and not data.get('document'): errors['document'] = [f'{leave_type.name} requires a document for proof.'] leave_type = LeaveType.objects.filter(id=data['leave_type']).first() if leave_type and leave_type.requires_address and not data.get('address'): errors['address'] = [f'{leave_type.name} requires Out of Station address.'] if errors.keys(): raise VE(errors) return self.cleaned_data class EmployeeCommonFormOffline(forms.Form): purpose = forms.CharField(widget=forms.Textarea) application_date = forms.DateField(label='Application Date') USER_CHOICES = [(usr.username, "{} {}".format(usr.first_name, usr.last_name)) for usr in User.objects.filter(extrainfo__user_type__in=["faculty","staff"]) ] leave_user_select = forms.ChoiceField(label='Choose Employee',choices=USER_CHOICES) #is_station = forms.BooleanField(initial=False, required=False) def clean(self): super(EmployeeCommonFormOffline, self).clean() data = self.cleaned_data if not data.get('purpose'): raise VE({'purpose': ['Please provide purpose of the leave.']}) elif not data.get('application_date'): raise VE({'application_date': ['Please provide the application date of the leave.']}) return self.cleaned_data class AdminReplacementFormOffline(forms.Form): admin_start_date = forms.DateField(label='From') admin_end_date = forms.DateField(label='To') USER_CHOICES = [(usr.username, "{} {}".format(usr.first_name, usr.last_name)) for usr in User.objects.filter(extrainfo__user_type__in=["faculty","staff"]) ] # print(USER_CHOICES) admin_rep = forms.ChoiceField(label='Administrative Responsibility To: ', choices=USER_CHOICES) def clean(self): super(AdminReplacementFormOffline, self).clean() data = self.cleaned_data start_date, end_date = data['admin_start_date'], data['admin_end_date'] errors = dict() if start_date > end_date: errors['admin_start_date'] = ['Administrative Start Date must not be more than End Date'] """now = timezone.now().date() if data['admin_start_date'] < now: error = 'You have inserted past date.' if 'admin_start_date' in errors: errors['admin_start_date'].append(error) else: errors['admin_start_date'] = error if data['admin_end_date'] < now: error = 'You have inserted past date.' if 'admin_end_date' in errors: errors['admin_end_date'].append(error) else: errors['admin_end_date'] = error""" if errors.keys(): raise VE(errors) return self.cleaned_data """ rep_user = User.objects.get(username=data['admin_rep']) if LeaveSegmentOffline.objects.filter(Q(leave__applicant=rep_user), ~Q(leave__status='rejected'), Q(start_date__range=[start_date, end_date]) | Q(end_date__range=[start_date, end_date])).exists(): errors['admin_rep'] = [f'{rep_user.get_full_name()} may be on leave in this period.'] """ class AcademicReplacementFormOffline(forms.Form): acad_start_date = forms.DateField(label='From') acad_end_date = forms.DateField(label='To') USER_CHOICES = [(usr.username, "{} {}".format(usr.first_name, usr.last_name)) for usr in User.objects.filter(extrainfo__user_type="faculty") ] acad_rep = forms.ChoiceField(label='Academic Responsibility To: ', choices=USER_CHOICES) def clean(self): super(AcademicReplacementFormOffline, self).clean() data = self.cleaned_data errors = dict() start_date, end_date = data['acad_start_date'], data['acad_end_date'] if start_date > end_date: errors['acad_start_date'] = ['Academic Start Date must not be more than End Date'] """now = timezone.now().date() if data['acad_start_date'] < now: error = 'You have inserted past date.' if 'acad_start_date' in errors: errors['acad_start_date'].append(error) else: errors['acad_start_date'] = error if data['acad_end_date'] < now: error = 'You have inserted past date.' if 'acad_end_date' in errors: errors['acad_end_date'].append(error) else: errors['acad_end_date'] = error""" if errors.keys(): raise VE(errors) return self.cleaned_data class BaseLeaveFormSetOffline(BaseFormSet): """def __init__(self, *args, **kwargs): if 'user' in kwargs: self.user = kwargs.pop('user') super(BaseLeaveFormSetOffline, self).__init__(*args, **kwargs)""" def clean(self): super(BaseLeaveFormSetOffline, self).clean() curr_year = timezone.now().year data = self.cleaned_data leave_counts = LeavesCount.objects.filter(user=User.objects.get(username=data['leave_user_select']), year=curr_year) mapping = dict() for form in self.forms: try: data = form.cleaned_data leave_type = LeaveType.objects.get(id=data.get('leave_type')) #if leave_type.is_station: # continue count = get_leave_days(data.get('start_date'), data.get('end_date'), leave_type, data.get('start_half'), data.get('end_half')) if leave_type in mapping.keys(): mapping[leave_type] += count else: mapping[leave_type] = count except: raise VE('Some error occured, please contact admin.') for key, value in mapping.items(): tp = leave_counts.get(leave_type=key) if tp.remaining_leaves < value: raise VE(f'There are only {tp.remaining_leaves} {tp.leave_type.name} ' f'Leaves remaining and you have filled {value}.') class BaseLeaveFormSetOffline(BaseFormSet): def clean(self): pass class BaseAcadFormSetOffline(BaseFormSet): def clean(self): pass class BaseAdminFormSetOffline(BaseFormSet): def clean(self): pass class BaseCommonFormSetOffline(BaseFormSet): def clean(self): pass
38.65416
124
0.589576
2,743
23,695
4.884798
0.078017
0.070528
0.022315
0.023882
0.834465
0.820733
0.782446
0.761699
0.72998
0.717889
0
0.00042
0.297194
23,695
612
125
38.71732
0.804179
0.043131
0
0.752137
0
0
0.160088
0.004902
0
0
0
0
0
1
0.068376
false
0.019943
0.022792
0
0.304843
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
16631af14c5dcdb5738b57bb22fb0ecfa2b07b8e
61,028
py
Python
tests/strategies/staggered_orders/test_staggered_orders_complex.py
fakegit/DEXBot
44588f0cd7beb5f50508d966054d5f929818bf76
[ "MIT" ]
249
2018-01-11T09:08:30.000Z
2022-03-20T23:05:29.000Z
tests/strategies/staggered_orders/test_staggered_orders_complex.py
fakegit/DEXBot
44588f0cd7beb5f50508d966054d5f929818bf76
[ "MIT" ]
541
2018-01-10T12:56:08.000Z
2021-12-22T02:22:09.000Z
tests/strategies/staggered_orders/test_staggered_orders_complex.py
fakegit/DEXBot
44588f0cd7beb5f50508d966054d5f929818bf76
[ "MIT" ]
164
2018-01-22T07:01:56.000Z
2022-03-21T06:00:33.000Z
import logging import math import time from datetime import datetime import pytest from bitshares.amount import Amount # Turn on debug for dexbot logger log = logging.getLogger("dexbot") log.setLevel(logging.DEBUG) MODES = ['mountain', 'valley', 'neutral', 'buy_slope', 'sell_slope'] ################### # Most complex methods which depends on high-level methods ################### def test_maintain_strategy_manual_cp_empty_market(worker): """On empty market, center price should be set to manual CP.""" worker.cancel_all_orders() # Undefine market_center_price worker.market_center_price = None # Workaround for https://github.com/Codaone/DEXBot/issues/566 worker.last_check = datetime(2000, 1, 1) worker.maintain_strategy() assert worker.market_center_price == worker.center_price def test_maintain_strategy_no_manual_cp_empty_market(worker): """Strategy should not work on empty market if no manual CP was set.""" worker.cancel_all_orders() # Undefine market_center_price worker.market_center_price = None worker.center_price = None # Workaround for https://github.com/Codaone/DEXBot/issues/566 worker.last_check = datetime(2000, 1, 1) worker.maintain_strategy() assert worker.market_center_price is None def test_maintain_strategy_no_operation_results(worker, monkeypatch): """https://github.com/Codaone/DEXBot/issues/764.""" def mock(*args, **kwargs): return {'operation_results': None} monkeypatch.setattr(worker, 'retry_action', mock) worker.maintain_strategy() # Run twice! worker.maintain_strategy() @pytest.mark.parametrize('mode', MODES) def test_maintain_strategy_basic(mode, worker, do_initial_allocation): """Check if intial orders placement is correct.""" worker = do_initial_allocation(worker, mode) # Check target spread is reached assert worker.get_actual_spread() == pytest.approx(worker.target_spread, abs=(worker.increment / 2)) # Check number of orders price = worker.center_price * math.sqrt(1 + worker.target_spread) sell_orders_count = worker.calc_sell_orders_count(price, worker.upper_bound) assert len(worker.sell_orders) == sell_orders_count price = worker.center_price / math.sqrt(1 + worker.target_spread) buy_orders_count = worker.calc_buy_orders_count(price, worker.lower_bound) assert len(worker.buy_orders) == buy_orders_count # Make sure balances are allocated after full maintenance # Unallocated balances are less than closest order amount assert worker.base_balance['amount'] < worker.buy_orders[0]['base']['amount'] assert worker.quote_balance['amount'] < worker.sell_orders[0]['base']['amount'] # Test how ranges are covered # Expect furthest order price to be less than increment x2 assert worker.buy_orders[-1]['price'] < worker.lower_bound * (1 + worker.increment * 2) assert worker.sell_orders[-1]['price'] ** -1 > worker.upper_bound / (1 + worker.increment * 2) @pytest.mark.parametrize('mode', MODES) def test_maintain_strategy_one_sided(mode, base_worker, config_only_base, do_initial_allocation): """Test for one-sided start (buy only)""" worker = base_worker(config_only_base) do_initial_allocation(worker, mode) # Check number of orders price = worker.center_price / math.sqrt(1 + worker.target_spread) buy_orders_count = worker.calc_buy_orders_count(price, worker.lower_bound) assert len(worker.buy_orders) == buy_orders_count # Make sure balances are allocated after full maintenance # Unallocated balances are less than closest order amount assert worker.base_balance['amount'] < worker.buy_orders[0]['base']['amount'] # Test how ranges are covered # Expect furthest order price to be less than increment x2 assert worker.buy_orders[-1]['price'] < worker.lower_bound * (1 + worker.increment * 2) def test_maintain_strategy_1sat(base_worker, config_1_sat, do_initial_allocation): worker = base_worker(config_1_sat) do_initial_allocation(worker, worker.mode) # Check target spread is reached assert worker.get_actual_spread() == pytest.approx(worker.target_spread, abs=(worker.increment / 2)) # Check number of orders price = worker.center_price * math.sqrt(1 + worker.target_spread) sell_orders_count = worker.calc_sell_orders_count(price, worker.upper_bound) assert len(worker.sell_orders) == sell_orders_count price = worker.center_price / math.sqrt(1 + worker.target_spread) buy_orders_count = worker.calc_buy_orders_count(price, worker.lower_bound) assert len(worker.buy_orders) == buy_orders_count # Make sure balances are allocated after full maintenance # Unallocated balances are less than closest order amount assert worker.base_balance['amount'] < worker.buy_orders[0]['base']['amount'] assert worker.quote_balance['amount'] < worker.sell_orders[0]['base']['amount'] # Test how ranges are covered # Expect furthest order price to be less than increment x2 assert worker.buy_orders[-1]['price'] < worker.lower_bound * (1 + worker.increment * 2) assert worker.sell_orders[-1]['price'] ** -1 > worker.upper_bound / (1 + worker.increment * 2) # Combine each mode with base and quote @pytest.mark.parametrize('asset', ['base', 'quote']) def test_maintain_strategy_fallback_logic(asset, worker, do_initial_allocation): """Check fallback logic: when spread is not reached, furthest order should be cancelled to make free funds to close spread.""" do_initial_allocation(worker, worker.mode) # TODO: strategy must turn off bootstrapping once target spread is reached worker['bootstrapping'] = False if asset == 'base': worker.cancel_orders_wrapper(worker.buy_orders[0]) amount = worker.balance(worker.market['base']['symbol']) worker.bitshares.reserve(amount, account=worker.account) elif asset == 'quote': worker.cancel_orders_wrapper(worker.sell_orders[0]) amount = worker.balance(worker.market['quote']['symbol']) worker.bitshares.reserve(amount, account=worker.account) worker.refresh_orders() spread_before = worker.get_actual_spread() assert spread_before > worker.target_spread + worker.increment for _ in range(0, 6): worker.maintain_strategy() worker.refresh_orders() spread_after = worker.get_actual_spread() assert spread_after <= worker.target_spread + worker.increment @pytest.mark.parametrize('asset', ['base', 'quote']) def test_maintain_strategy_fallback_logic_disabled(asset, worker, do_initial_allocation): """Check fallback logic: when spread is not reached, furthest order should be cancelled to make free funds to close spread.""" worker.enable_fallback_logic = False worker.operational_depth = 2 do_initial_allocation(worker, 'valley') # TODO: strategy must turn off bootstrapping once target spread is reached worker['bootstrapping'] = False if asset == 'base': worker.cancel_orders_wrapper(worker.buy_orders[:3]) amount = worker.buy_orders[0]['base'] * 3 worker.bitshares.reserve(amount, account=worker.account) elif asset == 'quote': worker.cancel_orders_wrapper(worker.sell_orders[:3]) amount = worker.sell_orders[0]['base'] * 3 worker.bitshares.reserve(amount, account=worker.account) worker.refresh_orders() spread_before = worker.get_actual_spread() assert spread_before > worker.target_spread + worker.increment for _ in range(0, 6): worker.maintain_strategy() worker.refresh_orders() spread_after = worker.get_actual_spread() assert spread_after == spread_before # Also check that operational depth is proper assert len(worker.real_buy_orders) == pytest.approx(worker.operational_depth, abs=1) assert len(worker.real_sell_orders) == pytest.approx(worker.operational_depth, abs=1) def test_check_operational_depth(worker, do_initial_allocation): """Test for correct operational depth following.""" worker.operational_depth = 10 do_initial_allocation(worker, worker.mode) worker['bootstrapping'] = False # abs=1 means we're accepting slight error assert len(worker.buy_orders) == pytest.approx(worker.operational_depth, abs=1) assert len(worker.sell_orders) == pytest.approx(worker.operational_depth, abs=1) worker.operational_depth = 2 worker.refresh_orders() worker.check_operational_depth(worker.real_buy_orders, worker.virtual_buy_orders) worker.check_operational_depth(worker.real_sell_orders, worker.virtual_sell_orders) assert len(worker.real_buy_orders) == pytest.approx(worker.operational_depth, abs=1) assert len(worker.real_sell_orders) == pytest.approx(worker.operational_depth, abs=1) worker.operational_depth = 8 worker.refresh_orders() worker.check_operational_depth(worker.real_buy_orders, worker.virtual_buy_orders) worker.check_operational_depth(worker.real_sell_orders, worker.virtual_sell_orders) assert len(worker.real_buy_orders) == pytest.approx(worker.operational_depth, abs=1) assert len(worker.real_sell_orders) == pytest.approx(worker.operational_depth, abs=1) def test_increase_order_sizes_valley_basic(worker, do_initial_allocation, issue_asset, increase_until_allocated): """Test increases in valley mode when all orders are equal (new allocation round).""" do_initial_allocation(worker, 'valley') # Double worker's balance issue_asset(worker.market['base']['symbol'], worker.base_total_balance, worker.account.name) issue_asset(worker.market['quote']['symbol'], worker.quote_total_balance, worker.account.name) increase_until_allocated(worker) # All orders must be equal-sized for order in worker.buy_orders: assert order['base']['amount'] == worker.buy_orders[0]['base']['amount'] for order in worker.sell_orders: assert order['base']['amount'] == worker.sell_orders[0]['base']['amount'] def test_increase_order_sizes_valley_direction(worker, do_initial_allocation, issue_asset, increase_until_allocated): """ Test increase direction in valley mode: new allocation round must be started from closest order. Buy side, amounts in BASE: 100 100 100 100 100 100 100 100 100 115 100 100 100 115 115 100 100 115 115 115 """ do_initial_allocation(worker, 'valley') # Add balance to increase several orders; 1.01 to mitigate rounding issues increase_factor = max(1 + worker.increment, worker.min_increase_factor) to_issue = worker.buy_orders[0]['base']['amount'] * (increase_factor - 1) * 3 * 1.01 issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) to_issue = worker.sell_orders[0]['base']['amount'] * (increase_factor - 1) * 3 * 1.01 issue_asset(worker.market['quote']['symbol'], to_issue, worker.account.name) increase_until_allocated(worker) for order in worker.buy_orders: assert order['base']['amount'] <= worker.buy_orders[0]['base']['amount'] for order in worker.sell_orders: assert order['base']['amount'] <= worker.sell_orders[0]['base']['amount'] def test_increase_order_sizes_valley_transit_from_mountain(worker, do_initial_allocation, issue_asset): """ Transition from mountain to valley. Buy side, amounts in BASE, increase should be like this: 70 80 90 100 <c> 80 80 90 100 <c> 80 90 90 100 <c> 90 90 90 100 <c> """ # Set up mountain do_initial_allocation(worker, 'mountain') # Switch to valley worker.mode = 'valley' for _ in range(0, 6): # Add balance to increase ~1 order to_issue = worker.buy_orders[0]['base']['amount'] issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) previous_buy_orders = worker.buy_orders worker.refresh_balances() worker.increase_order_sizes('base', worker.base_balance, previous_buy_orders) worker.refresh_orders() for i in range(-1, -6, -1): if ( previous_buy_orders[i]['base']['amount'] < previous_buy_orders[i - 1]['base']['amount'] and previous_buy_orders[i - 1]['base']['amount'] - previous_buy_orders[i]['base']['amount'] > previous_buy_orders[i]['base']['amount'] * worker.increment / 2 ): # Expect increased order if closer order is bigger than further assert worker.buy_orders[i]['base']['amount'] > previous_buy_orders[i]['base']['amount'] # Only one check at a time break def test_increase_order_sizes_valley_smaller_closest_orders(worker, do_initial_allocation, increase_until_allocated): """ Test increase when closest-to-center orders are less than further orders. Normal situation when initial sides are imbalanced and several orders were filled. Buy side, amounts in BASE: 100 100 100 10 10 10 <center> """ worker = do_initial_allocation(worker, 'valley') increase_until_allocated(worker) # Cancel several closest orders num_orders_to_cancel = 3 num_orders_before = len(worker.own_orders) worker.cancel_orders_wrapper(worker.buy_orders[:num_orders_to_cancel]) worker.cancel_orders_wrapper(worker.sell_orders[:num_orders_to_cancel]) worker.refresh_orders() worker.refresh_balances() # Place limited orders initial_base = worker.buy_orders[0]['base']['amount'] initial_quote = worker.sell_orders[0]['base']['amount'] base_limit = initial_base / 2 quote_limit = initial_quote / 2 for _ in range(0, num_orders_to_cancel): worker.place_closer_order('base', worker.buy_orders[0], own_asset_limit=base_limit) worker.place_closer_order('quote', worker.sell_orders[0], own_asset_limit=quote_limit) worker.refresh_orders() increase_until_allocated(worker) # Number of orders should be the same num_orders_after = len(worker.own_orders) assert num_orders_before == num_orders_after # New orders amounts should be equal to initial ones # TODO: this relaxed test checks next closest orders because due to fp calculations closest orders may remain not # increased assert worker.buy_orders[1]['base']['amount'] == initial_base assert worker.sell_orders[1]['base']['amount'] == initial_quote def test_increase_order_sizes_valley_imbalaced_small_further(worker, do_initial_allocation, increase_until_allocated): """ If furthest orders are smaller than closest, they should be increased first. See https://github.com/Codaone/DEXBot/issues/444 for details. Buy side, amounts in BASE: 5 5 5 100 100 10 10 10 <center> Should be: 10 10 10 100 100 10 10 10 <center> """ worker = do_initial_allocation(worker, 'valley') # Cancel several closest orders num_orders_to_cancel = 3 worker.cancel_orders_wrapper(worker.buy_orders[:num_orders_to_cancel]) # Cancel furthest orders worker.cancel_orders_wrapper(worker.buy_orders[-num_orders_to_cancel:]) worker.refresh_orders() worker.refresh_balances() # Place limited orders initial_base = worker.buy_orders[0]['base']['amount'] base_limit = initial_base / 2 for i in range(0, num_orders_to_cancel): # Place smaller closer order worker.place_closer_order('base', worker.buy_orders[0], own_asset_limit=base_limit) # place_further_order() doesn't have own_asset_limit, so do own calculation further_order = worker.place_further_order('base', worker.buy_orders[-1], place_order=False) # Place smaller further order to_buy = base_limit / further_order['price'] worker.place_market_buy_order(to_buy, further_order['price']) worker.refresh_orders() # Drop excess balance to only allow one increase round worker.refresh_balances() increase_factor = max(1 + worker.increment, worker.min_increase_factor) to_keep = base_limit * (increase_factor - 1) * num_orders_to_cancel * 2 * 1.01 to_drop = worker.base_balance['amount'] - to_keep amount = Amount(to_drop, worker.market['base']['symbol'], bitshares_instance=worker.bitshares) worker.bitshares.reserve(amount, account=worker.account) increase_until_allocated(worker) for i in range(1, num_orders_to_cancel): further_order_amount = worker.buy_orders[-i]['base']['amount'] closer_order_amount = worker.buy_orders[i - 1]['base']['amount'] assert further_order_amount == closer_order_amount def test_increase_order_sizes_valley_closest_order(worker, do_initial_allocation, issue_asset): """Should test proper calculation of closest order: order should not be less that min_increase_factor.""" worker = do_initial_allocation(worker, 'valley') # Add balance to increase 2 orders increase_factor = max(1 + worker.increment, worker.min_increase_factor) to_issue = worker.buy_orders[0]['base']['amount'] * (increase_factor - 1) * 2 issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) previous_buy_orders = worker.buy_orders worker.refresh_balances() worker.increase_order_sizes('base', worker.base_balance, previous_buy_orders) worker.refresh_orders() assert worker.buy_orders[0]['base']['amount'] - previous_buy_orders[0]['base']['amount'] == pytest.approx( previous_buy_orders[0]['base']['amount'] * (increase_factor - 1) ) def test_increase_order_sizes_mountain_basic(worker, do_initial_allocation, issue_asset, increase_until_allocated): """ Test increases in mountain mode when all orders are equal (new allocation round). New orders should be equal in their "quote" """ do_initial_allocation(worker, 'mountain') increase_until_allocated(worker) # Double worker's balance issue_asset(worker.market['base']['symbol'], worker.base_total_balance, worker.account.name) issue_asset(worker.market['quote']['symbol'], worker.quote_total_balance, worker.account.name) increase_until_allocated(worker) # All orders must be equal-sized in their quote, accept difference no more than increase_factor. # This means all orders was increased and probably unfinished increase round may remain. increase_factor = max(1 + worker.increment, worker.min_increase_factor) for order in worker.buy_orders: assert order['quote']['amount'] == pytest.approx(worker.buy_orders[0]['quote']['amount'], rel=(increase_factor)) for order in worker.sell_orders: assert order['quote']['amount'] == pytest.approx( worker.sell_orders[0]['quote']['amount'], rel=(increase_factor) ) def test_increase_order_sizes_mountain_direction(worker, do_initial_allocation, issue_asset, increase_until_allocated): """ Test increase direction in mountain mode. Buy side, amounts in QUOTE: 10 10 10 10 10 15 10 10 10 10 15 15 10 10 10 15 15 15 10 10 """ do_initial_allocation(worker, 'mountain') increase_until_allocated(worker) worker.mode = 'mountain' increase_factor = max(1 + worker.increment, worker.min_increase_factor) for i in range(-1, -6, -1): # Add balance to increase ~1 order to_issue = worker.buy_orders[i]['base']['amount'] * (increase_factor - 1) issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) previous_buy_orders = worker.buy_orders worker.refresh_balances() worker.increase_order_sizes('base', worker.base_balance, previous_buy_orders) worker.refresh_orders() for i in range(-1, -6, -1): if ( previous_buy_orders[i]['quote']['amount'] > previous_buy_orders[i - 1]['quote']['amount'] and previous_buy_orders[i]['quote']['amount'] - previous_buy_orders[i - 1]['quote']['amount'] > previous_buy_orders[i - 1]['quote']['amount'] * worker.increment / 2 ): # Expect increased order if further order is bigger than closer assert worker.buy_orders[i - 1]['quote']['amount'] > previous_buy_orders[i - 1]['quote']['amount'] # Only one check at a time break def test_increase_order_sizes_mountain_furthest_order( worker, do_initial_allocation, increase_until_allocated, issue_asset ): """Should test proper calculation of furthest order: try to maximize, don't allow too small increase.""" do_initial_allocation(worker, 'mountain') previous_buy_orders = worker.buy_orders # Add balance to increase ~1 order increase_factor = max(1 + worker.increment, worker.min_increase_factor) to_issue = worker.buy_orders[-1]['base']['amount'] * (increase_factor - 1) * 1.1 issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) worker.refresh_balances() increase_until_allocated(worker) worker.refresh_orders() assert worker.buy_orders[-1]['base']['amount'] - previous_buy_orders[-1]['base']['amount'] == pytest.approx( previous_buy_orders[-1]['base']['amount'] * (increase_factor - 1), rel=(10 ** -worker.market['base']['precision']), ) def test_increase_order_sizes_mountain_imbalanced(worker, do_initial_allocation): """ Test situation when sides was imbalances, several orders filled on opposite side. This also tests transition from vally to mountain. Buy side, amounts in QUOTE: 100 100 100 10 10 10 <c> 100 100 100 20 10 10 <c> 100 100 100 20 20 10 <c> """ do_initial_allocation(worker, 'mountain') worker.mode = 'mountain' # Cancel several closest orders num_orders_to_cancel = 3 worker.cancel_orders_wrapper(worker.buy_orders[:num_orders_to_cancel]) worker.refresh_orders() worker.refresh_balances() # Place limited orders initial_base = worker.buy_orders[0]['base']['amount'] base_limit = initial_base / 2 # Add own_asset_limit only for first new order worker.place_closer_order('base', worker.buy_orders[0], own_asset_limit=base_limit) worker.refresh_orders() for _ in range(1, num_orders_to_cancel): worker.place_closer_order('base', worker.buy_orders[0]) worker.refresh_orders() previous_buy_orders = worker.buy_orders for _ in range(0, num_orders_to_cancel): worker.refresh_balances() worker.increase_order_sizes('base', worker.base_balance, worker.buy_orders) worker.refresh_orders() for order_index in range(0, num_orders_to_cancel): order = worker.buy_orders[order_index] if ( previous_buy_orders[order_index]['quote']['amount'] < previous_buy_orders[order_index + 1]['quote']['amount'] and previous_buy_orders[order_index + 1]['base']['amount'] - previous_buy_orders[order_index]['base']['amount'] > previous_buy_orders[order_index]['base']['amount'] * worker.increment / 2 ): # If order before increase was smaller than further order, expect to see it increased assert order['quote']['amount'] > previous_buy_orders[order_index]['quote']['amount'] break def test_increase_order_sizes_neutral_basic(worker, do_initial_allocation, issue_asset, increase_until_allocated): """Test increases in neutral mode when all orders are equal (new allocation round)""" do_initial_allocation(worker, 'neutral') increase_until_allocated(worker) # Double worker's balance issue_asset(worker.market['base']['symbol'], worker.base_total_balance, worker.account.name) issue_asset(worker.market['quote']['symbol'], worker.quote_total_balance, worker.account.name) increase_until_allocated(worker) increase_factor = max(1 + worker.increment, worker.min_increase_factor) for index, order in enumerate(worker.buy_orders): if index == 0: continue # Assume amounts are equal within some tolerance, or accept difference at increase_factor size to detect new # unfinished increase round assert ( order['base']['amount'] == pytest.approx( worker.buy_orders[index - 1]['base']['amount'] / math.sqrt(1 + worker.increment), rel=(10 ** -worker.market['base']['precision']), ) ) or ( order['base']['amount'] == pytest.approx( worker.buy_orders[index - 1]['base']['amount'] / math.sqrt(1 + worker.increment) / increase_factor, rel=(10 ** -worker.market['base']['precision']), ) ) for index, order in enumerate(worker.sell_orders): if index == 0: continue assert ( order['base']['amount'] == pytest.approx( worker.sell_orders[index - 1]['base']['amount'] / math.sqrt(1 + worker.increment), rel=(10 ** -worker.market['quote']['precision']), ) ) or ( order['base']['amount'] == pytest.approx( worker.sell_orders[index - 1]['base']['amount'] / math.sqrt(1 + worker.increment) / increase_factor, rel=(10 ** -worker.market['quote']['precision']), ) ) def test_increase_order_sizes_neutral_direction(worker, do_initial_allocation, issue_asset, increase_until_allocated): """ Test increase direction in neutral mode: new allocation round must be started from closest order. Buy side, amounts in BASE: 100 100 100 100 100 100 100 100 100 115 100 100 100 114 115 100 100 113 114 115 """ do_initial_allocation(worker, 'neutral') # Add balance to increase several orders increase_factor = max(1 + worker.increment, worker.min_increase_factor) to_issue = worker.buy_orders[0]['base']['amount'] * (increase_factor - 1) * 3 issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) to_issue = worker.sell_orders[0]['base']['amount'] * (increase_factor - 1) * 3 issue_asset(worker.market['quote']['symbol'], to_issue, worker.account.name) increase_until_allocated(worker) for order in worker.buy_orders: assert order['base']['amount'] <= worker.buy_orders[0]['base']['amount'] for order in worker.sell_orders: assert order['base']['amount'] <= worker.sell_orders[0]['base']['amount'] def test_increase_order_sizes_neutral_transit_from_mountain(worker, do_initial_allocation, issue_asset): """ Transition from mountain to neutral. Buy side, amounts in BASE, increase should be like this: 70 80 90 100 <c> 80 80 90 100 <c> 80 90 90 100 <c> 90 90 90 100 <c> """ # Set up mountain do_initial_allocation(worker, 'mountain') # Switch to neutral worker.mode = 'neutral' # Add balance to increase several orders to_issue = worker.buy_orders[0]['base']['amount'] * 10 issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) for _ in range(0, 6): previous_buy_orders = worker.buy_orders worker.refresh_balances() worker.increase_order_sizes('base', worker.base_balance, previous_buy_orders) worker.refresh_orders() for i in range(-1, -6, -1): if ( previous_buy_orders[i]['base']['amount'] < previous_buy_orders[i - 1]['base']['amount'] and previous_buy_orders[i - 1]['base']['amount'] - previous_buy_orders[i]['base']['amount'] > previous_buy_orders[i]['base']['amount'] * worker.increment / 2 ): # Expect increased order if closer order is bigger than further assert worker.buy_orders[i]['base']['amount'] > previous_buy_orders[i]['base']['amount'] # Only one check at a time break def test_increase_order_sizes_neutral_smaller_closest_orders(worker, do_initial_allocation, increase_until_allocated): """ Test increase when closest-to-center orders are less than further orders. Normal situation when initial sides are imbalanced and several orders were filled. Buy side, amounts in BASE: 100 100 100 10 10 10 <center> """ worker = do_initial_allocation(worker, 'neutral') increase_until_allocated(worker) initial_base = worker.buy_orders[0]['base']['amount'] initial_quote = worker.sell_orders[0]['base']['amount'] # Cancel several closest orders num_orders_to_cancel = 3 worker.cancel_orders_wrapper(worker.buy_orders[:num_orders_to_cancel]) worker.cancel_orders_wrapper(worker.sell_orders[:num_orders_to_cancel]) worker.refresh_orders() worker.refresh_balances() # Place limited orders base_limit = initial_base / 2 quote_limit = initial_quote / 2 worker.place_closer_order('base', worker.buy_orders[0], own_asset_limit=base_limit) worker.place_closer_order('quote', worker.sell_orders[0], own_asset_limit=quote_limit) worker.refresh_orders() for _ in range(1, num_orders_to_cancel): worker.place_closer_order('base', worker.buy_orders[0]) worker.place_closer_order('quote', worker.sell_orders[0]) worker.refresh_orders() increase_until_allocated(worker) increase_factor = max(1 + worker.increment, worker.min_increase_factor) # New closest orders amount should be equal to initial ones assert worker.buy_orders[0]['base']['amount'] == pytest.approx( initial_base, rel=(0.1 * increase_factor * initial_base) ) assert worker.sell_orders[0]['base']['amount'] == pytest.approx( initial_quote, rel=(0.1 * increase_factor * initial_quote) ) def test_increase_order_sizes_neutral_imbalaced_small_further(worker, do_initial_allocation, increase_until_allocated): """ If furthest orders are smaller than closest, they should be increased first. See https://github.com/Codaone/DEXBot/issues/444 for details. Buy side, amounts in BASE: 5 5 5 100 100 10 10 10 <center> Should be: 10 10 10 100 100 10 10 10 <center> """ worker = do_initial_allocation(worker, 'neutral') # Cancel several closest orders num_orders_to_cancel = 3 worker.cancel_orders_wrapper(worker.buy_orders[:num_orders_to_cancel]) # Cancel furthest orders worker.cancel_orders_wrapper(worker.buy_orders[-num_orders_to_cancel:]) worker.refresh_orders() worker.refresh_balances() # Place limited orders initial_base = worker.buy_orders[0]['base']['amount'] base_limit = initial_base / 2 # Apply limit only for first order worker.place_closer_order('base', worker.buy_orders[0], own_asset_limit=base_limit) # place_further_order() doesn't have own_asset_limit, so do own calculation further_order = worker.place_further_order('base', worker.buy_orders[-1], place_order=False) worker.place_market_buy_order(base_limit / further_order['price'], further_order['price']) worker.refresh_orders() # Place remaining limited orders for i in range(1, num_orders_to_cancel): worker.place_closer_order('base', worker.buy_orders[0]) worker.place_further_order('base', worker.buy_orders[-1]) worker.refresh_orders() # Drop excess balance to only allow one increase round worker.refresh_balances() increase_factor = max(1 + worker.increment, worker.min_increase_factor) to_keep = base_limit * (increase_factor - 1) * num_orders_to_cancel * 2 to_drop = worker.base_balance['amount'] - to_keep amount = Amount(to_drop, worker.market['base']['symbol'], bitshares_instance=worker.bitshares) worker.bitshares.reserve(amount, account=worker.account) increase_until_allocated(worker) for i in range(1, num_orders_to_cancel): # This is a simple check without precise calculation # We're roughly checking that new furthest orders are not exceeds new closest orders further_order_amount = worker.buy_orders[-i]['base']['amount'] closer_order_amount = worker.buy_orders[i - 1]['base']['amount'] assert further_order_amount < closer_order_amount def test_increase_order_sizes_neutral_closest_order( worker, do_initial_allocation, increase_until_allocated, issue_asset ): """Should test proper calculation of closest order: order should not be less that min_increase_factor.""" worker = do_initial_allocation(worker, 'neutral') increase_until_allocated(worker) # Add balance to increase 2 orders increase_factor = max(1 + worker.increment, worker.min_increase_factor) to_issue = worker.buy_orders[0]['base']['amount'] * (increase_factor - 1) * 2 issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) previous_buy_orders = worker.buy_orders worker.refresh_balances() worker.increase_order_sizes('base', worker.base_balance, previous_buy_orders) worker.refresh_orders() assert worker.buy_orders[0]['base']['amount'] - previous_buy_orders[0]['base']['amount'] == pytest.approx( previous_buy_orders[0]['base']['amount'] * (increase_factor - 1), rel=(10 ** -worker.market['base']['precision']), ) def test_increase_order_sizes_buy_slope(worker, do_initial_allocation, issue_asset, increase_until_allocated): """Check correct orders sizes on both sides.""" do_initial_allocation(worker, 'buy_slope') # Double worker's balance issue_asset(worker.market['base']['symbol'], worker.base_total_balance, worker.account.name) issue_asset(worker.market['quote']['symbol'], worker.quote_total_balance, worker.account.name) increase_until_allocated(worker) increase_factor = max(1 + worker.increment, worker.min_increase_factor) for order in worker.buy_orders: # All buy orders must be equal-sized in BASE assert order['base']['amount'] == worker.buy_orders[0]['base']['amount'] for index, order in enumerate(worker.sell_orders): # Sell orders are equal-sized in BASE asset or diff is equal to increase_factor if index == 0: continue assert ( order['quote']['amount'] == pytest.approx( worker.sell_orders[index - 1]['quote']['amount'], rel=(10 ** -worker.market['base']['precision']) ) ) or ( order['quote']['amount'] == pytest.approx( worker.sell_orders[index - 1]['quote']['amount'] * increase_factor, rel=(0.1 * increase_factor * order['quote']['amount']), ) ) def test_increase_order_sizes_sell_slope(worker, do_initial_allocation, issue_asset, increase_until_allocated): """Check correct orders sizes on both sides.""" do_initial_allocation(worker, 'sell_slope') # Double worker's balance issue_asset(worker.market['base']['symbol'], worker.base_total_balance, worker.account.name) issue_asset(worker.market['quote']['symbol'], worker.quote_total_balance, worker.account.name) increase_until_allocated(worker) increase_factor = max(1 + worker.increment, worker.min_increase_factor) for index, order in enumerate(worker.buy_orders): # All buy orders must be equal-sized in market QUOTE or diff is equal to increase_factor if index == 0: continue assert ( order['quote']['amount'] == pytest.approx( worker.buy_orders[index - 1]['quote']['amount'], rel=(10 ** -worker.market['quote']['precision']) ) ) or ( order['quote']['amount'] == pytest.approx( worker.buy_orders[index - 1]['quote']['amount'] * increase_factor, rel=(0.1 * increase_factor * order['quote']['amount']), ) ) for order in worker.sell_orders: # All sell orders must be equal-sized in market QUOTE assert order['base']['amount'] == worker.sell_orders[0]['base']['amount'] # Note: no other tests for slope modes because they are combined modes. If valley and mountain are ok, so slopes too def test_allocate_asset_basic(worker): """Check that free balance is shrinking after each allocation and spread is decreasing.""" worker.refresh_balances() spread_after = worker.get_actual_spread() # Allocate asset until target spread will be reached while spread_after >= worker.target_spread + worker.increment: free_base = worker.base_balance free_quote = worker.quote_balance spread_before = worker.get_actual_spread() worker.allocate_asset('base', free_base) worker.allocate_asset('quote', free_quote) worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) spread_after = worker.get_actual_spread() # Update whistory of balance changes worker.base_balance_history.append(worker.base_balance['amount']) worker.quote_balance_history.append(worker.quote_balance['amount']) if len(worker.base_balance_history) > 3: del worker.base_balance_history[0] del worker.quote_balance_history[0] # Free balance is shrinking after each allocation assert worker.base_balance < free_base or worker.quote_balance < free_quote # Actual spread is decreasing assert spread_after < spread_before def test_allocate_asset_replace_closest_partial_order(worker, other_worker, do_initial_allocation, issue_asset): """Test that partially filled order is replaced when target spread is not reached, before placing closer order.""" do_initial_allocation(worker, worker.mode) # Sell some quote from another account to make PF order on buy side price = worker.buy_orders[0]['price'] / 1.01 amount = worker.buy_orders[0]['quote']['amount'] * (1 - worker.partial_fill_threshold * 1.1) other_worker.place_market_sell_order(amount, price) # Fill sell order price = worker.sell_orders[0]['price'] ** -1 * 1.01 amount = worker.sell_orders[0]['base']['amount'] other_worker.place_market_buy_order(amount, price) # Expect replaced closest buy order worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) worker.allocate_asset('base', worker.base_balance) worker.refresh_orders() assert worker.buy_orders[0]['base']['amount'] == worker.buy_orders[0]['for_sale']['amount'] def test_allocate_asset_replace_partially_filled_orders( worker, other_worker, do_initial_allocation, issue_asset, maintain_until_allocated ): """ Check replacement of partially filled orders on both sides. Simple check. """ do_initial_allocation(worker, worker.mode) # TODO: automatically turn off bootstrapping after target spread is closed? worker['bootstrapping'] = False # Partially fill closest orders price = worker.buy_orders[0]['price'] amount = worker.buy_orders[0]['quote']['amount'] / 2 log.debug('Filling {} @ {}'.format(amount, price)) other_worker.place_market_sell_order(amount, price) price = worker.sell_orders[0]['price'] ** -1 amount = worker.sell_orders[0]['base']['amount'] / 2 log.debug('Filling {} @ {}'.format(amount, price)) other_worker.place_market_buy_order(amount, price) # Add some balance to worker to_issue = worker.buy_orders[0]['base']['amount'] issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) to_issue = worker.sell_orders[0]['base']['amount'] issue_asset(worker.market['quote']['symbol'], to_issue, worker.account.name) maintain_until_allocated(worker) worker.refresh_orders() assert worker.buy_orders[0]['base']['amount'] == worker.buy_orders[0]['for_sale']['amount'] assert worker.sell_orders[0]['base']['amount'] == worker.sell_orders[0]['for_sale']['amount'] def test_allocate_asset_increase_orders(worker, do_initial_allocation, maintain_until_allocated, issue_asset): """Add balance, expect increased orders.""" do_initial_allocation(worker, worker.mode) order_ids = [order['id'] for order in worker.own_orders] balance_in_orders_before = worker.get_allocated_assets(order_ids) to_issue = worker.buy_orders[0]['base']['amount'] * 3 issue_asset(worker.market['base']['symbol'], to_issue, worker.account.name) to_issue = worker.sell_orders[0]['base']['amount'] * 3 issue_asset(worker.market['quote']['symbol'], to_issue, worker.account.name) # Use maintain_strategy() here for simplicity maintain_until_allocated(worker) order_ids = [order['id'] for order in worker.own_orders] balance_in_orders_after = worker.get_allocated_assets(order_ids) assert balance_in_orders_after['base'] > balance_in_orders_before['base'] assert balance_in_orders_after['quote'] > balance_in_orders_before['quote'] def test_allocate_asset_dust_order_simple( worker, other_worker, do_initial_allocation, maintain_until_allocated, base_account ): """Make dust order, check if it canceled and closer opposite order placed.""" do_initial_allocation(worker, worker.mode) num_sell_orders_before = len(worker.sell_orders) num_buy_orders_before = len(worker.buy_orders) # Partially fill order from another account sell_price = worker.buy_orders[0]['price'] / 1.01 sell_amount = worker.buy_orders[0]['quote']['amount'] * (1 - worker.partial_fill_threshold) * 1.1 other_worker.place_market_sell_order(sell_amount, sell_price) worker.refresh_balances() worker.refresh_orders() worker.allocate_asset('quote', worker.quote_balance) worker.refresh_orders() num_sell_orders_after = len(worker.sell_orders) num_buy_orders_after = len(worker.buy_orders) assert num_buy_orders_before - num_buy_orders_after == 1 assert num_sell_orders_after - num_sell_orders_before == 1 def test_allocate_asset_dust_order_excess_funds( worker, other_worker, do_initial_allocation, maintain_until_allocated, issue_asset ): """Make dust order, add additional funds, these funds should be allocated and then dust order should be canceled and closer opposite order placed.""" do_initial_allocation(worker, worker.mode) num_sell_orders_before = len(worker.sell_orders) num_buy_orders_before = len(worker.buy_orders) # Partially fill order from another account sell_price = worker.buy_orders[0]['price'] / 1.01 sell_amount = worker.buy_orders[0]['quote']['amount'] * (1 - worker.partial_fill_threshold) * 1.1 other_worker.place_market_sell_order(sell_amount, sell_price) # Add some balance to the worker issue_asset(worker.market['quote']['symbol'], worker.sell_orders[0]['base']['amount'], worker.account.name) worker.refresh_balances() worker.refresh_orders() worker.allocate_asset('quote', worker.quote_balance) worker.refresh_orders() num_sell_orders_after = len(worker.sell_orders) num_buy_orders_after = len(worker.buy_orders) assert num_buy_orders_before - num_buy_orders_after == 1 assert num_sell_orders_after - num_sell_orders_before == 1 def test_allocate_asset_dust_order_increase_race(worker, other_worker, do_initial_allocation, issue_asset): """ Test for https://github.com/Codaone/DEXBot/issues/587. Check if cancelling dust orders on opposite side will not cause a race for allocate_asset() on opposite side """ do_initial_allocation(worker, worker.mode) num_buy_orders_before = len(worker.buy_orders) # Make closest sell order small enough to be a most likely candidate for increase worker.cancel_orders_wrapper(worker.sell_orders[0]) worker.refresh_orders() worker.refresh_balances() worker.place_closer_order( 'quote', worker.sell_orders[0], own_asset_limit=(worker.sell_orders[0]['base']['amount'] / 2) ) worker.refresh_orders() # Partially fill order from another account buy_price = worker.sell_orders[0]['price'] ** -1 * 1.01 buy_amount = worker.sell_orders[0]['base']['amount'] * (1 - worker.partial_fill_threshold) * 1.1 log.debug('{}, {}'.format(buy_price, buy_amount)) other_worker.place_market_buy_order(buy_amount, buy_price) # PF fill sell order should be cancelled and closer buy placed worker.maintain_strategy() worker.refresh_orders() num_buy_orders_after = len(worker.buy_orders) assert num_buy_orders_after - num_buy_orders_before == 1 def test_allocate_asset_filled_orders(worker, other_worker, do_initial_allocation, base_account): """Fill an order and check if opposite order placed.""" do_initial_allocation(worker, worker.mode) # TODO: automatically turn off bootstrapping after target spread is closed? worker['bootstrapping'] = False num_sell_orders_before = len(worker.sell_orders) # Fill sell order price = worker.buy_orders[0]['price'] amount = worker.buy_orders[0]['quote']['amount'] other_worker.place_market_sell_order(amount, price) worker.refresh_balances() worker.refresh_orders() worker.allocate_asset('quote', worker.quote_balance) worker.refresh_orders() num_sell_orders_after = len(worker.sell_orders) assert num_sell_orders_after - num_sell_orders_before == 1 def test_allocate_asset_filled_order_on_massively_imbalanced_sides( worker, other_worker, do_initial_allocation, base_account ): """ When sides are massively imbalanced, make sure that spread will be closed after filling one order on smaller side. The goal is to test a situation when one side has a big-sized orders, and other side has much smaller orders. Correct behavior: when order on smaller side filled, big side should place closer order. Test for https://github.com/Codaone/DEXBot/issues/588 """ do_initial_allocation(worker, worker.mode) spread_before = worker.get_actual_spread() log.info('Worker spread after bootstrap: {}'.format(spread_before)) # TODO: automatically turn off bootstrapping after target spread is closed? worker['bootstrapping'] = False # Cancel several closest orders num_orders_to_cancel = 3 worker.cancel_orders_wrapper(worker.sell_orders[:num_orders_to_cancel]) worker.refresh_orders() worker.refresh_balances() # Place limited orders; the goal is to limit order amount to be much smaller than opposite quote_limit = worker.buy_orders[0]['quote']['amount'] * worker.partial_fill_threshold / 2 spread_after = worker.get_actual_spread() while spread_after >= worker.target_spread + worker.increment: # We're using spread check because we cannot just place same number of orders as num_orders_to_cancel because # it may result in too close spread because of price shifts worker.place_closer_order('quote', worker.sell_orders[0], own_asset_limit=quote_limit) worker.refresh_orders() spread_after = worker.get_actual_spread() log.info('Worker spread: {}'.format(worker.get_actual_spread())) # Fill only one newly placed order from another account num_orders_to_fill = 1 for i in range(0, num_orders_to_fill): price = worker.sell_orders[i]['price'] ** -1 * 1.01 amount = worker.sell_orders[i]['base']['amount'] * 1.01 log.debug('Filling {} @ {}'.format(amount, price)) other_worker.place_market_buy_order(amount, price) # Cancel unmatched dust other_worker.cancel_all_orders() worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) # Filling of one order should result in spread > target spread, othewise allocate_asset will not place closer prder spread_after = worker.get_actual_spread() assert spread_after >= worker.target_spread + worker.increment # Allocate obtained BASE counter = 0 while spread_after >= worker.target_spread + worker.increment: worker.allocate_asset('base', worker.base_balance) worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) spread_after = worker.get_actual_spread() counter += 1 # Counter is for preventing infinity loop assert counter < 20 def test_allocate_asset_partially_filled_order_on_massively_imbalanced_sides( worker, other_worker, do_initial_allocation, base_account ): """ When sides are massively imbalanced, make sure that spread will be closed after filling one order on smaller side. The goal is to test a situation when one side has a big-sized orders, and other side has much smaller orders. Correct behavior: when order on smaller side filled, big side should place closer order. This test is similar to test_allocate_asset_filled_order_on_massively_imbalanced_sides, but tests partially filled order where "calncel dust order" logic is in action. Test for https://github.com/Codaone/DEXBot/issues/588 """ do_initial_allocation(worker, worker.mode) spread_before = worker.get_actual_spread() log.info('Worker spread after bootstrap: {}'.format(spread_before)) # TODO: automatically turn off bootstrapping after target spread is closed? worker['bootstrapping'] = False # Cancel several closest orders num_orders_to_cancel = 3 worker.cancel_orders_wrapper(worker.sell_orders[:num_orders_to_cancel]) worker.refresh_orders() worker.refresh_balances() # Place limited orders; the goal is to limit order amount to be much smaller than opposite quote_limit = worker.buy_orders[0]['quote']['amount'] * worker.partial_fill_threshold / 2 spread_after = worker.get_actual_spread() while spread_after >= worker.target_spread + worker.increment: # We're using spread check because we cannot just place same number of orders as num_orders_to_cancel because # it may result in too close spread because of price shifts worker.place_closer_order('quote', worker.sell_orders[0], own_asset_limit=quote_limit) worker.refresh_orders() spread_after = worker.get_actual_spread() log.info('Worker spread: {}'.format(worker.get_actual_spread())) # Fill only one newly placed order from another account num_orders_to_fill = 1 for i in range(0, num_orders_to_fill): price = worker.sell_orders[i]['price'] ** -1 * 1.01 # Make partially filled order (dust order) amount = worker.sell_orders[i]['base']['amount'] * (1 - worker.partial_fill_threshold) * 1.01 log.debug('Filling {} @ {}'.format(amount, price)) other_worker.place_market_buy_order(amount, price) # Cancel unmatched dust other_worker.cancel_all_orders() worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) # Check that we filled enough assert not worker.check_partial_fill(worker.sell_orders[0], fill_threshold=(1 - worker.partial_fill_threshold)) # Expect dust order cancel + closer order log.info('spread before allocate_asset(): {}'.format(worker.get_actual_spread())) worker.allocate_asset('base', worker.base_balance) worker.refresh_orders() spread_after = worker.get_actual_spread() assert spread_after < worker.target_spread + worker.increment @pytest.mark.parametrize('mode', MODES) def test_allocate_asset_several_filled_orders_on_massively_imbalanced_sides( mode, worker, other_worker, do_initial_allocation, base_account ): """ When sides are massively imbalanced, make sure that spread will be closed after filling several orders on smaller side. The goal is to test a situation when one side has a big-sized orders, and other side has much smaller orders. Correct behavior: when multiple orders on smaller side filled at once, big side should place appropriate number of closer orders to close the spread. Test for https://github.com/Codaone/DEXBot/issues/601 """ worker.mode = mode do_initial_allocation(worker, worker.mode) spread_before = worker.get_actual_spread() log.info('Worker spread after bootstrap: {}'.format(spread_before)) # TODO: automatically turn off bootstrapping after target spread is closed? worker['bootstrapping'] = False # Cancel several closest orders num_orders_to_cancel = 3 worker.cancel_orders_wrapper(worker.sell_orders[:num_orders_to_cancel]) worker.refresh_orders() worker.refresh_balances() # Place limited orders; the goal is to limit order amount to be much smaller than opposite quote_limit = worker.buy_orders[0]['quote']['amount'] * worker.partial_fill_threshold / 2 place_limited_order = True spread_after = worker.get_actual_spread() while spread_after >= worker.target_spread + worker.increment: # We're using spread check because we cannot just place same number of orders as num_orders_to_cancel because # it may result in too close spread because of price shifts limit = quote_limit if place_limited_order else None worker.place_closer_order('quote', worker.sell_orders[0], own_asset_limit=limit) worker.refresh_orders() worker.sync_current_orders() spread_after = worker.get_actual_spread() place_limited_order = False # only first order should be limited log.info('Worker spread: {}'.format(worker.get_actual_spread())) # Fill only one newly placed order from another account num_orders_to_fill = num_orders_to_cancel for i in range(0, num_orders_to_fill): price = worker.sell_orders[i]['price'] ** -1 * 1.01 amount = worker.sell_orders[i]['base']['amount'] * 1.01 log.debug('Filling {} @ {}'.format(amount, price)) other_worker.place_market_buy_order(amount, price) # Cancel unmatched dust other_worker.cancel_all_orders() worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) # Allocate obtained BASE counter = 0 spread_after = worker.get_actual_spread() while spread_after >= worker.target_spread + worker.increment: worker.allocate_asset('base', worker.base_balance) worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) spread_after = worker.get_actual_spread() counter += 1 # Counter is for preventing infinity loop # Success execution means target spread is reached assert counter < 20 @pytest.mark.parametrize('mode', MODES) def test_allocate_asset_limiting_on_sell_side(mode, worker, other_worker, do_initial_allocation, base_account): """Check order size limiting when placing closer order on side which is bigger (using funds obtained from filled orders on side which is smaller)""" do_initial_allocation(worker, mode) # TODO: automatically turn off bootstrapping after target spread is closed? worker['bootstrapping'] = False # Fill several orders num_orders_to_fill = 4 for i in range(0, num_orders_to_fill): price = worker.buy_orders[i]['price'] / 1.01 amount = worker.buy_orders[i]['quote']['amount'] log.debug('Filling buy order buys {} QUOTE @ {}'.format(amount, price)) other_worker.place_market_sell_order(amount, price) # Cancel unmatched dust other_worker.cancel_all_orders() # Allocate asset until target spread will be reached worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) spread_after = worker.get_actual_spread() counter = 0 while spread_after >= worker.target_spread + worker.increment: worker.allocate_asset('quote', worker.quote_balance) worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) spread_after = worker.get_actual_spread() counter += 1 # Counter is for preventing infinity loop assert counter < 20 # Check 2 closest orders to match mode if worker.mode == 'valley' or worker.mode == 'sell_slope': assert worker.sell_orders[0]['base']['amount'] == pytest.approx(worker.sell_orders[1]['base']['amount']) elif worker.mode == 'mountain': assert ( worker.sell_orders[0]['base']['amount'] == pytest.approx(worker.sell_orders[1]['base']['amount'], abs=(10 ** -worker.market['quote']['precision'])) or worker.sell_orders[0]['base']['amount'] >= worker.sell_orders[1]['base']['amount'] ) elif worker.mode == 'buy_slope': assert worker.sell_orders[0]['quote']['amount'] == pytest.approx( worker.sell_orders[1]['quote']['amount'], rel=(10 ** -worker.market['base']['precision']) ) elif worker.mode == 'neutral': assert worker.sell_orders[0]['base']['amount'] == pytest.approx( worker.sell_orders[1]['base']['amount'] * math.sqrt(1 + worker.increment), rel=(10 ** -worker.market['quote']['precision']), ) @pytest.mark.parametrize('mode', MODES) def test_allocate_asset_limiting_on_buy_side(mode, worker, other_worker, do_initial_allocation, issue_asset): """Check order size limiting when placing closer order on side which is bigger (using funds obtained from filled orders on side which is smaller)""" worker.center_price = 1 worker.lower_bound = 0.4 worker.upper_bound = 1.4 do_initial_allocation(worker, mode) # TODO: automatically turn off bootstrapping after target spread is closed? worker['bootstrapping'] = False # Fill several orders num_orders_to_fill = 5 for i in range(0, num_orders_to_fill): price = worker.sell_orders[i]['price'] ** -1 * 1.01 amount = worker.sell_orders[i]['base']['amount'] log.debug('Filling {} QUOTE @ {}'.format(amount, price)) other_worker.place_market_buy_order(amount, price) # Cancel unmatched dust other_worker.cancel_all_orders() # Allocate asset until target spread will be reached worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) spread_after = worker.get_actual_spread() counter = 0 while spread_after >= worker.target_spread + worker.increment: worker.allocate_asset('base', worker.base_balance) worker.refresh_orders() worker.refresh_balances(use_cached_orders=True) spread_after = worker.get_actual_spread() counter += 1 # Counter is for preventing infinity loop assert counter < 20 # Check 2 closest orders to match mode if worker.mode == 'valley' or worker.mode == 'buy_slope': assert worker.buy_orders[0]['base']['amount'] == worker.buy_orders[1]['base']['amount'] elif worker.mode == 'mountain': # In mountain mode allow both equal orders and increased closest order - it may be placed without limiting assert ( worker.buy_orders[0]['base']['amount'] == pytest.approx(worker.buy_orders[1]['base']['amount'], abs=(10 ** -worker.market['base']['precision'])) or worker.buy_orders[0]['base']['amount'] >= worker.buy_orders[1]['base']['amount'] ) elif worker.mode == 'sell_slope': assert worker.buy_orders[0]['quote']['amount'] == pytest.approx( worker.buy_orders[1]['quote']['amount'], rel=(10 ** -worker.market['base']['precision']) ) elif worker.mode == 'neutral': assert worker.buy_orders[0]['base']['amount'] == pytest.approx( worker.buy_orders[1]['base']['amount'] * math.sqrt(1 + worker.increment), rel=(10 ** -worker.market['base']['precision']), ) def test_get_actual_spread(worker): worker.maintain_strategy() # Twice run needed worker.maintain_strategy() worker.refresh_orders() spread = worker.get_actual_spread() assert float('Inf') > spread > 0 def test_stop_loss_check(worker, other_worker, do_initial_allocation, issue_asset): worker.operational_depth = 100 worker.target_spread = 0.1 # speed up allocation do_initial_allocation(worker, worker.mode) # Issue additional QUOTE to 2nd account issue_asset(worker.market['quote']['symbol'], 500, other_worker.account.name) # Sleep is needed to allow node to update ticker time.sleep(2) # Normal conditions - stop loss should not be executed worker.stop_loss_check() assert worker.disabled is False # Place bid below lower bound other_worker.place_market_buy_order(1, worker.lower_bound / 1.01) # Fill all orders pushing price below lower bound other_worker.place_market_sell_order(500, worker.lower_bound) time.sleep(2) worker.refresh_orders() worker.stop_loss_check() worker.refresh_orders() assert len(worker.sell_orders) == 1 order = worker.sell_orders[0] assert order['price'] ** -1 < worker.lower_bound assert worker.disabled is True def test_tick(worker): """Check tick counter increment.""" counter_before = worker.counter worker.tick('foo') counter_after = worker.counter assert counter_after - counter_before == 1
43.129329
120
0.706741
8,156
61,028
5.045365
0.052477
0.041555
0.043013
0.021774
0.867801
0.84034
0.809623
0.774702
0.742503
0.704447
0
0.017713
0.185013
61,028
1,414
121
43.15983
0.809639
0.21341
0
0.702607
0
0
0.069435
0
0
0
0
0.007072
0.11019
1
0.052133
false
0
0.007109
0.001185
0.060427
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
1685b68379f96f18039476e92b6310ef685f77e1
22,510
py
Python
sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2
2021-09-07T18:30:33.000Z
2021-11-23T02:50:57.000Z
sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
4
2021-10-06T16:39:52.000Z
2021-11-18T18:33:37.000Z
sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
null
null
null
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import asyncio import uuid import warnings import logging import pytest import functools from azure.core.credentials import AzureKeyCredential from azure.core.exceptions import ClientAuthenticationError, HttpResponseError from azure.ai.formrecognizer._generated.v2021_09_30_preview.models import GetOperationResponse, ModelInfo from azure.ai.formrecognizer._models import CustomFormModel, DocumentModel from azure.ai.formrecognizer.aio import FormTrainingClient, DocumentModelAdministrationClient from azure.ai.formrecognizer import _models from preparers import FormRecognizerPreparer from asynctestcase import AsyncFormRecognizerTest from preparers import GlobalClientPreparer as _GlobalClientPreparer FormTrainingClientPreparer = functools.partial(_GlobalClientPreparer, FormTrainingClient) DocumentModelAdministrationClientPreparer = functools.partial(_GlobalClientPreparer, DocumentModelAdministrationClient) class TestTrainingAsync(AsyncFormRecognizerTest): @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_polling_interval(self, client, formrecognizer_storage_container_sas_url): def check_poll_value(poll): if self.is_live: assert poll == 5 else: assert poll == 0 check_poll_value(client._client._config.polling_interval) poller = await client.begin_build_model(source=formrecognizer_storage_container_sas_url, polling_interval=6) await poller.wait() assert poller._polling_method._timeout == 6 poller2 = await client.begin_build_model(source=formrecognizer_storage_container_sas_url) await poller2.wait() check_poll_value(poller2._polling_method._timeout) # goes back to client default await client.close() @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_encoded_url(self, client): with pytest.raises(HttpResponseError): async with client: poller = await client.begin_build_model( source="https://fakeuri.com/blank%20space" ) assert "https://fakeuri.com/blank%20space" in poller._polling_method._initial_response.http_request.body await poller.wait() @FormRecognizerPreparer() async def test_build_model_auth_bad_key(self, formrecognizer_test_endpoint, formrecognizer_test_api_key): client = DocumentModelAdministrationClient(formrecognizer_test_endpoint, AzureKeyCredential("xxxx")) with pytest.raises(ClientAuthenticationError): async with client: poller = await client.begin_build_model("xx") result = await poller.result() @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model(self, client, formrecognizer_storage_container_sas_url): model_id = str(uuid.uuid4()) async with client: poller = await client.begin_build_model( formrecognizer_storage_container_sas_url, model_id=model_id, description="a v3 model" ) model = await poller.result() if self.is_live: assert model.model_id == model_id assert model.model_id assert model.description == "a v3 model" assert model.created_on for name, doc_type in model.doc_types.items(): assert name for key, field in doc_type.field_schema.items(): assert key assert field["type"] assert doc_type.field_confidence[key] is not None @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_multipage(self, client, formrecognizer_multipage_storage_container_sas_url): async with client: poller = await client.begin_build_model(formrecognizer_multipage_storage_container_sas_url) model = await poller.result() assert model.model_id assert model.description is None assert model.created_on for name, doc_type in model.doc_types.items(): assert name for key, field in doc_type.field_schema.items(): assert key assert field["type"] assert doc_type.field_confidence[key] is not None @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_nested_schema(self, client, formrecognizer_table_variable_rows_container_sas_url): async with client: poller = await client.begin_build_model(formrecognizer_table_variable_rows_container_sas_url) model = await poller.result() assert model.model_id assert model.description is None assert model.created_on for name, doc_type in model.doc_types.items(): assert name for key, field in doc_type.field_schema.items(): assert key assert field["type"] assert doc_type.field_confidence[key] is not None @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_transform(self, client, formrecognizer_storage_container_sas_url): raw_response = [] def callback(response, _, headers): op_response = client._deserialize(GetOperationResponse, response) model_info = client._deserialize(ModelInfo, op_response.result) document_model = DocumentModel._from_generated(model_info) raw_response.append(model_info) raw_response.append(document_model) async with client: poller = await client.begin_build_model(formrecognizer_storage_container_sas_url, cls=callback) model = await poller.result() raw_model = raw_response[0] document_model = raw_response[1] self.assertModelTransformCorrect(document_model, raw_model) document_model_dict = document_model.to_dict() document_model_from_dict = _models.DocumentModel.from_dict(document_model_dict) assert document_model_from_dict.model_id == document_model.model_id self.assertModelTransformCorrect(document_model_from_dict, raw_model) @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_multipage_transform(self, client, formrecognizer_multipage_storage_container_sas_url): raw_response = [] def callback(response, _, headers): op_response = client._deserialize(GetOperationResponse, response) model_info = client._deserialize(ModelInfo, op_response.result) document_model = DocumentModel._from_generated(model_info) raw_response.append(model_info) raw_response.append(document_model) async with client: poller = await client.begin_build_model(formrecognizer_multipage_storage_container_sas_url, cls=callback) model = await poller.result() raw_model = raw_response[0] document_model = raw_response[1] self.assertModelTransformCorrect(document_model, raw_model) @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_nested_schema_transform(self, client, formrecognizer_table_variable_rows_container_sas_url): raw_response = [] def callback(response, _, headers): op_response = client._deserialize(GetOperationResponse, response) model_info = client._deserialize(ModelInfo, op_response.result) document_model = DocumentModel._from_generated(model_info) raw_response.append(model_info) raw_response.append(document_model) async with client: poller = await client.begin_build_model(formrecognizer_table_variable_rows_container_sas_url, cls=callback) model = await poller.result() raw_model = raw_response[0] document_model = raw_response[1] self.assertModelTransformCorrect(document_model, raw_model) document_model_dict = document_model.to_dict() document_model_from_dict = _models.DocumentModel.from_dict(document_model_dict) assert document_model_from_dict.model_id == document_model.model_id self.assertModelTransformCorrect(document_model_from_dict, raw_model) @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_azure_blob_path_filter(self, client, formrecognizer_storage_container_sas_url): with pytest.raises(HttpResponseError) as e: async with client: poller = await client.begin_build_model(formrecognizer_storage_container_sas_url, prefix="subfolder") model = await poller.result() @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() @pytest.mark.live_test_only async def test_build_model_continuation_token(self, client, formrecognizer_storage_container_sas_url): async with client: initial_poller = await client.begin_build_model(formrecognizer_storage_container_sas_url) cont_token = initial_poller.continuation_token() poller = await client.begin_build_model(None, continuation_token=cont_token) result = await poller.result() assert result await initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error @FormRecognizerPreparer() @DocumentModelAdministrationClientPreparer() async def test_build_model_poller_metadata(self, client, formrecognizer_storage_container_sas_url): async with client: poller = await client.begin_build_model(formrecognizer_storage_container_sas_url) assert poller.operation_id assert poller.percent_completed is not None await poller.result() assert poller.operation_kind == "documentModelBuild" assert poller.percent_completed == 100 assert poller.resource_location_url assert poller.created_on assert poller.last_updated_on # --------------------------------------- BACK COMPATABILITY TESTS --------------------------------------- @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.0"}) async def test_training_with_labels_v2(self, client, formrecognizer_storage_container_sas_url_v2): async with client: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True) model = await poller.result() model_dict = model.to_dict() model = CustomFormModel.from_dict(model_dict) assert model.model_id assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.0"}) async def test_training_multipage_with_labels_v2(self, client, formrecognizer_multipage_storage_container_sas_url_v2): async with client: poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = await poller.result() assert model.model_id assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.0"}) async def test_training_without_labels_v2(self, client, formrecognizer_storage_container_sas_url_v2): async with client: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True) model = await poller.result() model_dict = model.to_dict() model = CustomFormModel.from_dict(model_dict) assert model.model_id assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.0"}) async def test_training_multipage_without_labels_v2(self, client, formrecognizer_multipage_storage_container_sas_url_v2): async with client: poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = await poller.result() assert model.model_id assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.0"}) async def test_training_with_files_filter_v2(self, client, formrecognizer_storage_container_sas_url_v2): async with client: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, include_subfolders=True) model = await poller.result() assert len(model.training_documents) == 6 assert model.training_documents[-1].name == "subfolder/Form_6.jpg" # we traversed subfolders poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="subfolder", include_subfolders=True) model = await poller.result() assert len(model.training_documents) == 1 assert model.training_documents[0].name == "subfolder/Form_6.jpg" # we filtered for only subfolders with pytest.raises(HttpResponseError) as e: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx") model = await poller.result() assert e.value.error.code assert e.value.error.message @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.1"}) async def test_training_with_labels_v21(self, client, formrecognizer_storage_container_sas_url_v2): async with client: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="my labeled model") model = await poller.result() model_dict = model.to_dict() model = CustomFormModel.from_dict(model_dict) assert model.model_id assert model.model_name == "my labeled model" assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.1"}) async def test_training_multipage_with_labels_v21(self, client, formrecognizer_multipage_storage_container_sas_url_v2): async with client: poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = await poller.result() assert model.model_id assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.1"}) async def test_training_without_labels_v21(self, client, formrecognizer_storage_container_sas_url_v2): async with client: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=True, model_name="my labeled model") model = await poller.result() model_dict = model.to_dict() model = CustomFormModel.from_dict(model_dict) assert model.model_id assert model.model_name == "my labeled model" assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.1"}) async def test_training_multipage_without_labels_v21(self, client, formrecognizer_multipage_storage_container_sas_url_v2): async with client: poller = await client.begin_training(formrecognizer_multipage_storage_container_sas_url_v2, use_training_labels=True) model = await poller.result() assert model.model_id assert model.training_started_on assert model.training_completed_on assert model.errors == [] assert model.status == "ready" for doc in model.training_documents: assert doc.name assert doc.page_count assert doc.status assert doc.errors == [] for sub in model.submodels: assert sub.form_type assert sub.accuracy is not None for key, field in sub.fields.items(): assert field.accuracy is not None assert field.name @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.1"}) async def test_training_with_files_filter_v21(self, client, formrecognizer_storage_container_sas_url_v2): async with client: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, include_subfolders=True) model = await poller.result() assert len(model.training_documents) == 6 assert model.training_documents[-1].name == "subfolder/Form_6.jpg" # we traversed subfolders poller = await client.begin_training(formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="subfolder", include_subfolders=True) model = await poller.result() assert len(model.training_documents) == 1 assert model.training_documents[0].name == "subfolder/Form_6.jpg" # we filtered for only subfolders with pytest.raises(HttpResponseError) as e: poller = await client.begin_training(training_files_url=formrecognizer_storage_container_sas_url_v2, use_training_labels=False, prefix="xxx") model = await poller.result() assert e.value.error.code assert e.value.error.message @FormRecognizerPreparer() @FormTrainingClientPreparer(client_kwargs={"api_version": "2.0"}) async def test_training_with_model_name_bad_api_version(self, client): with pytest.raises(ValueError) as excinfo: async with client: poller = await client.begin_training(training_files_url="url", use_training_labels=True, model_name="not supported in v2.0") result = await poller.result() assert "'model_name' is only available for API version V2_1 and up" in str(excinfo.value)
45.938776
169
0.689249
2,489
22,510
5.939333
0.089996
0.042414
0.045661
0.061016
0.850707
0.825002
0.817425
0.776027
0.770344
0.751065
0
0.006355
0.238072
22,510
489
170
46.03272
0.855577
0.020347
0
0.784689
0
0
0.02609
0
0
0
0
0
0.382775
1
0.009569
false
0
0.035885
0
0.047847
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
168f4c6394dbd16127226687120eb3e408f57ad3
5,818
py
Python
test/grammar/join_test.py
smarty-timmi/TatSu
f09240959b51782cc3c38a9059b32f212077c802
[ "BSD-2-Clause" ]
1
2021-02-25T10:44:10.000Z
2021-02-25T10:44:10.000Z
test/grammar/join_test.py
smarty-timmi/TatSu
f09240959b51782cc3c38a9059b32f212077c802
[ "BSD-2-Clause" ]
null
null
null
test/grammar/join_test.py
smarty-timmi/TatSu
f09240959b51782cc3c38a9059b32f212077c802
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import generator_stop import unittest from tatsu.exceptions import FailedParse from tatsu.tool import compile from tatsu.codegen import codegen from tatsu.util import trim class JoinTests(unittest.TestCase): def test_positive_join(self): grammar = ''' start = ','%{'x' 'y'}+ ; ''' grammar2 = ''' start = (','%{'x'}+|{}) ; ''' grammar3 = ''' start = [','%{'x'}+] ; ''' model = compile(grammar, "test") codegen(model) ast = model.parse("x y, x y", nameguard=False) self.assertEqual([['x', 'y'], ',', ['x', 'y']], ast) ast = model.parse("x y x y", nameguard=False) self.assertEqual([['x', 'y']], ast) try: ast = model.parse("y x", nameguard=False) self.fail('closure not positive') except FailedParse: pass model = compile(grammar2, "test") ast = model.parse("y x", nameguard=False) self.assertEqual([], ast) ast = model.parse("x", nameguard=False) self.assertEqual(['x'], ast) ast = model.parse("x,x", nameguard=False) self.assertEqual(['x', ',', 'x'], ast) model = compile(grammar3, "test") ast = model.parse("y x", nameguard=False) self.assertEqual(None, ast) def test_normal_join(self): grammar = ''' start = ','%{'x' 'y'} 'z' ; ''' model = compile(grammar, "test") codegen(model) ast = model.parse("x y, x y z", nameguard=False) self.assertEqual(([['x', 'y'], ',', ['x', 'y']], 'z'), ast) ast = model.parse("x y z", nameguard=False) self.assertEqual(([['x', 'y']], 'z'), ast) ast = model.parse("z", nameguard=False) self.assertEqual(([], 'z'), ast) def test_group_join(self): grammar = ''' start = ('a' 'b')%{'x'}+ ; ''' model = compile(grammar, "test") c = codegen(model) import parser parser.suite(c) ast = model.parse("x a b x", nameguard=False) self.assertEqual(['x', ['a', 'b'], 'x'], ast) def test_positive_gather(self): grammar = ''' start = ','.{'x' 'y'}+ ; ''' grammar2 = ''' start = (','.{'x'}+|{}) ; ''' grammar3 = ''' start = [','.{'x'}+] ; ''' model = compile(grammar, "test") codegen(model) ast = model.parse("x y, x y", nameguard=False) self.assertEqual([['x', 'y'], ['x', 'y']], ast) ast = model.parse("x y x y", nameguard=False) self.assertEqual([['x', 'y']], ast) try: ast = model.parse("y x", nameguard=False) self.fail('closure not positive') except FailedParse: pass model = compile(grammar2, "test") ast = model.parse("y x", nameguard=False) self.assertEqual([], ast) ast = model.parse("x", nameguard=False) self.assertEqual(['x'], ast) ast = model.parse("x,x", nameguard=False) self.assertEqual(['x', 'x'], ast) model = compile(grammar3, "test") ast = model.parse("y x", nameguard=False) self.assertEqual(None, ast) def test_normal_gather(self): grammar = ''' start = ','.{'x' 'y'} 'z' ; ''' model = compile(grammar, "test") codegen(model) ast = model.parse("x y, x y z", nameguard=False) self.assertEqual(([['x', 'y'], ['x', 'y']], 'z'), ast) ast = model.parse("x y z", nameguard=False) self.assertEqual(([['x', 'y']], 'z'), ast) ast = model.parse("z", nameguard=False) self.assertEqual(([], 'z'), ast) def test_group_gather(self): grammar = ''' start = ('a' 'b').{'x'}+ ; ''' model = compile(grammar, "test") c = codegen(model) import parser parser.suite(c) ast = model.parse("x a b x", nameguard=False) self.assertEqual(['x', 'x'], ast) def test_left_join(self): grammar = r''' start = (op)<{number}+ $ ; op = '+' | '-' ; number = /\d+/ ; ''' text = '1 + 2 - 3 + 4' model = compile(grammar, "test") self.assertEqual(trim(grammar).strip(), str(model).strip()) codegen(model) ast = model.parse(text) self.assertEqual( ( '+', ( '-', ( '+', '1', '2' ), '3' ), '4' ), ast ) def test_right_join(self): grammar = r''' start = (op)>{number}+ $ ; op = '+' | '-' ; number = /\d+/ ; ''' text = '1 + 2 - 3 + 4' model = compile(grammar, "test") self.assertEqual(trim(grammar).strip(), str(model).strip()) codegen(model) ast = model.parse(text) self.assertEqual( ( '+', '1', ( '-', '2', ( '+', '3', '4' ) ) ), ast )
25.186147
67
0.406841
546
5,818
4.296703
0.120879
0.025575
0.132992
0.247229
0.886616
0.886616
0.87809
0.87809
0.876385
0.876385
0
0.007432
0.421794
5,818
230
68
25.295652
0.689952
0.003609
0
0.681081
0
0
0.215876
0
0
0
0
0
0.12973
1
0.043243
false
0.010811
0.043243
0
0.091892
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
bc3ec6e1f45ecfe1a15a24a7bf1996ca0723d750
18,894
py
Python
graphicslib/FontArial28.py
rowb1/oled-python-library
0a5382338b805d9ca47d081403f743fd234ffb0d
[ "MIT" ]
5
2019-06-30T11:55:56.000Z
2021-05-18T22:08:34.000Z
graphicslib/FontArial28.py
rowb1/oled-python-library
0a5382338b805d9ca47d081403f743fd234ffb0d
[ "MIT" ]
1
2021-07-27T13:36:37.000Z
2021-07-30T11:00:10.000Z
graphicslib/FontArial28.py
rowb1/oled-python-library
0a5382338b805d9ca47d081403f743fd234ffb0d
[ "MIT" ]
2
2018-06-10T12:02:56.000Z
2020-03-17T09:57:16.000Z
# Arial 28 support (actually 24 high) # see: https://medium.com/home-wireless/convert-truetype-to-bitmap-for-use-by-c-9dd8196e5c94 Arial28Infos=[[ 33, 1054, 2, 3, 8], [ 36, 893, 11, 1, 14], [ 37, 93, 19, 1, 22], [ 40, 1021, 6, 2, 8], [ 41, 1014, 6, 0, 8], [ 42, 973, 8, 1, 10], [ 43, 657, 12, 1, 15], [ 44, 1048, 2, 2, 7], [ 45, 1035, 6, 1, 8], [ 46, 1060, 2, 2, 7], [ 48, 631, 12, 1, 14], [ 49, 990, 7, 2, 14], [ 50, 618, 12, 1, 14], [ 51, 605, 12, 1, 14], [ 52, 592, 12, 1, 14], [ 53, 579, 12, 1, 14], [ 54, 735, 12, 1, 14], [ 55, 709, 12, 1, 14], [ 56, 683, 12, 1, 14], [ 57, 722, 12, 1, 14], [ 58, 1057, 2, 2, 7], [ 63, 566, 12, 1, 14], [ 64, 26, 23, 1, 25], [ 65, 414, 15, 1, 17], [ 66, 446, 14, 2, 17], [ 67, 283, 16, 1, 18], [ 68, 430, 15, 2, 18], [ 69, 461, 14, 2, 17], [ 70, 696, 12, 2, 15], [ 71, 317, 16, 1, 19], [ 72, 476, 14, 2, 18], [ 73, 1051, 2, 2, 6], [ 74, 940, 10, 1, 13], [ 75, 382, 15, 2, 17], [ 76, 773, 11, 2, 14], [ 77, 265, 17, 2, 21], [ 78, 551, 14, 2, 18], [ 79, 247, 17, 1, 19], [ 80, 506, 14, 2, 17], [ 81, 211, 17, 1, 19], [ 82, 366, 15, 2, 18], [ 83, 398, 15, 1, 17], [ 84, 491, 14, 0, 14], [ 85, 536, 14, 2, 18], [ 86, 350, 15, 1, 17], [ 87, 0, 25, 0, 26], [ 88, 229, 17, 0, 17], [ 89, 300, 16, 0, 16], [ 90, 521, 14, 0, 15], [ 95, 334, 15, 0, 14], [ 97, 670, 12, 1, 14], [ 98, 761, 11, 2, 14], [ 99, 833, 11, 1, 13], [ 100, 881, 11, 1, 14], [ 101, 644, 12, 1, 14], [ 102, 998, 7, 0, 7], [ 103, 905, 11, 1, 14], [ 104, 962, 10, 2, 14], [ 105, 1063, 2, 2, 6], [ 106, 1042, 5, 0, 6], [ 107, 917, 11, 2, 13], [ 108, 1066, 2, 2, 6], [ 109, 173, 18, 2, 22], [ 110, 929, 10, 2, 14], [ 111, 748, 12, 1, 14], [ 112, 797, 11, 2, 14], [ 113, 809, 11, 1, 14], [ 114, 1028, 6, 2, 8], [ 115, 821, 11, 1, 13], [ 116, 982, 7, 0, 7], [ 117, 951, 10, 2, 14], [ 118, 785, 11, 0, 11], [ 119, 133, 19, 0, 19], [ 120, 845, 11, 0, 11], [ 121, 857, 11, 1, 12], [ 122, 869, 11, 0, 12], [ 153, 50, 21, 3, 25], [ 169, 192, 18, 0, 18], [ 186, 1006, 7, 1, 9], [ 188, 153, 19, 1, 21], [ 189, 113, 19, 1, 21], [ 190, 72, 20, 0, 21], [ 0,0,0,0,0]] # Image Size: 134bytes x 24lines Arial28Pixels=[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x1c, 0x01,0x80,0x3f,0x80,0x3f,0xdc,0x0e,0x7c, 0x00,0xe1,0xe0,0x30,0x0c,0x00,0xc0,0x00, 0x00,0x0c,0x00,0xc0,0x00,0x00,0x03,0xf0, 0x00,0x7c,0x03,0x80,0x38,0x07,0xc0,0x60, 0x00,0xc0,0x7c,0x0c,0x00,0x70,0x1f,0x00, 0x00,0x03,0x00,0x1b,0xff,0x83,0x00,0x70, 0x1f,0x80,0x0e,0x03,0xff,0x03,0xff,0x07, 0xff,0xec,0x00,0xdf,0xff,0xbf,0xf8,0x3f, 0xfe,0xc0,0x0d,0x80,0x18,0x7e,0x07,0xfc, 0x00,0xc0,0xf8,0x07,0xe0,0x3e,0x00,0x00, 0x00,0x00,0x00,0x01,0xe0,0xff,0xf7,0xff, 0x87,0xc0,0x1f,0x00,0x00,0x60,0x06,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x30,0xf8,0x00, 0x06,0x00,0x00,0x00,0x0c,0x00,0x30,0x00, 0xc0,0x00,0x18,0x78,0xe3,0x00,0x60,0x00, 0x06,0x1b,0x01,0xb0,0xc0,0x1c,0x03,0x80, 0xff,0xe0,0x3f,0xdc,0x1e,0xc6,0x01,0xc3, 0xf0,0x60,0x3c,0x01,0x80,0x00,0x00,0x3c, 0x01,0x80,0x00,0x00,0x0f,0xfc,0x01,0xff, 0x01,0xc0,0x70,0x1f,0xf0,0x78,0x03,0xc1, 0xff,0x06,0x00,0xe0,0xff,0xc0,0x00,0x03, 0x00,0x3b,0xff,0xe3,0x00,0xe0,0x7f,0xe0, 0x0e,0x03,0xff,0xc3,0xff,0x87,0xff,0xec, 0x00,0xdf,0xff,0xbf,0xfc,0x3f,0xfe,0xc0, 0x0d,0xc0,0x18,0xff,0x07,0xfc,0x01,0xc1, 0xfe,0x0f,0xf0,0x7f,0x80,0x00,0x00,0x00, 0x00,0x07,0xf8,0xff,0xf7,0xff,0x8f,0xf0, 0x3f,0x80,0x00,0x60,0x06,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x33,0xfe,0x00,0x06,0x00, 0x00,0x00,0x0c,0x00,0x30,0x00,0xc0,0xc0, 0x18,0xf9,0xf1,0x80,0xc0,0x00,0x06,0x1b, 0x01,0xb0,0x60,0x3e,0x03,0x03,0xe0,0x78, 0x06,0x1e,0x1e,0x06,0x01,0x87,0x30,0x60, 0x7c,0x03,0x80,0x00,0x00,0x7c,0x03,0x80, 0x00,0x00,0x1e,0x1e,0x07,0x83,0xc0,0xe0, 0xe0,0x78,0x3c,0x78,0x03,0xc7,0x81,0xc3, 0x00,0xc1,0xe0,0xe0,0x00,0x01,0x80,0x33, 0x00,0xe3,0x01,0xc0,0xe0,0x70,0x1f,0x03, 0x00,0xe3,0x01,0xc6,0x00,0x0c,0x00,0xc0, 0x60,0x30,0x0e,0x00,0x0c,0xc0,0x0d,0xe0, 0x19,0xc3,0x8e,0x00,0x03,0xc3,0x86,0x1c, 0x38,0xe1,0xc0,0x00,0x00,0x00,0x00,0x0e, 0x18,0xc0,0x00,0x03,0x1c,0x38,0x61,0xc0, 0x00,0x60,0x06,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x37,0x26,0x00,0x06,0x00,0x00,0x00, 0x0c,0x00,0x30,0x04,0xc0,0xc0,0x78,0xc3, 0xb9,0x81,0x80,0x00,0x00,0x1b,0x00,0x30, 0x60,0x36,0x03,0x07,0x00,0x1c,0x06,0x1e, 0x1e,0x06,0x03,0x06,0x18,0xc0,0x4c,0x03, 0x00,0x00,0x00,0x4c,0x03,0x00,0x00,0x00, 0x38,0x07,0x06,0x00,0xc0,0x60,0xc0,0x60, 0x0c,0x7c,0x07,0xce,0x00,0xc3,0x81,0xc1, 0x80,0x30,0x00,0x01,0x80,0x33,0x00,0x73, 0x03,0x81,0x80,0x38,0x1b,0x03,0x00,0x73, 0x00,0xe6,0x00,0x0c,0x00,0xc0,0x60,0x30, 0x07,0x00,0x1c,0xc0,0x0d,0xe0,0x1b,0x81, 0xcc,0x00,0x03,0xc7,0x03,0x30,0x1c,0xc0, 0xc0,0x00,0x03,0x00,0x00,0x0c,0x0c,0xc0, 0x00,0x06,0x38,0x18,0xc0,0xe0,0x00,0x60, 0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36, 0x23,0x00,0x06,0x00,0x00,0x00,0x0c,0x00, 0x30,0x07,0xf8,0xc0,0xf8,0xc3,0x18,0xc1, 0x80,0x00,0x00,0x1b,0x00,0x30,0x60,0x36, 0x03,0x0e,0x00,0x0e,0x06,0x1b,0x36,0x1c, 0x07,0x06,0x18,0xc0,0x0c,0x06,0x00,0x00, 0x00,0x0c,0x06,0x00,0x00,0x00,0x71,0xe3, 0x8c,0x00,0x60,0x71,0xc0,0xc0,0x06,0x6c, 0x06,0xcc,0x00,0xe1,0x83,0x83,0x00,0x30, 0x00,0x01,0xc0,0x63,0x00,0x33,0x07,0x01, 0x80,0x18,0x1b,0x03,0x00,0x33,0x00,0x66, 0x00,0x0c,0x00,0xc0,0x60,0x30,0x03,0x00, 0x38,0xc0,0x0d,0xb0,0x1b,0x00,0xcc,0x00, 0x06,0xc6,0x03,0x30,0x0d,0x80,0x60,0x00, 0x03,0x00,0x00,0x0c,0x0c,0xc0,0x00,0x06, 0x30,0x08,0xc0,0x60,0x00,0x60,0x06,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x36,0x20,0x00, 0x06,0x00,0x00,0x00,0x0c,0x00,0x30,0x01, 0xe0,0xc3,0xd8,0xc3,0x18,0xc3,0x00,0x00, 0x00,0x1b,0x00,0x30,0x30,0x76,0x06,0x0c, 0x1e,0x66,0x06,0x1b,0x36,0x06,0x0e,0x06, 0x19,0x80,0x0c,0x0c,0x06,0x02,0x03,0x0c, 0x0c,0x06,0x78,0x78,0x67,0xf1,0x8c,0x00, 0x60,0x3b,0x80,0xc0,0x06,0x6c,0x06,0xdc, 0x00,0x40,0xc3,0x03,0x00,0x10,0x00,0x00, 0xc0,0x63,0x00,0x33,0x0e,0x01,0x80,0x00, 0x31,0x83,0x00,0x33,0x00,0x66,0x00,0x0c, 0x00,0xc0,0x60,0x30,0x03,0x00,0x70,0xc0, 0x0d,0x98,0x18,0x00,0xcc,0x00,0x0e,0xc0, 0x03,0x00,0x0d,0x80,0x60,0xf0,0x03,0x00, 0x7e,0x0c,0x0c,0xc0,0x00,0x0c,0x30,0x0d, 0x80,0x00,0xf0,0x67,0x86,0x00,0x60,0x36, 0x78,0x0f,0x31,0xf8,0x0f,0x86,0x03,0x60, 0x33,0xff,0x0f,0x36,0x20,0x0f,0x36,0x0e, 0x67,0x80,0x0d,0x81,0xb3,0xc1,0xe3,0xfb, 0x9b,0xfb,0x18,0x63,0x0d,0xc0,0x06,0x1b, 0x61,0xb0,0x30,0x63,0x06,0x18,0x7f,0x66, 0x06,0x19,0x26,0x06,0x0c,0x06,0x19,0x80, 0x0c,0x1c,0x06,0x07,0x03,0x0c,0x1c,0x06, 0xfd,0xfc,0xce,0x39,0xd8,0x00,0x30,0x1f, 0x01,0x80,0x03,0x6e,0x0c,0xd8,0x00,0x00, 0xe7,0x06,0x00,0x00,0x00,0x00,0xc0,0x63, 0x00,0x73,0x1c,0x01,0xc0,0x00,0x31,0x83, 0x00,0x1b,0x00,0x66,0x00,0x0c,0x00,0xc0, 0x60,0x30,0x03,0x00,0x60,0xc0,0x0d,0x98, 0x18,0x01,0xcd,0xe0,0x0c,0xc0,0x06,0x00, 0x0d,0x80,0x63,0xfc,0x03,0x01,0xff,0x0e, 0x18,0xc0,0x00,0x0c,0x30,0x0d,0x9f,0x03, 0xfc,0x6f,0xc6,0x00,0x60,0x37,0xfc,0x1f, 0xb3,0xfc,0x1f,0xe3,0x06,0x60,0x23,0xff, 0x1f,0xb7,0x20,0x1f,0xf6,0x1c,0x6f,0xc0, 0x0d,0x81,0xb7,0xe3,0x33,0xf8,0x1b,0xfb, 0x38,0x63,0x0f,0xc0,0x06,0x1b,0x61,0xb0, 0x30,0x63,0x06,0x18,0xe3,0xc3,0x06,0x19, 0xe6,0xce,0x18,0x07,0x3b,0x00,0x0c,0x18, 0x03,0x07,0x06,0x0c,0x18,0x07,0x8f,0x8e, 0xcc,0x00,0xd8,0x00,0x30,0x0e,0x01,0x80, 0x03,0x66,0x0c,0xd8,0x00,0x00,0x66,0x06, 0x00,0x00,0x00,0x00,0x60,0xc3,0x00,0xe3, 0x38,0x00,0xfc,0x00,0x71,0x83,0x00,0x1b, 0x00,0xc6,0x00,0x0c,0x00,0xc0,0x60,0x30, 0x07,0x00,0xe0,0xc0,0x0d,0x8c,0x18,0x03, 0x9f,0xf8,0x18,0xc0,0x7c,0x00,0x19,0x80, 0x67,0x0e,0x03,0x03,0x83,0x87,0xf0,0xc0, 0x00,0x18,0x30,0x0d,0xbf,0x87,0x0e,0x78, 0xe6,0x00,0x30,0x67,0x8e,0x38,0xf7,0x0e, 0x38,0x61,0x8c,0x30,0x60,0x06,0x38,0xf3, 0xe0,0x38,0xf6,0x38,0x78,0xe0,0x0d,0x81, 0xbc,0x73,0x20,0xc0,0x18,0xc1,0xf0,0x66, 0x0e,0x00,0x06,0x1b,0x01,0xb0,0x30,0x63, 0x0e,0x39,0xc1,0xc3,0x06,0x19,0xe6,0x7c, 0x30,0x03,0xf3,0x3c,0x0c,0x30,0x03,0x0f, 0x06,0x0c,0x30,0x07,0x07,0x06,0xcc,0x00, 0xd8,0x00,0x30,0x0e,0x01,0x80,0x03,0x66, 0x0c,0xd8,0x00,0x00,0x3c,0x06,0x00,0x00, 0x00,0x00,0x60,0xc3,0xff,0xe3,0x7c,0x00, 0x7f,0xc0,0x60,0xc3,0x00,0x1b,0xff,0x87, 0xff,0xcf,0xff,0xc0,0x60,0x30,0x0e,0x01, 0xc0,0xc0,0x0d,0x86,0x18,0x07,0x1c,0x1c, 0x38,0xc0,0x7e,0x00,0x19,0x80,0x66,0x06, 0x7f,0xfb,0x01,0x87,0xf8,0xff,0xe0,0x10, 0x38,0x1d,0xe1,0xce,0x07,0x70,0x66,0x00, 0x30,0x67,0x06,0x70,0x76,0x00,0x70,0x31, 0x8c,0x30,0x60,0x0c,0x70,0x71,0xf8,0x70, 0x76,0x70,0x70,0x60,0x0d,0x81,0xb8,0x30, 0x00,0xc0,0x18,0xc0,0xe0,0x36,0x0c,0x00, 0x06,0x1b,0x01,0xb0,0x18,0xc1,0x8c,0x31, 0x80,0xc3,0x06,0x18,0xc6,0x00,0x70,0x61, 0xe6,0x7e,0x00,0x63,0xe3,0x0d,0x86,0x00, 0x60,0x66,0x06,0x06,0xcc,0x00,0xd8,0x00, 0x30,0x0e,0x01,0x80,0x03,0x63,0x18,0xd8, 0x00,0x00,0x3c,0x06,0x03,0xf8,0x00,0x00, 0x60,0xc3,0xff,0x83,0xfc,0x00,0x0f,0xf0, 0x60,0xc3,0x00,0x1b,0xff,0xc7,0xff,0xcf, 0xff,0xc0,0x60,0x3f,0xfc,0x03,0x80,0xc0, 0x0d,0x86,0x18,0x0e,0x00,0x0e,0x30,0xc0, 0x07,0x00,0x31,0x80,0x6c,0x03,0x7f,0xf8, 0x01,0x8e,0x1c,0xff,0xe0,0x30,0x18,0x3d, 0xc0,0xec,0x03,0x60,0x36,0x00,0x30,0x66, 0x03,0x60,0x37,0x00,0x60,0x00,0xd8,0x30, 0xc0,0x18,0x60,0x30,0x3e,0x60,0x36,0xe0, 0x60,0x60,0x0d,0x81,0xb0,0x30,0x00,0xc0, 0x18,0xc0,0x00,0x36,0x0c,0x00,0x06,0x1b, 0x01,0xb0,0x18,0xc1,0x8c,0x33,0x00,0xc3, 0x00,0x00,0x00,0x00,0x60,0xe0,0x06,0xe6, 0x00,0xe6,0x31,0x8d,0x8c,0x00,0xe0,0xe6, 0x06,0x06,0xcc,0x00,0xd8,0x00,0x30,0x1b, 0x01,0x80,0x03,0x63,0x18,0xd8,0x00,0x00, 0x18,0x06,0x03,0xf8,0x00,0x00,0x31,0x83, 0x06,0x03,0xce,0x00,0x00,0x70,0xff,0xe3, 0x00,0x1b,0x00,0xe6,0x00,0x0c,0x00,0xc0, 0x60,0x3f,0xf8,0x03,0x00,0xc0,0x0d,0x83, 0x18,0x0c,0x00,0x06,0x60,0xc0,0x03,0x80, 0x61,0x80,0x6f,0xff,0x03,0x00,0x0f,0x9c, 0x0e,0xc0,0x00,0x30,0x0f,0xed,0x80,0x6c, 0x03,0x60,0x36,0x00,0x18,0xc6,0x03,0x60, 0x37,0xf0,0x60,0x00,0x70,0x18,0xc0,0x38, 0x60,0x30,0x26,0x60,0x37,0xc0,0x60,0x60, 0x0d,0x81,0xb0,0x30,0x00,0xc0,0x18,0xc0, 0x00,0x36,0x0c,0x00,0x06,0x1b,0x01,0xb0, 0x18,0xc1,0x8c,0x33,0x00,0xc3,0x00,0x00, 0x00,0x00,0xc1,0xe0,0x0c,0xc3,0x00,0xc0, 0x31,0x98,0xcc,0x00,0xc1,0xe6,0x06,0x06, 0xce,0x39,0xd8,0x00,0x30,0x3b,0x81,0x80, 0x03,0x63,0x18,0xd8,0x00,0x00,0x18,0x06, 0x00,0x18,0x00,0x00,0x31,0x83,0x07,0x03, 0x87,0x00,0x00,0x18,0xff,0xe3,0x00,0x1b, 0x00,0x76,0x00,0x0c,0x00,0xc0,0x60,0x30, 0x00,0x07,0x00,0xc0,0x0d,0x81,0x98,0x18, 0x00,0x06,0xe0,0xc0,0x01,0x80,0xc1,0x80, 0x6f,0xff,0x03,0x00,0xff,0x98,0x06,0xc0, 0x00,0x60,0x07,0xcd,0x80,0x6c,0x03,0x60, 0x36,0x00,0x18,0xc6,0x03,0x60,0x31,0xfe, 0x60,0x00,0x70,0x18,0xc0,0x70,0x60,0x30, 0x23,0x60,0x37,0xe0,0x60,0x60,0x0d,0x81, 0xb0,0x30,0x00,0xc0,0x18,0xc0,0x00,0x36, 0x0c,0x1f,0x86,0x1b,0x01,0xb0,0x0d,0x80, 0xd8,0x33,0x00,0x86,0x00,0x00,0x00,0x01, 0x81,0xe0,0x0c,0xc3,0x01,0x80,0x70,0xd8, 0xd8,0x01,0x81,0xe6,0x06,0x06,0x67,0xf1, 0x8c,0x00,0x60,0x71,0xc1,0xc0,0x06,0x61, 0x30,0xdc,0x00,0x60,0x18,0x07,0x00,0x18, 0x00,0x00,0x33,0x83,0x03,0x83,0x03,0x83, 0x00,0x18,0xc0,0x63,0x00,0x33,0x00,0x36, 0x00,0x0c,0x00,0xc0,0x60,0x30,0x00,0x0e, 0x00,0xc0,0x0d,0x81,0x98,0x18,0x00,0x06, 0xff,0xf0,0x01,0x83,0x81,0x80,0x6c,0x00, 0x03,0x01,0xf1,0x98,0x06,0xc0,0x00,0x60, 0x00,0x0d,0x80,0x6c,0x03,0x60,0x36,0x00, 0x0d,0x86,0x03,0x60,0x30,0x3f,0x60,0x00, 0x70,0x19,0x80,0xe0,0x60,0x30,0x23,0x60, 0x36,0x70,0x60,0x6c,0x0d,0x81,0xb0,0x30, 0x00,0xc0,0x18,0xc0,0x00,0x36,0x0c,0x1f, 0x86,0x1b,0x01,0xb0,0x0d,0x80,0xd8,0x33, 0x01,0x86,0x00,0x00,0x00,0x03,0x83,0x60, 0x18,0xc3,0x03,0x00,0x60,0xd8,0xd8,0x03, 0x03,0x66,0x06,0x06,0x73,0xe3,0x8c,0x0c, 0x60,0xe0,0xc0,0xc0,0x06,0x61,0xb0,0xcc, 0x00,0xe0,0x18,0x03,0x00,0x18,0x00,0x00, 0x1b,0x03,0x01,0xc3,0x03,0x83,0x00,0x19, 0x80,0x33,0x00,0x33,0x00,0x36,0x00,0x0c, 0x00,0xc0,0x60,0x30,0x00,0x1c,0x00,0xc0, 0x0d,0x80,0xd8,0x18,0x18,0x06,0xff,0xf6, 0x01,0x87,0x01,0x80,0x4c,0x00,0x03,0x03, 0x01,0x98,0x06,0xc0,0x00,0x60,0x30,0x19, 0x80,0x6c,0x03,0x60,0x36,0x00,0x0d,0x86, 0x03,0x60,0x30,0x07,0x60,0x30,0xf8,0x0d, 0x81,0xc0,0x60,0x36,0x23,0x60,0x36,0x38, 0x60,0x6c,0x0d,0x81,0xb0,0x30,0x00,0xc0, 0x18,0xc0,0x00,0x36,0x0c,0x00,0x06,0x1b, 0x01,0xb0,0x0d,0x80,0xd8,0x33,0x03,0x8c, 0x00,0x00,0x00,0x03,0x06,0x60,0x18,0xc3, 0x07,0x00,0xe0,0xf0,0x78,0x07,0x06,0x66, 0x06,0x06,0x38,0x07,0x0e,0x0f,0xe0,0xc0, 0x60,0xe0,0x0c,0x61,0xf0,0xce,0x01,0xc0, 0x18,0x03,0x80,0x18,0x00,0x00,0x1b,0x03, 0x00,0xe3,0x01,0xc1,0x80,0x39,0x80,0x33, 0x00,0x73,0x00,0x36,0x00,0x0c,0x00,0xc0, 0x60,0x30,0x00,0x18,0x00,0x60,0x19,0x80, 0x78,0x00,0x18,0x0c,0x00,0xc6,0x03,0x8c, 0x00,0xc0,0xce,0x03,0x03,0x03,0x03,0x98, 0x0e,0xc0,0x00,0xc0,0x30,0x18,0xc0,0xce, 0x06,0x70,0x66,0x00,0x0f,0x87,0x06,0x70, 0x76,0x03,0x70,0x71,0xdc,0x0f,0x01,0x80, 0x70,0x76,0x27,0x70,0x76,0x18,0x60,0x6c, 0x0d,0x83,0xb0,0x30,0x00,0xc0,0x18,0xc0, 0x00,0x36,0x0c,0x00,0x06,0x18,0x01,0xb0, 0x0f,0x80,0xf0,0x31,0x87,0x9c,0x00,0x00, 0x00,0x06,0x07,0xf0,0x30,0xe7,0x06,0x01, 0x80,0x70,0x70,0x06,0x07,0xf6,0x06,0x06, 0x1c,0x0e,0x07,0x87,0xc1,0xc0,0x70,0x78, 0x3c,0x60,0xe0,0xc7,0x03,0x80,0x18,0x01, 0xe0,0x78,0x00,0x00,0x1e,0x03,0x00,0xe3, 0x00,0xe1,0xe0,0x71,0x80,0x33,0x00,0xe3, 0x00,0xe6,0x00,0x0c,0x00,0xc0,0x60,0x30, 0x00,0x30,0x00,0x70,0x39,0x80,0x78,0x00, 0x0c,0x1c,0x00,0xc3,0x07,0x18,0x00,0xe1, 0xc7,0x06,0x00,0x03,0x87,0x8c,0x1c,0xc0, 0x00,0xc0,0x18,0x30,0xe1,0xc7,0x0e,0x78, 0xe6,0x00,0x07,0x07,0x8e,0x38,0xf7,0x07, 0x38,0x61,0x8c,0x0f,0x03,0x00,0x38,0xf3, 0x2e,0x38,0xf6,0x0c,0x60,0x6e,0x19,0xc7, 0xb0,0x30,0x00,0xc0,0x18,0xc0,0x00,0x66, 0x0c,0x00,0x06,0x18,0x01,0xb0,0x07,0x00, 0x70,0x19,0xff,0xf8,0x00,0x00,0x00,0x0c, 0x00,0x60,0x30,0x7e,0x0c,0x03,0x00,0x70, 0x70,0x0c,0x00,0x66,0x06,0x06,0x0f,0xfc, 0x03,0xff,0xc3,0x80,0x38,0x3f,0xf8,0x60, 0xe0,0xc3,0xff,0x00,0x18,0x00,0xff,0xe0, 0x00,0x00,0x0e,0x03,0x00,0x73,0x00,0x70, 0xff,0xe3,0x00,0x1b,0xff,0xc3,0xff,0xe7, 0xff,0xec,0x00,0xc0,0x60,0x30,0x00,0x7f, 0xfe,0x3f,0xf1,0x80,0x38,0x18,0x07,0xf8, 0x00,0xc1,0xfe,0x3f,0xfc,0x7f,0x83,0xfc, 0x00,0x01,0xfd,0x87,0xf8,0xc0,0x00,0xc0, 0x1f,0xe0,0x7f,0x83,0xfc,0x7f,0xc7,0xff, 0x07,0x07,0xfc,0x1f,0xf3,0xfe,0x1f,0xc3, 0x06,0x07,0x07,0xff,0x1f,0xf3,0xfe,0x1f, 0xf6,0x0e,0x60,0x67,0xf8,0xff,0xb0,0x30, 0x00,0xf8,0x18,0xc0,0x00,0x63,0x0c,0x00, 0x06,0xdb,0x6d,0xb0,0x07,0x00,0x70,0x1c, 0x79,0xe1,0x80,0x00,0x00,0x1c,0x00,0x60, 0x60,0x3c,0x18,0x07,0xf0,0x20,0x20,0x18, 0x00,0x66,0x06,0x06,0x03,0xf0,0x00,0xfe, 0xf7,0x00,0x1c,0x0f,0xe0,0x60,0xe0,0xc0, 0xfe,0x00,0x18,0x00,0x3f,0x80,0x00,0x00, 0x0e,0x03,0x00,0x3b,0x00,0x38,0x3f,0x83, 0x00,0x1b,0xff,0x03,0xff,0x87,0xff,0xec, 0x00,0xc0,0x60,0x30,0x00,0x7f,0xfe,0x0f, 0xc1,0x80,0x18,0x18,0x03,0xe0,0x00,0xc0, 0xfc,0x3f,0xfc,0x3f,0x01,0xf8,0x00,0x00, 0xf8,0xc3,0xf0,0xc0,0x00,0xc0,0x07,0xc0, 0x1f,0x01,0xf8,0x67,0x87,0xff,0x02,0x06, 0x78,0x0f,0x31,0xf8,0x0f,0x86,0x07,0x06, 0x07,0xff,0x0f,0x30,0xf8,0x0f,0x36,0x07, 0x60,0x63,0xe0,0x79,0xb0,0x30,0x00,0x78, 0x18,0xc0,0x00,0x63,0x0c,0x00,0x06,0xdb, 0x6d,0xb0,0x00,0x00,0x00,0x0e,0x00,0x03, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00, 0x30,0x00,0x00,0x00,0x00,0x06,0x00,0x00, 0x00,0x00,0x20,0x00,0x30,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xc3,0x00,0x00,0x06,0x40,0x00,0x00, 0x00,0x00,0x00,0x07,0x00,0x0e,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x06,0x00,0x00,0x30,0x00, 0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00, 0x20,0x60,0x70,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc1, 0x80,0x00,0x06,0x40,0x00,0x00,0x00,0x00, 0x00,0x03,0xe0,0x3c,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x06,0x00,0x00,0x30,0x00,0x00,0x00, 0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x70, 0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x01,0x81,0x80,0x00, 0x0e,0xc0,0x00,0x00,0x00,0x00,0x00,0x01, 0xff,0xf0,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x03,0xff,0xf8, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06, 0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x3c, 0x00,0x00,0x00,0x00,0x00,0x3f,0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x01,0x80,0xc0,0x00,0x3c,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xc0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x03,0xff,0xf8,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00, 0x30,0x00,0x00,0x00,0x00,0x38,0x00,0x00, 0x00,0x00,0x00,0x1f,0x80,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x03,0x00,0x60,0x00,0x38,0x00,0x00,0x00] class FontArial28(object) : def __init__(self) : global Arial28Infos global Arial28Pixels self.info = Arial28Infos self.data = Arial28Pixels self.height = 24 self.width = 134
37.63745
93
0.740076
3,681
18,894
3.797609
0.090193
0.484155
0.642964
0.789756
0.493025
0.412619
0.392589
0.375134
0.348809
0.320481
0
0.530022
0.056843
18,894
501
94
37.712575
0.254433
0.008362
0
0.158215
0
0
0
0
0
1
0.686776
0
0
1
0.002028
false
0
0
0
0.004057
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
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
7
bc4cad8ad815d2b22e1b93251a008bf538e5708d
20,118
py
Python
Dev/parallel/models.py
leyiweb/OCGAN
326d01043bbc3b5219625af9d38c30d6a3be5a69
[ "Apache-2.0" ]
58
2019-03-27T09:17:55.000Z
2022-02-28T17:09:35.000Z
Dev/parallel/models.py
leyiweb/OCGAN
326d01043bbc3b5219625af9d38c30d6a3be5a69
[ "Apache-2.0" ]
9
2019-04-16T12:23:36.000Z
2021-01-01T03:54:58.000Z
Dev/parallel/models.py
leyiweb/OCGAN
326d01043bbc3b5219625af9d38c30d6a3be5a69
[ "Apache-2.0" ]
25
2019-07-17T11:59:08.000Z
2021-05-05T11:34:37.000Z
import numpy as np import mxnet as mx from mxnet import gluon from mxnet import ndarray as nd from mxnet.gluon import nn, utils from mxnet.gluon.nn import Dense, Activation, Conv2D, Conv2DTranspose, \ BatchNorm, LeakyReLU, Flatten, HybridSequential, HybridBlock, Dropout # Define Unet generator skip block class UnetSkipUnit(HybridBlock): def __init__(self, inner_channels, outer_channels, inner_block=None, innermost=False, outermost=False, use_dropout=False, use_bias=False): super(UnetSkipUnit, self).__init__() with self.name_scope(): self.outermost = outermost en_conv = Conv2D(channels=inner_channels, kernel_size=5, strides=2, padding=0, in_channels=outer_channels, use_bias=use_bias) en_relu = LeakyReLU(alpha=0.2) en_norm = BatchNorm(momentum=0.1, in_channels=inner_channels) de_relu = Activation(activation='relu') de_norm = BatchNorm(momentum=0.1, in_channels=outer_channels) if innermost: de_conv = Conv2DTranspose(channels=outer_channels, kernel_size=5, strides=2, padding=0, in_channels=inner_channels, use_bias=use_bias) encoder = [en_relu, en_conv] decoder = [de_relu, de_conv, de_norm] model = encoder + decoder elif outermost: de_conv = Conv2DTranspose(channels=outer_channels, kernel_size=5, strides=2, padding=0, in_channels=inner_channels) encoder = [en_conv] decoder = [de_relu, de_conv, Activation(activation='tanh')] model = encoder + [inner_block] + decoder else: de_conv = Conv2DTranspose(channels=outer_channels, kernel_size=5, strides=2, padding=0, in_channels=inner_channels, use_bias=use_bias) encoder = [en_relu, en_conv, en_norm] decoder = [de_relu, de_conv, de_norm] model = encoder + [inner_block] + decoder if use_dropout: model += [Dropout(rate=0.5)] self.model = HybridSequential() with self.model.name_scope(): for block in model: self.model.add(block) def hybrid_forward(self, F, x): if self.outermost: return self.model(x) else: return self.model(x) # Define Unet generator class UnetGenerator(HybridBlock): def __init__(self, in_channels, num_downs, ngf=64, use_dropout=True): super(UnetGenerator, self).__init__() # Build unet generator structure unet = UnetSkipUnit(ngf * 8, ngf * 8, innermost=True) for _ in range(num_downs - 5): unet = UnetSkipUnit(ngf * 8, ngf * 8, unet, use_dropout=use_dropout) unet = UnetSkipUnit(ngf * 8, ngf * 4, unet) unet = UnetSkipUnit(ngf * 4, ngf * 2, unet) unet = UnetSkipUnit(ngf * 2, ngf * 1, unet) unet = UnetSkipUnit(ngf, in_channels, unet, outermost=True) with self.name_scope(): self.model = unet def hybrid_forward(self, F, x): print(np.shape(self.model(x))) return self.model(x) # Define the PatchGAN discriminator class Discriminator(HybridBlock): def __init__(self, in_channels, ndf=64, n_layers=3, use_sigmoid=False, use_bias=False, istest = False, isthreeway = False): super(Discriminator, self).__init__() with self.name_scope(): self.model = HybridSequential() kernel_size = 5 padding = 0 #int(np.ceil((kernel_size - 1) / 2)) self.model.add(Conv2D(channels=ndf, kernel_size=kernel_size, strides=2, padding=padding, in_channels=in_channels)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult = 1 for n in range(1, n_layers): nf_mult_prev = nf_mult nf_mult = min(2 ** n, 8) self.model.add(Conv2D(channels=ndf * nf_mult, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult , use_global_stats=istest)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult_prev = nf_mult nf_mult = min(2 ** n_layers, 8) self.model.add(Conv2D(channels=ndf * nf_mult, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult, use_global_stats=istest)) self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Conv2D(channels=1, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult)) if isthreeway: self.model.add(gluon.nn.Dense(3)) elif use_sigmoid: self.model.add(Activation(activation='sigmoid')) def hybrid_forward(self, F, x): out = self.model(x) #print(np.shape(out)) return out class LatentDiscriminator(HybridBlock): def __init__(self, in_channels, ndf=64, n_layers=3, use_sigmoid=False, use_bias=False, istest = False, isthreeway = False): super(LatentDiscriminator, self).__init__() with self.name_scope(): self.model = HybridSequential() self.model.add(gluon.nn.Dense(128)) self.model.add(Activation(activation='relu')) self.model.add(gluon.nn.Dense(64)) self.model.add(BatchNorm(momentum=0.1, in_channels=64)) self.model.add(Activation(activation='relu')) self.model.add(gluon.nn.Dense(32)) self.model.add(BatchNorm(momentum=0.1, in_channels=32)) self.model.add(Activation(activation='relu')) self.model.add(gluon.nn.Dense(16)) self.model.add(Activation(activation='relu')) self.model.add(gluon.nn.Dense(1)) self.model.add(Activation(activation='sigmoid')) def hybrid_forward(self, F, x): out = self.model(x) #print(np.shape(out)) return out ''' class CEGenerator(HybridBlock): def __init__(self, in_channels, ndf=64, n_layers=3, use_sigmoid=False, use_bias=False): super(CEGenerator, self).__init__() with self.name_scope(): self.model = HybridSequential() kernel_size = 4 padding = int(np.ceil((kernel_size - 1) / 2)) self.model.add(Conv2D(channels=ndf, kernel_size=kernel_size, strides=2, padding=padding, in_channels=in_channels)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult = 1 for n in range(1, n_layers): nf_mult_prev = nf_mult nf_mult = 2 ** n self.model.add(Conv2D(channels=ndf * nf_mult, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult_prev = nf_mult nf_mult = 2 ** n_layers self.model.add(Conv2D(channels=ndf * nf_mult, kernel_size=kernel_size, strides=1, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult)) self.model.add(LeakyReLU(alpha=0.2)) #Decoder self.model.add(Conv2DTranspose(channels=ndf * nf_mult/2, kernel_size=kernel_size, strides=1, padding=padding, in_channels=ndf * nf_mult, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult)) self.model.add(LeakyReLU(alpha=0.2)) for n in range(1, n_layers): nf_mult = nf_mult/2 self.model.add(Conv2DTranspose(channels=ndf * nf_mult/2, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult)) self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Conv2DTranspose(channels=3, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf)) self.model.add(LeakyReLU(alpha=0.2)) def hybrid_forward(self, F, x): out = self.model(x) # print(out) return out ''' class CEGenerator(HybridBlock): def __init__(self, in_channels, ndf=64, n_layers=3, use_bias=False, istest=False, usetanh = False ): super(CEGenerator, self).__init__() with self.name_scope(): self.model = HybridSequential() kernel_size = 5 padding = 0 #int(np.ceil((kernel_size - 1) / 2)) self.model.add(Conv2D(channels=ndf, kernel_size=kernel_size, strides=2, padding=padding, in_channels=in_channels)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult = 2; nf_mult_prev = 1; nf_mult = 1 for n in range(1, n_layers): nf_mult_prev = nf_mult nf_mult = 2 ** n self.model.add(Conv2D(channels=ndf * nf_mult, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult, use_global_stats=istest)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult_prev = nf_mult nf_mult = 2 ** n_layers self.model.add(Conv2D(channels=4096, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) #self.model.add(BatchNorm(momentum=0.1, in_channels =128, use_global_stats=istest)) if usetanh: self.model.add(Activation(activation='tanh')) else: self.model.add(LeakyReLU(alpha=0.2)) # Decoder self.model.add(Conv2DTranspose(channels=ndf * nf_mult/2, kernel_size=kernel_size, strides=2, padding=padding, in_channels=4096, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult / 2, use_global_stats=istest)) #self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Activation(activation='relu')) for n in range(1, n_layers): nf_mult = nf_mult / 2 self.model.add(Conv2DTranspose(channels=ndf * nf_mult / 2, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult / 2, use_global_stats=istest)) #self.model.add(LeakyReLU(alpha=0.2)) if n==2: self.model.add(Dropout(rate=0.5)) self.model.add(Activation(activation='relu')) self.model.add(Conv2DTranspose(channels=in_channels, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf)) #self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Activation(activation='tanh')) def hybrid_forward(self, F, x): out = self.model(x) # print(out) return out class CEGeneratorP(HybridBlock): def __init__(self, in_channels, ndf=64, n_layers=3, use_bias=False, istest=False, usetanh = False ): super(CEGeneratorP, self).__init__() with self.name_scope(): self.model = HybridSequential() kernel_size = 5 padding = 0 #int(np.ceil((kernel_size - 1) / 2)) self.model.add(Conv2D(channels=ndf, kernel_size=kernel_size, strides=2, padding=padding, in_channels=in_channels)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult = 2; nf_mult_prev = 1; nf_mult = 1 for n in range(1, n_layers): nf_mult_prev = nf_mult nf_mult = 2 ** n self.model.add(Conv2D(channels=ndf * nf_mult, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult, use_global_stats=istest)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult_prev = nf_mult nf_mult = 2 ** n_layers self.model.add(Conv2D(channels=4096, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) #self.model.add(BatchNorm(momentum=0.1, in_channels =128, use_global_stats=istest)) if usetanh: self.model.add(Activation(activation='tanh')) else: self.model.add(LeakyReLU(alpha=0.2)) # Decoder self.model.add(Conv2DTranspose(channels=ndf * nf_mult/2, kernel_size=kernel_size, strides=2, padding=padding, in_channels=4096, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult / 2, use_global_stats=istest)) #self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Activation(activation='relu')) for n in range(1, n_layers): nf_mult = nf_mult / 2 self.model.add(Conv2DTranspose(channels=ndf * nf_mult / 2, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult / 2, use_global_stats=istest)) #self.model.add(LeakyReLU(alpha=0.2)) if n==2: self.model.add(Dropout(rate=0.5)) self.model.add(Activation(activation='relu')) self.model.add(Conv2DTranspose(channels=in_channels, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf)) #self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Activation(activation='tanh')) def hybrid_forward(self, F, x): out = self.model(x) # print(out) return out class Encoder(HybridBlock): def __init__(self, in_channels, ndf=64, n_layers=3, use_bias=False, istest=False,latent=256, usetanh = False ): super(Encoder, self).__init__() usetanh = True self.model = HybridSequential() kernel_size = 5 padding = 0 #int(np.ceil((kernel_size - 1) / 2)) self.model.add(Conv2D(channels=ndf, kernel_size=kernel_size, strides=2, padding=padding, in_channels=in_channels)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult = 2; nf_mult_prev = 1; nf_mult = 1 for n in range(1, n_layers): nf_mult_prev = nf_mult nf_mult = 2 ** n self.model.add(Conv2D(channels=ndf * nf_mult, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult, use_global_stats=istest)) self.model.add(LeakyReLU(alpha=0.2)) nf_mult_prev = nf_mult nf_mult = 2 ** n_layers self.model.add(Conv2D(channels=latent, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult_prev, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels =latent, use_global_stats=istest)) if usetanh: self.model.add(Activation(activation='tanh')) else: self.model.add(LeakyReLU(alpha=0.2)) def hybrid_forward(self, F, x): out = self.model(x) # print(out) return out class Decoder(HybridBlock): def __init__(self, in_channels, ndf=64, n_layers=3, use_bias=False, istest=False, latent=256, usetanh = False ): super(Decoder, self).__init__() self.model = HybridSequential() kernel_size = 5 padding = 0 nf_mult = 2 ** n_layers self.model.add(Conv2DTranspose(channels=ndf * nf_mult/2, kernel_size=kernel_size, strides=2, padding=padding, in_channels=latent, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult / 2, use_global_stats=istest)) #self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Activation(activation='relu')) for n in range(1, n_layers): nf_mult = nf_mult / 2 self.model.add(Conv2DTranspose(channels=ndf * nf_mult / 2, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf * nf_mult, use_bias=use_bias)) self.model.add(BatchNorm(momentum=0.1, in_channels=ndf * nf_mult / 2, use_global_stats=istest)) #self.model.add(LeakyReLU(alpha=0.2)) if n==2: self.model.add(Dropout(rate=0.5)) self.model.add(Activation(activation='relu')) self.model.add(Conv2DTranspose(channels=in_channels, kernel_size=kernel_size, strides=2, padding=padding, in_channels=ndf)) #self.model.add(LeakyReLU(alpha=0.2)) self.model.add(Activation(activation='tanh')) def hybrid_forward(self, F, x): out = self.model(x) # print(out) return out def param_init(param, ctx): if param.name.find('conv') != -1: if param.name.find('weight') != -1: param.initialize(init=mx.init.Normal(0.02), ctx=ctx) else: param.initialize(init=mx.init.Zero(), ctx=ctx) elif param.name.find('batchnorm') != -1: param.initialize(init=mx.init.Zero(), ctx=ctx) # Initialize gamma from normal distribution with mean 1 and std 0.02 if param.name.find('gamma') != -1: param.initialize(init=mx.init.Normal(0.02), ctx=ctx , force_reinit=True) #param.set_data(nd.random_normal(1, 0.02, param.data().shape, ctx=ctx)) elif param.name.find('dense') != -1: param.initialize(init=mx.init.Normal(0.02), ctx=ctx) def network_init(net, ctx): for param in net.collect_params().values(): param_init(param, ctx)
45.107623
127
0.562829
2,443
20,118
4.427753
0.057716
0.103171
0.114265
0.072294
0.858556
0.844042
0.816493
0.805399
0.793566
0.774522
0
0.026572
0.330301
20,118
445
128
45.208989
0.776293
0.048911
0
0.714286
0
0
0.006998
0
0
0
0
0
0
0
null
null
0
0.020408
null
null
0.003401
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
bc77beca543b2d5cf1b84c0aa0532d87a5885cdc
60,206
py
Python
nba_py/player.py
inoble/nba_py
bb0da9681719f37c637d04ddd5ea7a4f5e256a4d
[ "BSD-3-Clause" ]
null
null
null
nba_py/player.py
inoble/nba_py
bb0da9681719f37c637d04ddd5ea7a4f5e256a4d
[ "BSD-3-Clause" ]
null
null
null
nba_py/player.py
inoble/nba_py
bb0da9681719f37c637d04ddd5ea7a4f5e256a4d
[ "BSD-3-Clause" ]
null
null
null
from nba_py import _api_scrape, _get_json, HAS_PANDAS from nba_py import constants class PlayerNotFoundException(Exception): pass def get_player(first_name, last_name=None, season=constants.CURRENT_SEASON, only_current=0, just_id=True): """ Calls our PlayerList class to get a full list of players and then returns just an id if specified or the full row of player information Args: :first_name: First name of the player :last_name: Last name of the player (this is None if the player only has first name [Nene]) :only_current: Only wants the current list of players :just_id: Only wants the id of the player Returns: Either the ID or full row of information of the player inputted Raises: :PlayerNotFoundException:: """ if last_name is None: name = first_name.lower() else: name = '{}, {}'.format(last_name, first_name).lower() pl = PlayerList(season=season, only_current=only_current).info() hdr = 'DISPLAY_LAST_COMMA_FIRST' if HAS_PANDAS: item = pl[pl.DISPLAY_LAST_COMMA_FIRST.str.lower() == name] else: item = next(plyr for plyr in pl if str(plyr[hdr]).lower() == name) if len(item) == 0: raise PlayerNotFoundException elif just_id: return item['PERSON_ID'] else: return item class PlayerList: """ Contains a list of all players for a season, if specified, and will only contain current players if specified as well Args: :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :only_current: Restrict lookup to only current players Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'commonallplayers' def __init__(self, league_id=constants.League.NBA, season=constants.CURRENT_SEASON, only_current=1): self.json = _get_json(endpoint=self._endpoint, params={'LeagueID': league_id, 'Season': season, 'IsOnlyCurrentSeason': only_current}) def info(self): return _api_scrape(self.json, 0) class PlayerSummary: """ Contains common player information like headline stats, weight, etc. Args: :player_id: ID of the player to look up Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'commonplayerinfo' def __init__(self, player_id): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id}) def info(self): return _api_scrape(self.json, 0) def headline_stats(self): return _api_scrape(self.json, 1) class PlayerNextNGames: """ Contains information about upcoming games for a player Args: :player_id: ID of the player to look up :number_of_games: Number of future games to look up :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playernextngames' def __init__(self, player_id, number_of_games, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id, 'NumberOfGames': number_of_games, 'Season': season, 'SeasonType': season_type}) def info(self): return _api_scrape(self.json, 0) class PlayerFantasyBarGraph: """ Fantasy information that can be presented in bar graphs Args: :player_id: ID of the player to look up :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerfantasyprofilebargraph' def __init__(self, player_id, league_id=constants.League.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type}) def info(self): return _api_scrape(self.json, 0) def last_five_games(self): return _api_scrape(self.json, 1) class PlayerFantasyProfile: """ Contains fantasy player information Args: :player_id: ID of the player to look up :league_id: ID for the league to look in (Default is 00) :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerfantasyprofile' def __init__(self, player_id, league_id=constants.League.Default, measure_type=constants.MeasureType.Default, per_mode=constants.PerMode.Default, plus_minus=constants.PlusMinus.Default, pace_adjust=constants.PaceAdjust.Default, rank=constants.PaceAdjust.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default,): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id, 'LeagueID': league_id, 'MeasureType': measure_type, 'PerMode': per_mode, 'PlusMinus': plus_minus, 'PaceAdjust': pace_adjust, 'Rank': rank, 'Season': season, 'SeasonType': season_type}) def overall(self): return _api_scrape(self.json, 0) def location(self): return _api_scrape(self.json, 1) def LastNGames(self): return _api_scrape(self.json, 2) def DaysRestModified(self): return _api_scrape(self.json, 3) def Opponent(self): return _api_scrape(self.json, 4) class PlayerCareerByCollegeRollup: """ Contains div1 college team totals sorted by last year's seeding Args: :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playercareerbycollegerollup' def __init__(self, per_mode=constants.PerMode.Default, league_id=constants.League.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default): self.json = _get_json(endpoint=self._endpoint, params={'PerMode': per_mode, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type}) def east(self): return _api_scrape(self.json, 0) def south(self): return _api_scrape(self.json, 1) def midwest(self): return _api_scrape(self.json, 2) def west(self): return _api_scrape(self.json, 3) class PlayerCareerByCollege: """ Contains list of nba players and their nba stats grouped by their college Args: :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :college: which college the player attended (Duke, UCLA etc.) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playercareerbycollege' def __init__(self, per_mode=constants.PerMode.Default, league_id=constants.League.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default, college=0): self.json = _get_json(endpoint=self._endpoint, params={'PerMode': per_mode, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type, 'College': college}) def info(self): return _api_scrape(self.json, 0) class PlayerAwards: """ Contains information on all awards given to a player (player_id) Args: :player_id: ID of the player to look up Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerawards' def __init__(self, player_id): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id}) def info(self): return _api_scrape(self.json, 0) class PlayerHustleLeaders: """ Contains league leading hustle stats by player Args: :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular or Playoffs) :playoff_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :team_id: ID of the team to look up :conference: Filter by conference :division: Filter by division :player_experience: Player experience (Rookie :player_position: Filter by position (Forward :draft_year: Filter by draft year :draft_pick: Filter by draft pick (1st+Round, Lottery+Pick, etc.) :college: Filter by college :country: Filter by country :height: Filter by player's height :weight: Filter by player's weight """ _endpoint = 'leaguehustlestatsplayerleaders' def __init__(self, per_mode=constants.PerMode.Default, league_id=constants.League.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default, playoff_round=constants.PlayoffRound.Default, outcome=constants.Outcome.Default, location=constants.Location.Default, month=constants.Month.Default, season_segment=constants.SeasonSegment.Default, date_from=constants.DateFrom.Default, date_to=constants.DateTo.Default, opponent_team_id=constants.OpponentTeamID.Default, vs_conference=constants.VsConference.Default, vs_division=constants.VsDivision.Default, team_id=constants.TeamID.Default, conference=constants.Conference.Default, division=constants.Division.Default, player_experience=constants.PlayerExperience.Default, player_position=constants.PlayerPosition.Default, draft_year=constants.DraftYear.Default, draft_pick=constants.DraftPick.Default, college=constants.College.Default, country=constants.Country.Default, height=constants.Height.Default, weight=constants.Weight.Default ): self.json = _get_json(endpoint=self._endpoint, params={'PerMode': per_mode, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type, 'PORound': playoff_round, 'Outcome': outcome, 'Location': location, 'Month': month, 'SeasonSegment': season_segment, 'DateFrom': date_from, 'DateTo': date_to, 'OpponentTeamID': opponent_team_id, 'VsConference': vs_conference, 'VsDivision': vs_division, 'TeamID': team_id, 'Conference': conference, 'Division': division, 'PlayerExperience': player_experience, 'PlayerPosition': player_position, 'DraftYear': draft_year, 'DraftPick': draft_pick, 'College': college, 'Country': country, 'Height': height, 'Weight': weight}) def contested_shots(self): return _api_scrape(self.json, 0) def charges_drawn(self): return _api_scrape(self.json, 1) def deflections(self): return _api_scrape(self.json, 2) def loose_balls(self): return _api_scrape(self.json, 3) def screen_assists(self): return _api_scrape(self.json, 4) class PlayerHustleStats: """ Contains hustle stats by player Args: :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular or Playoffs) :playoff_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :team_id: ID of the team to look up :conference: Filter by conference :division: Filter by division :player_experience: Player experience (Rookie :player_position: Filter by position (Forward :draft_year: Filter by draft year :draft_pick: Filter by draft pick (1st+Round, Lottery+Pick, etc.) :college: Filter by college :country: Filter by country :height: Filter by player's height :weight: Filter by player's weight """ _endpoint = 'leaguehustlestatsplayer' def __init__(self, per_mode=constants.PerMode.Default, league_id=constants.League.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default, playoff_round=constants.PlayoffRound.Default, outcome=constants.Outcome.Default, location=constants.Location.Default, month=constants.Month.Default, season_segment=constants.SeasonSegment.Default, date_from=constants.DateFrom.Default, date_to=constants.DateTo.Default, opponent_team_id=constants.OpponentTeamID.Default, vs_conference=constants.VsConference.Default, vs_division=constants.VsDivision.Default, team_id=constants.TeamID.Default, conference=constants.Conference.Default, division=constants.Division.Default, player_experience=constants.PlayerExperience.Default, player_position=constants.PlayerPosition.Default, draft_year=constants.DraftYear.Default, draft_pick=constants.DraftPick.Default, college=constants.College.Default, country=constants.Country.Default, height=constants.Height.Default, weight=constants.Weight.Default ): self.json = _get_json(endpoint=self._endpoint, params={'PerMode': per_mode, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type, 'PORound': playoff_round, 'Outcome': outcome, 'Location': location, 'Month': month, 'SeasonSegment': season_segment, 'DateFrom': date_from, 'DateTo': date_to, 'OpponentTeamID': opponent_team_id, 'VsConference': vs_conference, 'VsDivision': vs_division, 'TeamID': team_id, 'Conference': conference, 'Division': division, 'PlayerExperience': player_experience, 'PlayerPosition': player_position, 'DraftYear': draft_year, 'DraftPick': draft_pick, 'College': college, 'Country': country, 'Height': height, 'Weight': weight}) def info(self): return _api_scrape(self.json, 0) class _PlayerDashboard: """ Has all the basic arguments for all of the Player Dashboard type objects Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbyyearoveryear' def __init__(self, player_id, team_id=0, measure_type=constants.MeasureType.Default, per_mode=constants.PerMode.Default, plus_minus=constants.PlusMinus.Default, pace_adjust=constants.PaceAdjust.Default, rank=constants.PaceAdjust.Default, league_id=constants.League.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default, po_round=constants.PlayoffRound.Default, outcome=constants.Outcome.Default, location=constants.Location.Default, month=constants.Month.Default, season_segment=constants.SeasonSegment.Default, date_from=constants.DateFrom.Default, date_to=constants.DateTo.Default, opponent_team_id=constants.OpponentTeamID.Default, vs_conference=constants.VsConference.Default, vs_division=constants.VsDivision.Default, game_segment=constants.GameSegment.Default, period=constants.Period.Default, shot_clock_range=constants.ShotClockRange.Default, last_n_games=constants.LastNGames.Default): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id, 'TeamID': team_id, 'MeasureType': measure_type, 'PerMode': per_mode, 'PlusMinus': plus_minus, 'PaceAdjust': pace_adjust, 'Rank': rank, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type, 'PORound': po_round, 'Outcome': outcome, 'Location': location, 'Month': month, 'SeasonSegment': season_segment, 'DateFrom': date_from, 'DateTo': date_to, 'OpponentTeamID': opponent_team_id, 'VsConference': vs_conference, 'VsDivision': vs_division, 'GameSegment': game_segment, 'Period': period, 'ShotClockRange': shot_clock_range, 'LastNGames': last_n_games}, referer='player') def overall(self): return _api_scrape(self.json, 0) class PlayerGeneralSplits(_PlayerDashboard): """ Contains stats pertaining to location, wins and losses, pre/post all star break, starting position, and numbers of days rest Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbygeneralsplits' def location(self): return _api_scrape(self.json, 1) def win_losses(self): return _api_scrape(self.json, 2) def month(self): return _api_scrape(self.json, 3) def pre_post_all_star(self): return _api_scrape(self.json, 4) def starting_position(self): return _api_scrape(self.json, 5) def days_rest(self): return _api_scrape(self.json, 6) class PlayerOpponentSplits(_PlayerDashboard): """ Contains stats pertaining to player stats vs certain opponents by division, conference, and by specific team opponent Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbyopponent' def by_conference(self): return _api_scrape(self.json, 1) def by_division(self): return _api_scrape(self.json, 2) def by_opponent(self): return _api_scrape(self.json, 3) class PlayerLastNGamesSplits(_PlayerDashboard): """ Contains players stats per last 5, 10, 15, and 20 games, or specified number of games. Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbylastngames' def last5(self): return _api_scrape(self.json, 1) def last10(self): return _api_scrape(self.json, 2) def last15(self): return _api_scrape(self.json, 3) def last20(self): return _api_scrape(self.json, 4) def gamenumber(self): return _api_scrape(self.json, 5) class PlayerInGameSplits(_PlayerDashboard): """ Contains player stats by half, by quarter, by score margin, and by actual margins. Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbygamesplits' def by_half(self): return _api_scrape(self.json, 1) def by_period(self): return _api_scrape(self.json, 2) def by_score_margin(self): return _api_scrape(self.json, 3) def by_actual_margin(self): return _api_scrape(self.json, 4) class PlayerClutchSplits(_PlayerDashboard): """ Contains a lot of methods for last n minutes with a deficit of x points Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbyclutch' def last5min_deficit_5point(self): """ Results in last 5 minutes <= 5 points """ return _api_scrape(self.json, 1) def last3min_deficit_5point(self): """ Results in last 5 minutes <= 5 points """ return _api_scrape(self.json, 2) def last1min_deficit_5point(self): """ Results in last 5 minutes <= 5 points """ return _api_scrape(self.json, 3) def last30sec_deficit_3point(self): """ Results in last 5 minutes <= 5 points """ return _api_scrape(self.json, 4) def last10sec_deficit_3point(self): """ Results in last 5 minutes <= 5 points """ return _api_scrape(self.json, 5) def last5min_plusminus_5point(self): """ Last 5 minutes +/= 5 points """ return _api_scrape(self.json, 6) def last3min_plusminus_5point(self): """ Last 3 minutes +/= 5 points """ return _api_scrape(self.json, 7) def last1min_plusminus_5point(self): """ Last 1 minutes +/= 5 points """ return _api_scrape(self.json, 8) def last30sec_plusminus_5point(self): """ Last 30 seconds +/= 3 points """ return _api_scrape(self.json, 9) class PlayerShootingSplits(_PlayerDashboard): """ Shooting stats based on distance, area, assisted to, shot types, and assisted by. Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbyshootingsplits' def shot_5ft(self): return _api_scrape(self.json, 1) def shot_8ft(self): return _api_scrape(self.json, 2) def shot_areas(self): return _api_scrape(self.json, 3) def assisted_shots(self): return _api_scrape(self.json, 4) def shot_types_summary(self): return _api_scrape(self.json, 5) def shot_types_detail(self): return _api_scrape(self.json, 6) def assisted_by(self): return _api_scrape(self.json, 7) class PlayerPerformanceSplits(_PlayerDashboard): """ Player stats by different performance metrics such as score differntial, points scored, and points scored against Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbyteamperformance' def score_differential(self): return _api_scrape(self.json, 1) def points_scored(self): return _api_scrape(self.json, 2) def points_against(self): return _api_scrape(self.json, 3) class PlayerYearOverYearSplits(_PlayerDashboard): """ Displays player stats over the given season and over all seasons in the given league Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashboardbyyearoveryear' def by_year(self): return _api_scrape(self.json, 1) class PlayerCareer: """ Contains stats based on several parameters such as career regular season totals, post season career totals, all star season careers totals, college season career totals, etc. Args: :player_id: Player ID to look up :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :league_id: ID for the league to look in (Default is 00) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playercareerstats' def __init__(self, player_id, per_mode=constants.PerMode.PerGame, league_id=constants.League.NBA): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id, 'LeagueID': league_id, 'PerMode': per_mode}) def regular_season_totals(self): return _api_scrape(self.json, 0) def regular_season_career_totals(self): return _api_scrape(self.json, 1) def post_season_totals(self): return _api_scrape(self.json, 2) def post_season_career_totals(self): return _api_scrape(self.json, 3) def all_star_season_totals(self): return _api_scrape(self.json, 4) def career_all_star_season_totals(self): return _api_scrape(self.json, 5) def college_season_totals(self): return _api_scrape(self.json, 6) def college_season_career_totals(self): return _api_scrape(self.json, 7) def preseason_season_totals(self): return _api_scrape(self.json, 8) def preseason_career_totals(self): return _api_scrape(self.json, 9) def regular_season_rankings(self): return _api_scrape(self.json, 10) def post_season_rankings(self): return _api_scrape(self.json, 11) class PlayerProfile(PlayerCareer): """ Contains a more in depth version of player career stats with season highs, career highs, and when the player's next game is Args: :player_id: Player ID to look up :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :league_id: ID for the league to look in (Default is 00) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerprofilev2' def season_highs(self): return _api_scrape(self.json, 12) def career_highs(self): return _api_scrape(self.json, 13) def next_game(self): return _api_scrape(self.json, 14) class PlayerGameLogs: """ Contains a full log of all the games for a player for a given season Args: :player_id: ID of the player to look up :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playergamelog' def __init__(self, player_id, league_id=constants.League.NBA, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Regular): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type}) def info(self): return _api_scrape(self.json, 0) class PlayerShotTracking(_PlayerDashboard): """ Tracking data for shooting for a given player Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashptshots' def general_shooting(self): return _api_scrape(self.json, 1) def shot_clock_shooting(self): return _api_scrape(self.json, 2) def dribble_shooting(self): return _api_scrape(self.json, 3) def closest_defender_shooting(self): return _api_scrape(self.json, 4) def closest_defender_shooting_long(self): return _api_scrape(self.json, 5) def touch_time_shooting(self): return _api_scrape(self.json, 6) class PlayerReboundTracking(_PlayerDashboard): """ Tracking data for rebounding for a given player Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashptreb' def shot_type_rebounding(self): return _api_scrape(self.json, 1) def num_contested_rebounding(self): return _api_scrape(self.json, 2) def shot_distance_rebounding(self): return _api_scrape(self.json, 3) def rebound_distance_rebounding(self): return _api_scrape(self.json, 4) class PlayerPassTracking(_PlayerDashboard): """ Tracking data for passing for a given player Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashptpass' def passes_made(self): return _api_scrape(self.json, 0) def passes_received(self): return _api_scrape(self.json, 1) class PlayerDefenseTracking(_PlayerDashboard): """ Tracking data for defense for a given player Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashptshotdefend' class PlayerShotLogTracking(_PlayerDashboard): """ Contains a log for every shot for a given season for a given player Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashptshotlog' class PlayerReboundLogTracking(_PlayerDashboard): """ Contains a log for every rebound for a given season for a given player Args: :player_id: ID of the player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: :json: Contains the full json dump to play around with """ _endpoint = 'playerdashptreboundlogs' class PlayerVsPlayer: """ Contains general stats that pertain to players going against other players Args: :player_id: ID of the player to look up :vs_player_id: ID of the vs player to look up :team_id: ID of the team to look up :measure_type: Specifies type of measure to use (Base, Advanced, etc.) :per_mode: Mode to measure statistics (Totals, PerGame, Per36, etc.) :plus_minus: Whether or not to consider plus minus (Y or N) :pace_adjust: Whether or not to pace adjust stats (Y or N) :rank: Whether or not to consider rank (Y or N) :league_id: ID for the league to look in (Default is 00) :season: Season given to look up :season_type: Season type to consider (Regular / Playoffs) :po_round: Playoff round :outcome: Filter out by wins or losses :location: Filter out by home or away :month: Specify month to filter by :season_segment: Filter by pre/post all star break :date_from: Filter out games before a specific date :date_to: Filter out games after a specific date :opponent_team_id: Opponent team ID to look up :vs_conference: Filter by conference :vs_division: Filter by division :game_segment: Filter by half / overtime :period: Filter by quarter / specific overtime :shot_clock_range: Filter statistics by range in shot clock :last_n_games: Filter by number of games specified in N Attributes: json: Contains the full json dump to play around with """ _endpoint = 'playervsplayer' def __init__(self, player_id, vs_player_id, team_id=0, measure_type=constants.MeasureType.Default, per_mode=constants.PerMode.Default, plus_minus=constants.PlusMinus.Default, pace_adjust=constants.PaceAdjust.Default, rank=constants.PaceAdjust.Default, league_id=constants.League.Default, season=constants.CURRENT_SEASON, season_type=constants.SeasonType.Default, po_round=constants.PlayoffRound.Default, outcome=constants.Outcome.Default, location=constants.Location.Default, month=constants.Month.Default, season_segment=constants.SeasonSegment.Default, date_from=constants.DateFrom.Default, date_to=constants.DateTo.Default, opponent_team_id=constants.OpponentTeamID.Default, vs_conference=constants.VsConference.Default, vs_division=constants.VsDivision.Default, game_segment=constants.GameSegment.Default, period=constants.Period.Default, shot_clock_range=constants.ShotClockRange.Default, last_n_games=constants.LastNGames.Default): self.json = _get_json(endpoint=self._endpoint, params={'PlayerID': player_id, 'VsPlayerID': vs_player_id, 'TeamID': team_id, 'MeasureType': measure_type, 'PerMode': per_mode, 'PlusMinus': plus_minus, 'PaceAdjust': pace_adjust, 'Rank': rank, 'LeagueID': league_id, 'Season': season, 'SeasonType': season_type, 'PORound': po_round, 'Outcome': outcome, 'Location': location, 'Month': month, 'SeasonSegment': season_segment, 'DateFrom': date_from, 'DateTo': date_to, 'OpponentTeamID': opponent_team_id, 'VsConference': vs_conference, 'VsDivision': vs_division, 'GameSegment': game_segment, 'Period': period, 'ShotClockRange': shot_clock_range, 'LastNGames': last_n_games}) def overall(self): return _api_scrape(self.json, 0) def on_off_court(self): return _api_scrape(self.json, 1) def shot_distance_overall(self): return _api_scrape(self.json, 2) def shot_distance_on_court(self): return _api_scrape(self.json, 3) def shot_distance_off_court(self): return _api_scrape(self.json, 4) def shot_area_overall(self): return _api_scrape(self.json, 5) def shot_area_on_court(self): return _api_scrape(self.json, 6) def shot_area_off_court(self): return _api_scrape(self.json, 7) def player_info(self): return _api_scrape(self.json, 8) def vs_player_info(self): return _api_scrape(self.json, 9)
39.324624
79
0.600339
7,220
60,206
4.849723
0.055956
0.031529
0.042839
0.054262
0.861117
0.854462
0.848494
0.840897
0.783007
0.762587
0
0.006693
0.332475
60,206
1,530
80
39.350327
0.864565
0.491546
0
0.683673
0
0
0.067367
0.016326
0
0
0
0
0
1
0.195578
false
0.008503
0.003401
0.154762
0.472789
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
0
0
1
0
0
0
7
bc999b4268a703047ea1f2896f986e6c159faf8b
4,897
py
Python
models/conv_attention.py
adamgeva/Action_Recognition_ConvLSTM
f759253d85838986f7f09a3e11a44fd61f33c915
[ "Apache-2.0" ]
1
2020-01-08T19:48:13.000Z
2020-01-08T19:48:13.000Z
models/conv_attention.py
adamgeva/Action_Recognition_ConvLSTM
f759253d85838986f7f09a3e11a44fd61f33c915
[ "Apache-2.0" ]
null
null
null
models/conv_attention.py
adamgeva/Action_Recognition_ConvLSTM
f759253d85838986f7f09a3e11a44fd61f33c915
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf def conv_attention_sum(inputs, attention_kernel, time_major=False): if isinstance(inputs, tuple): # In case of Bi-RNN, concatenate the forward and the backward RNN outputs. inputs = tf.concat(inputs, 2) if time_major: # (T,B,H,W,C) => (B,T,H,W,C) inputs = tf.array_ops.transpose(inputs, [1, 0, 2, 3, 4]) inputs_shape = inputs.shape #[B,T,H,W,C] feature_lengths = inputs_shape[1].value #[T] feature_windows = [inputs_shape[2].value,inputs_shape[3].value] #[H,W] feature_channels = inputs_shape[4].value #[C] w_size = attention_kernel + [feature_channels,feature_channels] #W = tf.get_variable('kernel', attention_kernel + [feature_channels,feature_channels]) #[1,1,C,C] W = tf.Variable(tf.random_normal(w_size, stddev=0.1)) b = tf.Variable(tf.random_normal([feature_channels], stddev=0.1)) #[C] u = tf.Variable(tf.random_normal([feature_channels], stddev=0.1)) #[C] inputs_conv = tf.reshape(inputs, [-1, inputs_shape[2].value,inputs_shape[3].value,feature_channels]) #[B*T,H,W,C] y = tf.nn.conv2d(inputs_conv, W, strides=[1, 1, 1, 1], padding='SAME') #[B*T,H,W,C] v = tf.nn.relu(y + b) #[B*T,H,W,C] vu = tf.matmul(tf.reshape(v,[-1,feature_channels]), tf.reshape(u, [-1, 1])) #[B*T*H*W,C]*[C,1] = [B*T*H*W,1] exps = tf.reshape(tf.exp(vu), [-1, feature_lengths]) #[B*W*H,T] alphas = exps / tf.reshape(tf.reduce_sum(exps, 1), [-1, 1]) #[B*W*H,T] alphas_r = tf.reshape(alphas, [-1, feature_lengths, inputs_shape[2].value, inputs_shape[3].value, 1]) temp = tf.reshape(alphas, [-1, feature_lengths, inputs_shape[2].value, inputs_shape[3].value, 1]) #temp = inputs * tf.reshape(alphas, [-1, feature_lengths, inputs_shape[2].value, inputs_shape[3].value, 1]) #temp2 = tf.matmul(tf.reshape(temp,[-1,feature_channels]), tf.reshape(u, [-1, 1])) #temp3 = tf.reshape(temp2, [-1, feature_lengths, inputs_shape[2].value, inputs_shape[3].value, 1]) output = tf.reduce_sum(inputs * tf.reshape(alphas, [-1, feature_lengths, inputs_shape[2].value, inputs_shape[3].value, 1]), 1) #[B,T,H,W,C]*[B,T,H,W,1] ===> [B,H,W,C] return output, alphas_r, v, temp #[B*H*W*C] ############################################################# remove the time_dims def conv_attention(inputs, attention_kernel, time_major=False): if isinstance(inputs, tuple): # In case of Bi-RNN, concatenate the forward and the backward RNN outputs. inputs = tf.concat(inputs, 2) if time_major: # (T,B,H,W,C) => (B,T,H,W,C) inputs = tf.array_ops.transpose(inputs, [1, 0, 2, 3, 4]) inputs_shape = inputs.shape #[B,T,H,W,C] feature_lengths = inputs_shape[1].value #[T] feature_windows = [inputs_shape[2].value,inputs_shape[3].value] #[H,W] feature_channels = inputs_shape[4].value #[C] w_size = attention_kernel + [feature_channels,feature_channels] W = tf.Variable(tf.random_normal(w_size, stddev=0.1)) b = tf.Variable(tf.random_normal([feature_channels], stddev=0.1)) #[C] u = tf.Variable(tf.random_normal([feature_channels], stddev=0.1)) #[C] inputs_conv = tf.reshape(inputs, [-1, inputs_shape[2].value,inputs_shape[3].value,feature_channels]) #[B*T,H,W,C] y = tf.nn.conv2d(inputs_conv, W, strides=[1, 1, 1, 1], padding='SAME') #[B*T,H,W,C] v = tf.nn.relu(y + b) #[B*T,H,W,C] vu = tf.matmul(tf.reshape(v,[-1,feature_channels]), tf.reshape(u, [-1, 1])) #[B*T*H*W,C]*[C,1] = [B*T*H*W,1] exps = tf.reshape(tf.exp(vu), [-1, feature_lengths]) #[B*W*H,T] alphas = exps / tf.reshape(tf.reduce_sum(exps, 1), [-1, 1]) #[B*W*H,T] # Output of Bi-RNN is reduced with attention vector output =inputs * tf.reshape(alphas, [-1, feature_lengths, inputs_shape[2].value, inputs_shape[3].value, 1]) #[B,T,H,W,C]*[B,T,H,W,1] ===> [B,H,W,C] return output #[B*H*W*C]
55.022472
218
0.502961
671
4,897
3.536513
0.120715
0.129794
0.025284
0.030341
0.906026
0.903498
0.884534
0.884534
0.872735
0.872735
0
0.030811
0.330611
4,897
88
219
55.647727
0.693106
0.272003
0
0.8
0
0
0.002309
0
0
0
0
0
0
1
0.044444
false
0
0.022222
0
0.111111
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
bce1a0102563713a96fb4ec12da43038bf2a25d4
156
py
Python
xitorch/integrate/__init__.py
mfkasim91/lintorch
7a7da4b960e83c07e45ddb999da99510d3c9e909
[ "MIT" ]
4
2020-10-15T15:07:54.000Z
2022-01-29T23:01:10.000Z
xitorch/integrate/__init__.py
mfkasim91/lintorch
7a7da4b960e83c07e45ddb999da99510d3c9e909
[ "MIT" ]
7
2020-09-16T11:44:34.000Z
2020-09-24T13:17:19.000Z
xitorch/integrate/__init__.py
mfkasim91/lintorch
7a7da4b960e83c07e45ddb999da99510d3c9e909
[ "MIT" ]
2
2020-09-17T09:41:33.000Z
2020-09-17T10:00:40.000Z
from xitorch.integrate.quad import * from xitorch.integrate.solve_ivp import * from xitorch.integrate.mcquad import * from xitorch.integrate.squad import *
31.2
41
0.820513
21
156
6.047619
0.428571
0.346457
0.629921
0.614173
0
0
0
0
0
0
0
0
0.102564
156
4
42
39
0.907143
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
bcfc7333518c6cb269fd6a7b90f5e8f591f7a160
81,482
py
Python
aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py
vitalrev/aries-cloudagent-python
7da54521eddd731a58281ae4647945a6ffba92a9
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py
vitalrev/aries-cloudagent-python
7da54521eddd731a58281ae4647945a6ffba92a9
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/protocols/didexchange/v1_0/tests/test_manager.py
vitalrev/aries-cloudagent-python
7da54521eddd731a58281ae4647945a6ffba92a9
[ "Apache-2.0" ]
null
null
null
import json from asynctest import mock as async_mock, TestCase as AsyncTestCase from .....cache.base import BaseCache from .....cache.in_memory import InMemoryCache from .....connections.models.conn_record import ConnRecord from .....connections.models.connection_target import ConnectionTarget from .....connections.models.diddoc import ( DIDDoc, PublicKey, PublicKeyType, Service, ) from .....core.in_memory import InMemoryProfile from .....ledger.base import BaseLedger from .....ledger.error import LedgerError from .....messaging.responder import BaseResponder, MockResponder from .....messaging.decorators.attach_decorator import AttachDecorator from .....multitenant.manager import MultitenantManager from .....storage.error import StorageNotFoundError from .....transport.inbound.receipt import MessageReceipt from .....multitenant.manager import MultitenantManager from .....wallet.base import DIDInfo from .....wallet.in_memory import InMemoryWallet from .....wallet.util import naked_to_did_key from .....connections.base_manager import ( BaseConnectionManager, BaseConnectionManagerError, ) from ....connections.v1_0.messages.connection_invitation import ConnectionInvitation from ....coordinate_mediation.v1_0.manager import MediationManager from ....coordinate_mediation.v1_0.messages.keylist_update import ( KeylistUpdate, KeylistUpdateRule, ) from ....coordinate_mediation.v1_0.models.mediation_record import ( MediationRecord, ) from ....didcomm_prefix import DIDCommPrefix from ....out_of_band.v1_0.manager import OutOfBandManager from ....out_of_band.v1_0.messages.invitation import HSProto, InvitationMessage from ....out_of_band.v1_0.messages.service import Service as OOBService from .. import manager as test_module from ..manager import DIDXManager, DIDXManagerError class TestConfig: test_seed = "testseed000000000000000000000001" test_did = "55GkHamhTU1ZbTbV2ab9DE" test_verkey = "3Dn1SJNPaCXcvvJvSbsFWP2xaCjMom3can8CQNhWrTRx" test_endpoint = "http://localhost" test_target_did = "GbuDUYXaUZRfHD2jeDuQuP" test_target_verkey = "9WCgWKUaAJj3VWxxtzvvMQN3AoFxoBtBDo9ntwJnVVCC" def make_did_doc(self, did, verkey): doc = DIDDoc(did=did) controller = did ident = "1" pk_value = verkey pk = PublicKey( did, ident, pk_value, PublicKeyType.ED25519_SIG_2018, controller, False ) doc.set(pk) recip_keys = [pk] router_keys = [] service = Service( did, "indy", "IndyAgent", recip_keys, router_keys, TestConfig.test_endpoint ) doc.set(service) return doc class TestDidExchangeManager(AsyncTestCase, TestConfig): async def setUp(self): self.responder = MockResponder() self.session = InMemoryProfile.test_session( { "default_endpoint": "http://aries.ca/endpoint", "default_label": "This guy", "additional_endpoints": ["http://aries.ca/another-endpoint"], "debug.auto_accept_invites": True, "debug.auto_accept_requests": True, "multitenant.enabled": True, "wallet.id": True, }, bind={BaseResponder: self.responder, BaseCache: InMemoryCache()}, ) self.context = self.session.context self.did_info = await self.session.wallet.create_local_did() self.ledger = async_mock.create_autospec(BaseLedger) self.ledger.__aenter__ = async_mock.CoroutineMock(return_value=self.ledger) self.ledger.get_endpoint_for_did = async_mock.CoroutineMock( return_value=TestConfig.test_endpoint ) self.session.context.injector.bind_instance(BaseLedger, self.ledger) self.multitenant_mgr = async_mock.MagicMock(MultitenantManager, autospec=True) self.session.context.injector.bind_instance( MultitenantManager, self.multitenant_mgr ) self.manager = DIDXManager(self.session) assert self.manager.session self.oob_manager = OutOfBandManager(self.session) self.test_mediator_routing_keys = [ naked_to_did_key("3Dn1SJNPaCXcvvJvSbsFWP2xaCjMom3can8CQNhWrTRR") ] self.test_mediator_conn_id = "mediator-conn-id" self.test_mediator_endpoint = "http://mediator.example.com" async def test_verify_diddoc(self): did_doc = self.make_did_doc( TestConfig.test_target_did, TestConfig.test_target_verkey, ) did_doc_attach = AttachDecorator.from_indy_dict(did_doc.serialize()) with self.assertRaises(DIDXManagerError): await self.manager.verify_diddoc(self.session.wallet, did_doc_attach) await did_doc_attach.data.sign(self.did_info.verkey, self.session.wallet) await self.manager.verify_diddoc(self.session.wallet, did_doc_attach) did_doc_attach.data.base64_ = "YmFpdCBhbmQgc3dpdGNo" with self.assertRaises(DIDXManagerError): await self.manager.verify_diddoc(self.session.wallet, did_doc_attach) async def test_receive_invitation(self): self.session.context.update_settings({"public_invites": True}) mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) with async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( self.multitenant_mgr, "get_default_mediator" ) as mock_get_default_mediator: mock_get_default_mediator.return_value = mediation_record invi_rec = await self.oob_manager.create_invitation( my_endpoint="testendpoint", hs_protos=[HSProto.RFC23], ) invi_msg = InvitationMessage.deserialize(invi_rec.invitation) mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) invitee_record = await self.manager.receive_invitation(invi_msg) assert invitee_record.state == ConnRecord.State.REQUEST.rfc23 async def test_receive_invitation_no_auto_accept(self): mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) with async_mock.patch.object( self.multitenant_mgr, "get_default_mediator" ) as mock_get_default_mediator: mock_get_default_mediator.return_value = mediation_record invi_rec = await self.oob_manager.create_invitation( my_endpoint="testendpoint", hs_protos=[HSProto.RFC23], ) invitee_record = await self.manager.receive_invitation( InvitationMessage.deserialize(invi_rec.invitation), auto_accept=False ) assert invitee_record.state == ConnRecord.State.INVITATION.rfc23 async def test_receive_invitation_bad_invitation(self): x_invites = [ InvitationMessage(), InvitationMessage(service=[OOBService()]), InvitationMessage( service=[ OOBService( recipient_keys=["3Dn1SJNPaCXcvvJvSbsFWP2xaCjMom3can8CQNhWrTRx"] ) ] ), ] for x_invite in x_invites: with self.assertRaises(DIDXManagerError): await self.manager.receive_invitation(x_invite) async def test_create_request_implicit(self): mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) with async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc, async_mock.patch.object( self.multitenant_mgr, "get_default_mediator" ) as mock_get_default_mediator: mock_get_default_mediator.return_value = mediation_record mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock(return_value={}) ) didx_req = await self.manager.create_request_implicit( their_public_did=TestConfig.test_target_did, my_label=None, my_endpoint=None, mediation_id=mediation_record._id, ) assert didx_req._id async def test_create_request(self): mock_conn_rec = async_mock.MagicMock( connection_id="dummy", my_did=self.did_info.did, their_did=TestConfig.test_target_did, their_role=ConnRecord.Role.RESPONDER.rfc23, state=ConnRecord.State.REQUEST.rfc23, retrieve_invitation=async_mock.CoroutineMock( return_value=async_mock.MagicMock( service_blocks=None, service_dids=[TestConfig.test_target_did], ) ), save=async_mock.CoroutineMock(), ) with async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc: mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock(return_value={}) ) didx_req = await self.manager.create_request(mock_conn_rec) assert didx_req async def test_create_request_multitenant(self): self.context.update_settings( {"multitenant.enabled": True, "wallet.id": "test_wallet"} ) with async_mock.patch.object( InMemoryWallet, "create_local_did", autospec=True ) as mock_wallet_create_local_did, async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc, async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco: mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock(return_value={}) ) mock_wallet_create_local_did.return_value = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None ) mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) await self.manager.create_request( async_mock.MagicMock( invitation_key=TestConfig.test_verkey, their_label="Hello", their_role=ConnRecord.Role.RESPONDER.rfc160, alias="Bob", my_did=None, retrieve_invitation=async_mock.CoroutineMock( return_value=async_mock.MagicMock( service_blocks=None, service_dids=[TestConfig.test_target_did], ) ), save=async_mock.CoroutineMock(), ) ) self.multitenant_mgr.add_key.assert_called_once_with( "test_wallet", TestConfig.test_verkey ) async def test_create_request_mediation_id(self): mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) invi = InvitationMessage( comment="test", handshake_protocols=[ pfx.qualify(HSProto.RFC23.name) for pfx in DIDCommPrefix ], service_dids=[TestConfig.test_did], ) record = ConnRecord( invitation_key=TestConfig.test_verkey, invitation_msg_id=invi._id, their_label="Hello", their_role=ConnRecord.Role.RESPONDER.rfc160, alias="Bob", my_did=None, ) await record.save(self.session) await record.attach_invitation(self.session, invi) with async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc: mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock(return_value={}) ) didx_req = await self.manager.create_request( record, my_endpoint="http://testendpoint.com/endpoint", mediation_id=mediation_record._id, ) assert didx_req assert len(self.responder.messages) == 1 message, used_kwargs = self.responder.messages[0] assert isinstance(message, KeylistUpdate) assert ( "connection_id" in used_kwargs and used_kwargs["connection_id"] == self.test_mediator_conn_id ) async def test_create_request_my_endpoint(self): mock_conn_rec = async_mock.MagicMock( connection_id="dummy", my_did=None, their_did=TestConfig.test_target_did, their_role=ConnRecord.Role.RESPONDER.rfc23, their_label="Bob", invitation_key=TestConfig.test_verkey, state=ConnRecord.State.REQUEST.rfc23, alias="Bob", retrieve_invitation=async_mock.CoroutineMock( return_value=async_mock.MagicMock( service_blocks=None, service_dids=[TestConfig.test_target_did], ) ), save=async_mock.CoroutineMock(), ) with async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc: mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock(return_value={}) ) didx_req = await self.manager.create_request( mock_conn_rec, my_endpoint="http://testendpoint.com/endpoint", ) assert didx_req async def test_receive_request_explicit_public_did(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) STATE_REQUEST = ConnRecord.State.REQUEST self.session.context.update_settings({"public_invites": True}) ACCEPT_AUTO = ConnRecord.ACCEPT_AUTO with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls, async_mock.patch.object( test_module, "DIDDoc", autospec=True ) as mock_did_doc, async_mock.patch.object( test_module, "DIDPosture", autospec=True ) as mock_did_posture, async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( test_module, "DIDXResponse", autospec=True ) as mock_response, async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc, async_mock.patch.object( MediationManager, "prepare_request", autospec=True ) as mock_mediation_mgr_prep_req: mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock(return_value={}) ) mock_mediation_mgr_prep_req.return_value = (mediation_record, mock_request) mock_conn_record = async_mock.MagicMock( accept=ACCEPT_AUTO, my_did=None, state=STATE_REQUEST.rfc23, attach_request=async_mock.CoroutineMock(), retrieve_request=async_mock.CoroutineMock(), metadata_get_all=async_mock.CoroutineMock(return_value={}), metadata_get=async_mock.CoroutineMock(return_value=True), save=async_mock.CoroutineMock(), ) mock_conn_rec_cls.ACCEPT_AUTO = ConnRecord.ACCEPT_AUTO mock_conn_rec_cls.State.REQUEST = STATE_REQUEST mock_conn_rec_cls.State.get = async_mock.MagicMock( return_value=STATE_REQUEST ) mock_conn_rec_cls.retrieve_by_id = async_mock.CoroutineMock( return_value=async_mock.MagicMock(save=async_mock.CoroutineMock()) ) mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( return_value=mock_conn_record ) mock_conn_rec_cls.return_value = mock_conn_record mock_did_posture.get = async_mock.MagicMock( return_value=test_module.DIDPosture.PUBLIC ) mock_did_doc.from_json = async_mock.MagicMock( return_value=async_mock.MagicMock(did=TestConfig.test_did) ) mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) mock_response.return_value = async_mock.MagicMock( assign_thread_from=async_mock.MagicMock(), assign_trace_from=async_mock.MagicMock(), ) conn_rec = await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=None, alias=None, auto_accept_implicit=None, mediation_id=None, ) assert conn_rec messages = self.responder.messages assert len(messages) == 2 (result, target) = messages[0] assert "connection_id" in target async def test_receive_request_invi_not_found(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=None, _thread=async_mock.MagicMock(pthid="explicit-not-a-did"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls: mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( side_effect=StorageNotFoundError() ) with self.assertRaises(DIDXManagerError) as context: await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=TestConfig.test_verkey, my_endpoint=None, alias=None, auto_accept_implicit=None, mediation_id=None, ) assert "No explicit invitation found" in str(context.exception) async def test_receive_request_with_mediator_without_multi_use_multitenant(self): multiuse_info = await self.session.wallet.create_local_did() did_doc_dict = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey, ).serialize() del did_doc_dict["authentication"] del did_doc_dict["service"] new_info = await self.session.wallet.create_local_did() mock_request = async_mock.MagicMock() mock_request.connection = async_mock.MagicMock( is_multiuse_invitation=False, invitation_key=multiuse_info.verkey ) mock_request.connection.did = TestConfig.test_did mock_request.connection.did_doc = async_mock.MagicMock() mock_request.connection.did_doc.did = TestConfig.test_did mock_request.did = self.test_target_did mock_request.did_doc_attach = async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value=json.dumps(did_doc_dict)) ), ) ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) record = ConnRecord( invitation_key=TestConfig.test_verkey, their_label="Hello", their_role=ConnRecord.Role.RESPONDER.rfc160, alias="Bob", ) record.accept = ConnRecord.ACCEPT_MANUAL await record.save(self.session) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "attach_request", autospec=True ) as mock_conn_attach_request, async_mock.patch.object( ConnRecord, "retrieve_by_invitation_key" ) as mock_conn_retrieve_by_invitation_key, async_mock.patch.object( ConnRecord, "retrieve_request", autospec=True ): mock_conn_retrieve_by_invitation_key.return_value = record conn_rec = await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=TestConfig.test_verkey, my_endpoint=None, alias=None, auto_accept_implicit=None, mediation_id=mediation_record.mediation_id, ) assert len(self.responder.messages) == 1 message, target = self.responder.messages[0] assert isinstance(message, KeylistUpdate) assert len(message.updates) == 1 (remove,) = message.updates assert remove.action == KeylistUpdateRule.RULE_REMOVE assert remove.recipient_key == record.invitation_key async def test_receive_request_with_mediator_without_multi_use_multitenant_mismatch( self, ): multiuse_info = await self.session.wallet.create_local_did() did_doc_dict = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey, ).serialize() del did_doc_dict["authentication"] del did_doc_dict["service"] new_info = await self.session.wallet.create_local_did() mock_request = async_mock.MagicMock() mock_request.connection = async_mock.MagicMock( is_multiuse_invitation=False, invitation_key=multiuse_info.verkey ) mock_request.connection.did = TestConfig.test_did mock_request.connection.did_doc = async_mock.MagicMock() mock_request.connection.did_doc.did = TestConfig.test_did mock_request.did_doc_attach = async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value=json.dumps(did_doc_dict)) ), ) ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) record = ConnRecord( invitation_key=TestConfig.test_verkey, their_label="Hello", their_role=ConnRecord.Role.RESPONDER.rfc160, alias="Bob", ) record.accept = ConnRecord.ACCEPT_MANUAL await record.save(self.session) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "attach_request", autospec=True ) as mock_conn_attach_request, async_mock.patch.object( ConnRecord, "retrieve_by_invitation_key" ) as mock_conn_retrieve_by_invitation_key, async_mock.patch.object( ConnRecord, "retrieve_request", autospec=True ): mock_conn_retrieve_by_invitation_key.return_value = record with self.assertRaises(DIDXManagerError) as context: conn_rec = await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=TestConfig.test_verkey, my_endpoint=None, alias=None, auto_accept_implicit=None, mediation_id=mediation_record.mediation_id, ) assert "does not match" in str(context.exception) async def test_receive_request_public_did_no_did_doc_attachment(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=None, _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) self.session.context.update_settings({"public_invites": True}) mock_conn_rec_state_request = ConnRecord.State.REQUEST with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls, async_mock.patch.object( test_module, "DIDPosture", autospec=True ) as mock_did_posture: mock_conn_record = async_mock.MagicMock( accept=ConnRecord.ACCEPT_MANUAL, my_did=None, state=mock_conn_rec_state_request.rfc23, attach_request=async_mock.CoroutineMock(), retrieve_request=async_mock.CoroutineMock(), metadata_get_all=async_mock.CoroutineMock(return_value={}), save=async_mock.CoroutineMock(), ) mock_conn_rec_cls.return_value = mock_conn_record mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( return_value=mock_conn_record ) mock_did_posture.get = async_mock.MagicMock( return_value=test_module.DIDPosture.PUBLIC ) with self.assertRaises(DIDXManagerError) as context: await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=None, mediation_id=None, ) assert "DID Doc attachment missing or has no data" in str(context.exception) async def test_receive_request_public_did_x_not_public(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) self.session.context.update_settings({"public_invites": True}) mock_conn_rec_state_request = ConnRecord.State.REQUEST with async_mock.patch.object( test_module, "DIDPosture", autospec=True ) as mock_did_posture: mock_did_posture.get = async_mock.MagicMock( return_value=test_module.DIDPosture.WALLET_ONLY ) with self.assertRaises(DIDXManagerError) as context: await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) assert "is not public" in str(context.exception) async def test_receive_request_public_did_x_wrong_did(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) self.session.context.update_settings({"public_invites": True}) mock_conn_rec_state_request = ConnRecord.State.REQUEST with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls, async_mock.patch.object( test_module, "DIDPosture", autospec=True ) as mock_did_posture, async_mock.patch.object( test_module.DIDDoc, "from_json", async_mock.MagicMock() ) as mock_did_doc_from_json: mock_conn_record = async_mock.MagicMock( accept=ConnRecord.ACCEPT_MANUAL, my_did=None, state=mock_conn_rec_state_request.rfc23, attach_request=async_mock.CoroutineMock(), retrieve_request=async_mock.CoroutineMock(), metadata_get_all=async_mock.CoroutineMock(return_value={}), save=async_mock.CoroutineMock(), ) mock_conn_rec_cls.return_value = mock_conn_record mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( return_value=mock_conn_record ) mock_did_doc_from_json.return_value = async_mock.MagicMock(did="wrong-did") mock_did_posture.get = async_mock.MagicMock( return_value=test_module.DIDPosture.PUBLIC ) with self.assertRaises(DIDXManagerError) as context: await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) assert "does not match" in str(context.exception) async def test_receive_request_public_did_x_did_doc_attach_bad_sig(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=False) ) ), _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) self.session.context.update_settings({"public_invites": True}) mock_conn_rec_state_request = ConnRecord.State.REQUEST with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls, async_mock.patch.object( test_module, "DIDPosture", autospec=True ) as mock_did_posture: mock_conn_record = async_mock.MagicMock( accept=ConnRecord.ACCEPT_MANUAL, my_did=None, state=mock_conn_rec_state_request.rfc23, attach_request=async_mock.CoroutineMock(), retrieve_request=async_mock.CoroutineMock(), metadata_get_all=async_mock.CoroutineMock(return_value={}), save=async_mock.CoroutineMock(), ) mock_conn_rec_cls.return_value = mock_conn_record mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( return_value=mock_conn_record ) mock_did_posture.get = async_mock.MagicMock( return_value=test_module.DIDPosture.PUBLIC ) with self.assertRaises(DIDXManagerError) as context: await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) assert "DID Doc signature failed" in str(context.exception) async def test_receive_request_public_did_no_public_invites(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) self.session.context.update_settings({"public_invites": False}) with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls, async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( test_module, "DIDXResponse", autospec=True ) as mock_response, async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc, async_mock.patch.object( test_module.DIDDoc, "from_json", async_mock.MagicMock() ) as mock_did_doc_from_json: mock_did_doc_from_json.return_value = async_mock.MagicMock( did=TestConfig.test_did ) with self.assertRaises(DIDXManagerError) as context: await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) assert "Public invitations are not enabled" in str(context.exception) async def test_receive_request_public_did_no_auto_accept(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) self.session.context.update_settings( {"public_invites": True, "debug.auto_accept_requests": False} ) mock_conn_rec_state_request = ConnRecord.State.REQUEST with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls, async_mock.patch.object( test_module, "DIDDoc", autospec=True ) as mock_did_doc, async_mock.patch.object( test_module, "DIDPosture", autospec=True ) as mock_did_posture, async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( test_module, "DIDXResponse", autospec=True ) as mock_response, async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc: mock_conn_record = async_mock.MagicMock( accept=ConnRecord.ACCEPT_MANUAL, my_did=None, state=mock_conn_rec_state_request.rfc23, attach_request=async_mock.CoroutineMock(), retrieve_request=async_mock.CoroutineMock(), metadata_get_all=async_mock.CoroutineMock(return_value={}), save=async_mock.CoroutineMock(), ) mock_conn_rec_cls.return_value = mock_conn_record mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( return_value=mock_conn_record ) mock_did_posture.get = async_mock.MagicMock( return_value=test_module.DIDPosture.PUBLIC ) mock_did_doc.from_json = async_mock.MagicMock( return_value=async_mock.MagicMock(did=TestConfig.test_did) ) conn_rec = await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) assert conn_rec messages = self.responder.messages assert not messages async def test_receive_request_peer_did(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="dummy-pthid"), ) mock_conn = async_mock.MagicMock( my_did=TestConfig.test_did, their_did=TestConfig.test_target_did, invitation_key=TestConfig.test_verkey, connection_id="dummy", is_multiuse_invitation=True, state=ConnRecord.State.INVITATION.rfc23, their_role=ConnRecord.Role.REQUESTER.rfc23, save=async_mock.CoroutineMock(), attach_request=async_mock.CoroutineMock(), accept=ConnRecord.ACCEPT_MANUAL, metadata_get_all=async_mock.CoroutineMock(return_value={"test": "value"}), ) mock_conn_rec_state_request = ConnRecord.State.REQUEST await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) self.session.context.update_settings({"public_invites": True}) with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls, async_mock.patch.object( test_module, "DIDDoc", autospec=True ) as mock_did_doc, async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( test_module, "DIDXResponse", autospec=True ) as mock_response: mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( return_value=mock_conn ) mock_conn_rec_cls.return_value = async_mock.MagicMock( accept=ConnRecord.ACCEPT_AUTO, my_did=None, state=mock_conn_rec_state_request.rfc23, attach_request=async_mock.CoroutineMock(), retrieve_request=async_mock.CoroutineMock(), save=async_mock.CoroutineMock(), metadata_set=async_mock.CoroutineMock(), ) mock_did_doc.from_json = async_mock.MagicMock( return_value=async_mock.MagicMock(did=TestConfig.test_did) ) mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) mock_response.return_value = async_mock.MagicMock( assign_thread_from=async_mock.MagicMock(), assign_trace_from=async_mock.MagicMock(), ) conn_rec = await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=TestConfig.test_verkey, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) assert conn_rec mock_conn_rec_cls.return_value.metadata_set.assert_called() assert not self.responder.messages async def test_receive_request_multiuse_multitenant(self): multiuse_info = await self.session.wallet.create_local_did() new_info = await self.session.wallet.create_local_did() mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="dummy-pthid"), ) self.context.update_settings( {"wallet.id": "test_wallet", "multitenant.enabled": True} ) ACCEPT_MANUAL = ConnRecord.ACCEPT_MANUAL with async_mock.patch.object( test_module, "ConnRecord", autospec=True ) as mock_conn_rec_cls, async_mock.patch.object( InMemoryWallet, "create_local_did", autospec=True ) as mock_wallet_create_local_did, async_mock.patch.object( test_module, "DIDDoc", autospec=True ) as mock_did_doc: mock_conn_rec = async_mock.CoroutineMock( connection_id="dummy", accept=ACCEPT_MANUAL, is_multiuse_invitation=True, attach_request=async_mock.CoroutineMock(), save=async_mock.CoroutineMock(), retrieve_invitation=async_mock.CoroutineMock(return_value={}), metadata_get_all=async_mock.CoroutineMock(return_value={}), retrieve_request=async_mock.CoroutineMock(), ) mock_conn_rec_cls.return_value = mock_conn_rec mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( return_value=mock_conn_rec ) mock_wallet_create_local_did.return_value = DIDInfo( new_info.did, new_info.verkey, None ) mock_did_doc.from_json = async_mock.MagicMock( return_value=async_mock.MagicMock(did=TestConfig.test_did) ) await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=TestConfig.test_verkey, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) self.multitenant_mgr.add_key.assert_called_once_with( "test_wallet", new_info.verkey ) async def test_receive_request_implicit_multitenant(self): new_info = await self.session.wallet.create_local_did() mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="did:sov:publicdid0000000000000"), ) self.context.update_settings( { "wallet.id": "test_wallet", "multitenant.enabled": True, "public_invites": True, "debug.auto_accept_requests": False, } ) ACCEPT_MANUAL = ConnRecord.ACCEPT_MANUAL with async_mock.patch.object( test_module, "ConnRecord", autospec=True ) as mock_conn_rec_cls, async_mock.patch.object( InMemoryWallet, "create_local_did", autospec=True ) as mock_wallet_create_local_did, async_mock.patch.object( InMemoryWallet, "get_local_did", autospec=True ) as mock_wallet_get_local_did, async_mock.patch.object( test_module, "DIDPosture", autospec=True ) as mock_did_posture, async_mock.patch.object( test_module, "DIDDoc", autospec=True ) as mock_did_doc: mock_conn_rec = async_mock.CoroutineMock( connection_id="dummy", accept=ACCEPT_MANUAL, is_multiuse_invitation=False, attach_request=async_mock.CoroutineMock(), save=async_mock.CoroutineMock(), retrieve_invitation=async_mock.CoroutineMock(return_value={}), metadata_get_all=async_mock.CoroutineMock(return_value={}), retrieve_request=async_mock.CoroutineMock(), ) mock_conn_rec_cls.return_value = mock_conn_rec mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( side_effect=StorageNotFoundError() ) mock_did_posture.get = async_mock.MagicMock( return_value=test_module.DIDPosture.PUBLIC ) mock_wallet_create_local_did.return_value = DIDInfo( new_info.did, new_info.verkey, None ) mock_did_doc.from_json = async_mock.MagicMock( return_value=async_mock.MagicMock(did=TestConfig.test_did) ) mock_wallet_get_local_did.return_value = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None ) await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=None, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) self.multitenant_mgr.add_key.assert_called_once_with( "test_wallet", new_info.verkey ) async def test_receive_request_peer_did_not_found_x(self): mock_request = async_mock.MagicMock( did=TestConfig.test_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock(return_value="dummy-did-doc") ), ) ), _thread=async_mock.MagicMock(pthid="dummy-pthid"), ) await self.session.wallet.create_local_did(seed=None, did=TestConfig.test_did) with async_mock.patch.object( test_module, "ConnRecord", async_mock.MagicMock() ) as mock_conn_rec_cls: mock_conn_rec_cls.retrieve_by_invitation_key = async_mock.CoroutineMock( side_effect=StorageNotFoundError() ) with self.assertRaises(DIDXManagerError): await self.manager.receive_request( request=mock_request, recipient_did=TestConfig.test_did, recipient_verkey=TestConfig.test_verkey, my_endpoint=TestConfig.test_endpoint, alias="Alias", auto_accept_implicit=False, mediation_id=None, ) async def test_create_response(self): conn_rec = ConnRecord( connection_id="dummy", state=ConnRecord.State.REQUEST.rfc23 ) with async_mock.patch.object( test_module.ConnRecord, "retrieve_request", async_mock.CoroutineMock() ) as mock_retrieve_req, async_mock.patch.object( conn_rec, "save", async_mock.CoroutineMock() ) as mock_save, async_mock.patch.object( test_module, "DIDDoc", autospec=True ) as mock_did_doc, async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( test_module, "DIDXResponse", autospec=True ) as mock_response, async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc: mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock() ) mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) await self.manager.create_response(conn_rec, "http://10.20.30.40:5060/") async def test_create_response_mediation_id(self): mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) invi = InvitationMessage( comment="test", handshake_protocols=[ pfx.qualify(HSProto.RFC23.name) for pfx in DIDCommPrefix ], service_dids=[TestConfig.test_did], ) record = ConnRecord( invitation_key=TestConfig.test_verkey, invitation_msg_id=invi._id, their_label="Hello", their_role=ConnRecord.Role.RESPONDER.rfc160, alias="Bob", my_did=None, state=ConnRecord.State.REQUEST.rfc23, ) await record.save(self.session) await record.attach_invitation(self.session, invi) with async_mock.patch.object( ConnRecord, "log_state", autospec=True ) as mock_conn_log_state, async_mock.patch.object( ConnRecord, "retrieve_request", autospec=True ) as mock_conn_retrieve_request, async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_save, async_mock.patch.object( record, "metadata_get", async_mock.CoroutineMock(return_value=False) ), async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco: mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) await self.manager.create_response( record, mediation_id=mediation_record.mediation_id ) assert len(self.responder.messages) == 1 message, target = self.responder.messages[0] assert isinstance(message, KeylistUpdate) assert len(message.updates) == 1 (add,) = message.updates assert add.action == KeylistUpdateRule.RULE_ADD assert add.recipient_key async def test_create_response_mediation_id_invalid_conn_state(self): mediation_record = MediationRecord( role=MediationRecord.ROLE_CLIENT, state=MediationRecord.STATE_GRANTED, connection_id=self.test_mediator_conn_id, routing_keys=self.test_mediator_routing_keys, endpoint=self.test_mediator_endpoint, ) await mediation_record.save(self.session) invi = InvitationMessage( comment="test", handshake_protocols=[ pfx.qualify(HSProto.RFC23.name) for pfx in DIDCommPrefix ], service_dids=[TestConfig.test_did], ) record = ConnRecord( invitation_key=TestConfig.test_verkey, invitation_msg_id=invi._id, their_label="Hello", their_role=ConnRecord.Role.RESPONDER.rfc160, alias="Bob", my_did=None, ) await record.save(self.session) await record.attach_invitation(self.session, invi) with async_mock.patch.object( ConnRecord, "log_state", autospec=True ) as mock_conn_log_state, async_mock.patch.object( ConnRecord, "retrieve_request", autospec=True ) as mock_conn_retrieve_request, async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_save, async_mock.patch.object( record, "metadata_get", async_mock.CoroutineMock(return_value=False) ): with self.assertRaises(DIDXManagerError) as context: await self.manager.create_response( record, mediation_id=mediation_record.mediation_id ) assert "Connection not in state" in str(context.exception) async def test_create_response_multitenant(self): conn_rec = ConnRecord( connection_id="dummy", state=ConnRecord.State.REQUEST.rfc23 ) self.manager.session.context.update_settings( { "multitenant.enabled": True, "wallet.id": "test_wallet", } ) with async_mock.patch.object( test_module.ConnRecord, "retrieve_request" ), async_mock.patch.object( conn_rec, "save", async_mock.CoroutineMock() ), async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc, async_mock.patch.object( InMemoryWallet, "create_local_did", autospec=True ) as mock_wallet_create_local_did: mock_wallet_create_local_did.return_value = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None ) mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock() ) mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) await self.manager.create_response(conn_rec) self.multitenant_mgr.add_key.assert_called_once_with( "test_wallet", TestConfig.test_verkey ) async def test_create_response_conn_rec_my_did(self): conn_rec = ConnRecord( connection_id="dummy", my_did=TestConfig.test_did, state=ConnRecord.State.REQUEST.rfc23, ) with async_mock.patch.object( test_module.ConnRecord, "retrieve_request", async_mock.CoroutineMock() ) as mock_retrieve_req, async_mock.patch.object( conn_rec, "save", async_mock.CoroutineMock() ) as mock_save, async_mock.patch.object( test_module, "DIDDoc", autospec=True ) as mock_did_doc, async_mock.patch.object( test_module, "AttachDecorator", autospec=True ) as mock_attach_deco, async_mock.patch.object( test_module, "DIDXResponse", autospec=True ) as mock_response, async_mock.patch.object( self.manager, "create_did_document", async_mock.CoroutineMock() ) as mock_create_did_doc, async_mock.patch.object( InMemoryWallet, "get_local_did", async_mock.CoroutineMock() ) as mock_get_loc_did: mock_get_loc_did.return_value = self.did_info mock_create_did_doc.return_value = async_mock.MagicMock( serialize=async_mock.MagicMock() ) mock_attach_deco.from_indy_dict = async_mock.MagicMock( return_value=async_mock.MagicMock( data=async_mock.MagicMock(sign=async_mock.CoroutineMock()) ) ) await self.manager.create_response(conn_rec, "http://10.20.30.40:5060/") async def test_create_response_bad_state(self): with self.assertRaises(DIDXManagerError): await self.manager.create_response( ConnRecord( invitation_key=TestConfig.test_verkey, their_label="Hello", their_role=ConnRecord.Role.REQUESTER.rfc23, state=ConnRecord.State.ABANDONED.rfc23, alias="Bob", ) ) async def test_accept_response_find_by_thread_id(self): mock_response = async_mock.MagicMock() mock_response._thread = async_mock.MagicMock() mock_response.did = TestConfig.test_target_did mock_response.did_doc_attach = async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ) receipt = MessageReceipt( recipient_did=TestConfig.test_did, recipient_did_public=True, ) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id, async_mock.patch.object( ConnRecord, "retrieve_by_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_id, async_mock.patch.object( DIDDoc, "deserialize", async_mock.MagicMock() ) as mock_did_doc_deser: mock_did_doc_deser.return_value = async_mock.MagicMock( did=TestConfig.test_target_did ) mock_conn_retrieve_by_req_id.return_value = async_mock.MagicMock( did=TestConfig.test_target_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ), state=ConnRecord.State.REQUEST.rfc23, save=async_mock.CoroutineMock(), metadata_get=async_mock.CoroutineMock(), connection_id="test-conn-id", ) mock_conn_retrieve_by_id.return_value = async_mock.MagicMock( their_did=TestConfig.test_target_did, save=async_mock.CoroutineMock(), ) conn_rec = await self.manager.accept_response(mock_response, receipt) assert conn_rec.their_did == TestConfig.test_target_did assert ConnRecord.State.get(conn_rec.state) is ConnRecord.State.COMPLETED async def test_accept_response_not_found_by_thread_id_receipt_has_sender_did(self): mock_response = async_mock.MagicMock() mock_response._thread = async_mock.MagicMock() mock_response.did = TestConfig.test_target_did mock_response.did_doc_attach = async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ) receipt = MessageReceipt(sender_did=TestConfig.test_target_did) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id, async_mock.patch.object( ConnRecord, "retrieve_by_did", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_did, async_mock.patch.object( DIDDoc, "deserialize", async_mock.MagicMock() ) as mock_did_doc_deser: mock_did_doc_deser.return_value = async_mock.MagicMock( did=TestConfig.test_target_did ) mock_conn_retrieve_by_req_id.side_effect = StorageNotFoundError() mock_conn_retrieve_by_did.return_value = async_mock.MagicMock( did=TestConfig.test_target_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ), state=ConnRecord.State.REQUEST.rfc23, save=async_mock.CoroutineMock(), metadata_get=async_mock.CoroutineMock(return_value=False), connection_id="test-conn-id", ) conn_rec = await self.manager.accept_response(mock_response, receipt) assert conn_rec.their_did == TestConfig.test_target_did assert ConnRecord.State.get(conn_rec.state) is ConnRecord.State.COMPLETED async def test_accept_response_not_found_by_thread_id_nor_receipt_sender_did(self): mock_response = async_mock.MagicMock() mock_response._thread = async_mock.MagicMock() mock_response.did = TestConfig.test_target_did mock_response.did_doc_attach = async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ) receipt = MessageReceipt(sender_did=TestConfig.test_target_did) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id, async_mock.patch.object( ConnRecord, "retrieve_by_did", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_did: mock_conn_retrieve_by_req_id.side_effect = StorageNotFoundError() mock_conn_retrieve_by_did.side_effect = StorageNotFoundError() with self.assertRaises(DIDXManagerError): await self.manager.accept_response(mock_response, receipt) async def test_accept_response_find_by_thread_id_bad_state(self): mock_response = async_mock.MagicMock() mock_response._thread = async_mock.MagicMock() mock_response.did = TestConfig.test_target_did mock_response.did_doc_attach = async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ) receipt = MessageReceipt(sender_did=TestConfig.test_target_did) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id: mock_conn_retrieve_by_req_id.return_value = async_mock.MagicMock( state=ConnRecord.State.ABANDONED.rfc23 ) with self.assertRaises(DIDXManagerError): await self.manager.accept_response(mock_response, receipt) async def test_accept_response_find_by_thread_id_no_did_doc_attached(self): mock_response = async_mock.MagicMock() mock_response._thread = async_mock.MagicMock() mock_response.did = TestConfig.test_target_did mock_response.did_doc_attach = None receipt = MessageReceipt(sender_did=TestConfig.test_target_did) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id: mock_conn_retrieve_by_req_id.return_value = async_mock.MagicMock( did=TestConfig.test_target_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ), state=ConnRecord.State.REQUEST.rfc23, save=async_mock.CoroutineMock(), ) with self.assertRaises(DIDXManagerError): await self.manager.accept_response(mock_response, receipt) async def test_accept_response_find_by_thread_id_did_mismatch(self): mock_response = async_mock.MagicMock() mock_response._thread = async_mock.MagicMock() mock_response.did = TestConfig.test_target_did mock_response.did_doc_attach = async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ) receipt = MessageReceipt(sender_did=TestConfig.test_target_did) with async_mock.patch.object( ConnRecord, "save", autospec=True ) as mock_conn_rec_save, async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id, async_mock.patch.object( ConnRecord, "retrieve_by_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_id, async_mock.patch.object( DIDDoc, "deserialize", async_mock.MagicMock() ) as mock_did_doc_deser: mock_did_doc_deser.return_value = async_mock.MagicMock( did=TestConfig.test_did ) mock_conn_retrieve_by_req_id.return_value = async_mock.MagicMock( did=TestConfig.test_target_did, did_doc_attach=async_mock.MagicMock( data=async_mock.MagicMock( verify=async_mock.CoroutineMock(return_value=True), signed=async_mock.MagicMock( decode=async_mock.MagicMock( return_value=json.dumps({"dummy": "did-doc"}) ) ), ) ), state=ConnRecord.State.REQUEST.rfc23, save=async_mock.CoroutineMock(), ) mock_conn_retrieve_by_id.return_value = async_mock.MagicMock( their_did=TestConfig.test_target_did, save=async_mock.CoroutineMock(), ) with self.assertRaises(DIDXManagerError): await self.manager.accept_response(mock_response, receipt) async def test_accept_complete(self): mock_complete = async_mock.MagicMock() receipt = MessageReceipt(sender_did=TestConfig.test_target_did) with async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id: mock_conn_retrieve_by_req_id.return_value.save = async_mock.CoroutineMock() conn_rec = await self.manager.accept_complete(mock_complete, receipt) assert ConnRecord.State.get(conn_rec.state) is ConnRecord.State.COMPLETED async def test_accept_complete_x_not_found(self): mock_complete = async_mock.MagicMock() receipt = MessageReceipt(sender_did=TestConfig.test_target_did) with async_mock.patch.object( ConnRecord, "retrieve_by_request_id", async_mock.CoroutineMock() ) as mock_conn_retrieve_by_req_id: mock_conn_retrieve_by_req_id.side_effect = StorageNotFoundError() with self.assertRaises(DIDXManagerError): await self.manager.accept_complete(mock_complete, receipt) async def test_create_did_document(self): did_info = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None, ) mock_conn = async_mock.MagicMock( connection_id="dummy", inbound_connection_id=None, their_did=TestConfig.test_target_did, state=ConnRecord.State.COMPLETED.rfc23, ) did_doc = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey, ) for i in range(2): # first cover store-record, then update-value await self.manager.store_did_document(did_doc) with async_mock.patch.object( ConnRecord, "retrieve_by_id", async_mock.CoroutineMock() ) as mock_conn_rec_retrieve_by_id: mock_conn_rec_retrieve_by_id.return_value = mock_conn did_doc = await self.manager.create_did_document( did_info=did_info, inbound_connection_id="dummy", svc_endpoints=[TestConfig.test_endpoint], ) async def test_create_did_document_not_completed(self): did_info = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None, ) mock_conn = async_mock.MagicMock( connection_id="dummy", inbound_connection_id=None, their_did=TestConfig.test_target_did, state=ConnRecord.State.ABANDONED.rfc23, ) with async_mock.patch.object( ConnRecord, "retrieve_by_id", async_mock.CoroutineMock() ) as mock_conn_rec_retrieve_by_id: mock_conn_rec_retrieve_by_id.return_value = mock_conn with self.assertRaises(BaseConnectionManagerError): await self.manager.create_did_document( did_info=did_info, inbound_connection_id="dummy", svc_endpoints=[TestConfig.test_endpoint], ) async def test_create_did_document_no_services(self): did_info = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None, ) mock_conn = async_mock.MagicMock( connection_id="dummy", inbound_connection_id=None, their_did=TestConfig.test_target_did, state=ConnRecord.State.COMPLETED.rfc23, ) x_did_doc = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey ) x_did_doc._service = {} for i in range(2): # first cover store-record, then update-value await self.manager.store_did_document(x_did_doc) with async_mock.patch.object( ConnRecord, "retrieve_by_id", async_mock.CoroutineMock() ) as mock_conn_rec_retrieve_by_id: mock_conn_rec_retrieve_by_id.return_value = mock_conn with self.assertRaises(BaseConnectionManagerError): await self.manager.create_did_document( did_info=did_info, inbound_connection_id="dummy", svc_endpoints=[TestConfig.test_endpoint], ) async def test_create_did_document_no_service_endpoint(self): did_info = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None, ) mock_conn = async_mock.MagicMock( connection_id="dummy", inbound_connection_id=None, their_did=TestConfig.test_target_did, state=ConnRecord.State.COMPLETED.rfc23, ) x_did_doc = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey ) x_did_doc._service = {} x_did_doc.set( Service(TestConfig.test_target_did, "dummy", "IndyAgent", [], [], "", 0) ) for i in range(2): # first cover store-record, then update-value await self.manager.store_did_document(x_did_doc) with async_mock.patch.object( ConnRecord, "retrieve_by_id", async_mock.CoroutineMock() ) as mock_conn_rec_retrieve_by_id: mock_conn_rec_retrieve_by_id.return_value = mock_conn with self.assertRaises(BaseConnectionManagerError): await self.manager.create_did_document( did_info=did_info, inbound_connection_id="dummy", svc_endpoints=[TestConfig.test_endpoint], ) async def test_create_did_document_no_service_recip_keys(self): did_info = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None, ) mock_conn = async_mock.MagicMock( connection_id="dummy", inbound_connection_id=None, their_did=TestConfig.test_target_did, state=ConnRecord.State.COMPLETED.rfc23, ) x_did_doc = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey ) x_did_doc._service = {} x_did_doc.set( Service( TestConfig.test_target_did, "dummy", "IndyAgent", [], [], TestConfig.test_endpoint, 0, ) ) for i in range(2): # first cover store-record, then update-value await self.manager.store_did_document(x_did_doc) with async_mock.patch.object( ConnRecord, "retrieve_by_id", async_mock.CoroutineMock() ) as mock_conn_rec_retrieve_by_id: mock_conn_rec_retrieve_by_id.return_value = mock_conn with self.assertRaises(BaseConnectionManagerError): await self.manager.create_did_document( did_info=did_info, inbound_connection_id="dummy", svc_endpoints=[TestConfig.test_endpoint], ) async def test_did_key_storage(self): did_info = DIDInfo( TestConfig.test_did, TestConfig.test_verkey, None, ) did_doc = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey ) await self.manager.add_key_for_did( did=TestConfig.test_target_did, key=TestConfig.test_target_verkey ) did = await self.manager.find_did_for_key(key=TestConfig.test_target_verkey) assert did == TestConfig.test_target_did await self.manager.remove_keys_for_did(TestConfig.test_target_did) async def test_diddoc_connection_targets_diddoc(self): did_doc = self.make_did_doc( TestConfig.test_target_did, TestConfig.test_target_verkey, ) targets = self.manager.diddoc_connection_targets( did_doc, TestConfig.test_verkey, ) assert isinstance(targets[0], ConnectionTarget) async def test_diddoc_connection_targets_diddoc_underspecified(self): with self.assertRaises(BaseConnectionManagerError): self.manager.diddoc_connection_targets(None, TestConfig.test_verkey) x_did_doc = DIDDoc(did=None) with self.assertRaises(BaseConnectionManagerError): self.manager.diddoc_connection_targets(x_did_doc, TestConfig.test_verkey) x_did_doc = self.make_did_doc( did=TestConfig.test_target_did, verkey=TestConfig.test_target_verkey ) x_did_doc._service = {} with self.assertRaises(BaseConnectionManagerError): self.manager.diddoc_connection_targets(x_did_doc, TestConfig.test_verkey)
42.28438
88
0.621352
8,541
81,482
5.566561
0.036178
0.091999
0.090106
0.047114
0.909431
0.87988
0.856785
0.843492
0.828222
0.822606
0
0.005427
0.301195
81,482
1,926
89
42.306334
0.829557
0.002148
0
0.711472
0
0
0.04423
0.010123
0
0
0
0
0.041715
1
0.000579
false
0
0.017381
0
0.023175
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
bcfeb79854c17d1cd3179d679119c3050e9833a1
6,354
py
Python
supports/integration-test/test_data_protection_1GB.py
ZVampirEM77/SSM
bdd383a66dc6c952c760758991c3b1880e19c893
[ "Apache-2.0" ]
2
2018-02-02T08:18:20.000Z
2020-11-16T11:03:23.000Z
supports/integration-test/test_data_protection_1GB.py
ZVampirEM77/SSM
bdd383a66dc6c952c760758991c3b1880e19c893
[ "Apache-2.0" ]
null
null
null
supports/integration-test/test_data_protection_1GB.py
ZVampirEM77/SSM
bdd383a66dc6c952c760758991c3b1880e19c893
[ "Apache-2.0" ]
1
2018-09-16T03:00:10.000Z
2018-09-16T03:00:10.000Z
import unittest from util import * FILE_SIZE = 1024 * 1024 * 1024 class TestMoverProtection_1GB(unittest.TestCase): def test_mover_allssd_read(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) # Begin to move file cmds = [] cmds.append(move_cmdlet("allssd", file_path)) # read the file cmds.append(read_file(file_path)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_onessd_read(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) # Begin to move file cmds = [] cmds.append(move_cmdlet("onessd", file_path)) # read the file cmds.append(read_file(file_path)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_archive_read(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) # Begin to move file cmds = [] cmds.append(move_cmdlet("archive", file_path)) # read the file cmds.append(read_file(file_path)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_allssd_delete(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("allssd", file_path)) check_storage(file_path) # delete the file cmds.append(delete_file(file_path)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_onessd_delete(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("onessd", file_path)) check_storage(file_path) # delete the file cmds.append(delete_file(file_path)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_archive_delete(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("archive", file_path)) check_storage(file_path) # delete the file cmds.append(delete_file(file_path)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_allssd_append(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("allssd", file_path)) # append random content to current file cmds.append(append_file(file_path, random.randrange(1024, 1024 * 1024 * 2))) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_onessd_append(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("onessd", file_path)) # append random content to current file cmds.append(append_file(file_path, random.randrange(1024, 1024 * 1024 * 2))) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_archive_append(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("archive", file_path)) # append random content to current file cmds.append(append_file(file_path, random.randrange(1024, 1024 * 1024 * 2))) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_allssd_overwrite(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("allssd", file_path)) # overwrite the file cmds.append(create_file(file_path, 24 * 1024 * 1024)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_onessd_overwrite(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("onessd", file_path)) # overwrite the file cmds.append(create_file(file_path, 24 * 1024 * 1024)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) def test_mover_archive_overwrite(self): # cid_create = create_file("/testFile") # print check_storage("/testFile") # Test with 1 GB file file_path = create_random_file(FILE_SIZE) cmds = [] cmds.append(move_cmdlet("archive", file_path)) # overwrite the file cmds.append(create_file(file_path, 24 * 1024 * 1024)) failed = wait_for_cmdlets(cmds) # check the statement of read self.assertTrue(len(failed) == 0) if __name__ == '__main__': unittest.main()
35.696629
61
0.618351
788
6,354
4.722081
0.071066
0.083848
0.077399
0.061274
0.964794
0.964794
0.964794
0.964794
0.959688
0.959688
0
0.023246
0.282342
6,354
177
62
35.898305
0.792763
0.27463
0
0.8125
0
0
0.018482
0
0
0
0
0
0.125
1
0.125
false
0
0.020833
0
0.15625
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
4c0ae028384d2a82d0e3f5262b2ad70797011485
137
py
Python
components/micropython/modules/hackerhotel2019/update.py
badgeteam/Firmware
6192b2902c70beb7a298a256d9087274d045fbc0
[ "Apache-2.0" ]
7
2019-02-11T10:02:14.000Z
2019-08-02T00:08:45.000Z
components/micropython/modules/hackerhotel2019/update.py
badgeteam/Firmware
6192b2902c70beb7a298a256d9087274d045fbc0
[ "Apache-2.0" ]
17
2019-01-05T18:02:11.000Z
2019-03-09T21:46:43.000Z
components/micropython/modules/hackerhotel2019/update.py
badgeteam/Firmware
6192b2902c70beb7a298a256d9087274d045fbc0
[ "Apache-2.0" ]
4
2019-02-15T16:03:20.000Z
2019-06-27T22:23:24.000Z
print("deprecation warning: update.py will be removed soon: use dashboard.tools.update_apps instead") import dashboard.tools.update_apps
45.666667
101
0.832117
20
137
5.6
0.75
0.25
0.357143
0.428571
0
0
0
0
0
0
0
0
0.087591
137
2
102
68.5
0.896
0
0
0
0
0
0.671533
0.19708
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
9
4c2b3fee6231f249ca8901cb87876f8f6a00eace
512
py
Python
tests/Comments.py
yhu-insight/python-toolkit
e53b2b4a63b455ca88955f18a2c00512a6de494b
[ "Apache-2.0" ]
null
null
null
tests/Comments.py
yhu-insight/python-toolkit
e53b2b4a63b455ca88955f18a2c00512a6de494b
[ "Apache-2.0" ]
null
null
null
tests/Comments.py
yhu-insight/python-toolkit
e53b2b4a63b455ca88955f18a2c00512a6de494b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Python Comments Example # Author - yucheng.hu@insight.com print("Hello, YuCheng!") # Python line comment # Python line comment print("Hello, YuCheng!") # Python multiple line comment - LINE 1 # Python multiple line comment - LINE 2 print("Hello, YuCheng!") ''' Python multiple line comment - LINE 1 Python multiple line comment - LINE 2 ''' print("Hello, YuCheng!") """ Python multiple line comment - LINE 1 Python multiple line comment - LINE 2 """ print("Hello, YuCheng Hu!")
18.962963
47
0.697266
69
512
5.173913
0.26087
0.246499
0.302521
0.420168
0.694678
0.694678
0.694678
0.694678
0.694678
0.694678
0
0.016509
0.171875
512
26
48
19.692308
0.825472
0.376953
0
0.8
0
0
0.537931
0
0
0
0
0
0
1
0
true
0
0
0
0
1
0
0
0
null
1
1
1
0
0
0
0
0
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
1
0
7
4c2c506c1b67a8ba0d68d893feebb8ce4ab70c20
17,807
py
Python
tests/engine/test_validation.py
Goxiaoy/rasa
93d9983e465f7a426930a746fef1252cbb2f8f35
[ "Apache-2.0" ]
8
2020-09-16T17:22:13.000Z
2022-02-01T00:11:30.000Z
tests/engine/test_validation.py
Goxiaoy/rasa
93d9983e465f7a426930a746fef1252cbb2f8f35
[ "Apache-2.0" ]
216
2020-09-20T13:05:58.000Z
2022-03-28T12:10:24.000Z
tests/engine/test_validation.py
Goxiaoy/rasa
93d9983e465f7a426930a746fef1252cbb2f8f35
[ "Apache-2.0" ]
1
2022-02-01T18:23:23.000Z
2022-02-01T18:23:23.000Z
from typing import Any, Dict, Text, Type, Optional, List import pytest from rasa.engine import validation from rasa.engine.exceptions import GraphSchemaValidationException from rasa.engine.graph import GraphComponent, ExecutionContext, GraphSchema, SchemaNode from rasa.engine.storage.resource import Resource from rasa.engine.storage.storage import ModelStorage from rasa.shared.core.domain import Domain from rasa.shared.nlu.training_data.training_data import TrainingData class TestComponentWithoutRun(GraphComponent): @classmethod def create( cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, ) -> GraphComponent: return cls() class TestComponentWithRun(TestComponentWithoutRun): def run(self) -> TrainingData: pass def create_test_schema( uses: Type, # The unspecified type is on purpose to enable testing of invalid cases constructor_name: Text = "create", run_fn: Text = "run", needs: Optional[Dict[Text, Text]] = None, eager: bool = True, parent: Optional[Type[GraphComponent]] = None, ) -> GraphSchema: parent_node = {} if parent: parent_node = { "parent": SchemaNode( needs={}, uses=parent, constructor_name="create", fn="run", config={} ) } # noinspection PyTypeChecker return GraphSchema( { "my_node": SchemaNode( needs=needs or {}, uses=uses, eager=eager, constructor_name=constructor_name, fn=run_fn, config={}, ), **parent_node, } ) def test_graph_component_is_no_graph_component(): class MyComponent: def other(self) -> TrainingData: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="implement .+ interface"): validation.validate(schema, language=None, is_train_graph=True) def test_graph_component_fn_does_not_exist(): schema = create_test_schema(uses=TestComponentWithRun, run_fn="some_fn") with pytest.raises( GraphSchemaValidationException, match="specified method 'some_fn'" ): validation.validate(schema, language=None, is_train_graph=True) def test_graph_output_is_not_fingerprintable_int(): class MyComponent(TestComponentWithoutRun): def run(self) -> int: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="fingerprintable"): validation.validate(schema, language=None, is_train_graph=True) def test_predict_graph_output_is_not_fingerprintable(): class MyComponent(TestComponentWithoutRun): def run(self) -> int: pass schema = create_test_schema(uses=MyComponent) validation.validate(schema, language=None, is_train_graph=False) def test_graph_output_is_not_fingerprintable_any(): class MyComponent(TestComponentWithoutRun): def run(self) -> Any: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="fingerprintable"): validation.validate(schema, language=None, is_train_graph=True) def test_graph_output_is_not_fingerprintable_None(): class MyComponent(TestComponentWithoutRun): def run(self) -> None: pass schema = create_test_schema(uses=MyComponent,) with pytest.raises(GraphSchemaValidationException, match="fingerprintable"): validation.validate(schema, language=None, is_train_graph=True) def test_graph_with_forward_referenced_output_type(): class MyComponent(TestComponentWithoutRun): # The non imported type annotation is on purpose so we can provoke a error in # the test def run(self) -> "UserUttered": # noqa: F821 pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="forward reference"): validation.validate(schema, language=None, is_train_graph=True) def test_graph_output_missing_type_annotation(): class MyComponent(TestComponentWithoutRun): def run(self): pass schema = create_test_schema(uses=MyComponent) with pytest.raises( GraphSchemaValidationException, match="does not have a type annotation" ): validation.validate(schema, language=None, is_train_graph=True) def test_graph_with_fingerprintable_output(): class MyComponent(TestComponentWithoutRun): def run(self) -> TrainingData: pass schema = create_test_schema(uses=MyComponent) validation.validate(schema, language=None, is_train_graph=True) class MyTrainingData(TrainingData): pass def test_graph_with_fingerprintable_output_subclass(): class MyComponent(TestComponentWithoutRun): def run(self) -> MyTrainingData: pass schema = create_test_schema(uses=MyComponent) validation.validate(schema, language=None, is_train_graph=True) def test_graph_constructor_missing(): class MyComponent(TestComponentWithoutRun): def run(self) -> TrainingData: pass schema = create_test_schema(uses=MyComponent, constructor_name="invalid") with pytest.raises( GraphSchemaValidationException, match="specified method 'invalid'" ): validation.validate(schema, language=None, is_train_graph=True) def test_graph_constructor_config_wrong_type(): class MyComponent(TestComponentWithRun): @classmethod def create( cls, config: Dict[int, int], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, ) -> GraphComponent: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="incompatible type"): validation.validate(schema, language=None, is_train_graph=True) def test_graph_constructor_resource_wrong_type(): class MyComponent(TestComponentWithRun): @classmethod def create( cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Dict, execution_context: ExecutionContext, ) -> GraphComponent: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="incompatible type"): validation.validate(schema, language=None, is_train_graph=True) def test_graph_constructor_model_storage_wrong_type(): class MyComponent(TestComponentWithRun): @classmethod def create( cls, config: Dict[Text, Any], model_storage: Any, resource: Resource, execution_context: ExecutionContext, ) -> GraphComponent: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="incompatible type"): validation.validate(schema, language=None, is_train_graph=True) def test_graph_constructor_execution_context_wrong_type(): class MyComponent(TestComponentWithRun): @classmethod def create( cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: Any, ) -> GraphComponent: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="incompatible type"): validation.validate(schema, language=None, is_train_graph=True) @pytest.mark.parametrize( "current_language, supported_languages", [("de", ["en"]), ("en", ["zh", "fi"]), ("us", [])], ) def test_graph_constructor_execution_not_supported_language( current_language: Text, supported_languages: Optional[List[Text]] ): class MyComponent(TestComponentWithRun): @staticmethod def supported_languages() -> Optional[List[Text]]: return supported_languages schema = create_test_schema(uses=MyComponent) with pytest.raises( GraphSchemaValidationException, match="does not support .* language" ): validation.validate(schema, language=current_language, is_train_graph=False) @pytest.mark.parametrize( "current_language, supported_languages", [(None, None), ("en", ["zh", "en"]), ("zh", None), (None, ["en"])], ) def test_graph_constructor_execution_supported_language( current_language: Optional[Text], supported_languages: Optional[List[Text]] ): class MyComponent(TestComponentWithRun): @staticmethod def supported_languages() -> Optional[List[Text]]: return supported_languages schema = create_test_schema(uses=MyComponent) validation.validate(schema, language=current_language, is_train_graph=False) @pytest.mark.parametrize( "required_packages", [["pytorch"], ["tensorflow", "kubernetes"]] ) def test_graph_missing_package_requirements(required_packages: List[Text]): class MyComponent(TestComponentWithRun): @staticmethod def required_packages() -> List[Text]: """Any extra python dependencies required for this component to run.""" return required_packages schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="not installed"): validation.validate(schema, language=None, is_train_graph=True) @pytest.mark.parametrize("required_packages", [["tensorflow"], ["tensorflow", "numpy"]]) def test_graph_satisfied_package_requirements(required_packages: List[Text]): class MyComponent(TestComponentWithRun): @staticmethod def required_packages() -> List[Text]: """Any extra python dependencies required for this component to run.""" return required_packages schema = create_test_schema(uses=MyComponent) validation.validate(schema, language=None, is_train_graph=True) def test_run_param_not_satisfied(): class MyComponent(TestComponentWithoutRun): def run(self, some_param: TrainingData) -> TrainingData: pass schema = create_test_schema(uses=MyComponent) with pytest.raises(GraphSchemaValidationException, match="needs the param"): validation.validate(schema, language=None, is_train_graph=True) def test_run_param_satifisfied_due_to_default(): class MyComponent(TestComponentWithoutRun): def run(self, some_param: TrainingData = TrainingData()) -> TrainingData: pass schema = create_test_schema(uses=MyComponent) validation.validate(schema, language=None, is_train_graph=True) def test_too_many_supplied_params(): schema = create_test_schema( uses=TestComponentWithRun, needs={"some_param": "parent"} ) with pytest.raises( GraphSchemaValidationException, match="does not accept a parameter" ): validation.validate( schema, language=None, is_train_graph=True, ) def test_too_many_supplied_params_but_kwargs(): class MyComponent(TestComponentWithoutRun): def run(self, **kwargs: Any) -> TrainingData: pass schema = create_test_schema( uses=MyComponent, needs={"some_param": "parent"}, parent=TestComponentWithRun ) validation.validate(schema, language=None, is_train_graph=True) def test_run_fn_with_variable_length_positional_param(): class MyComponent(TestComponentWithoutRun): def run(self, *args: Any, some_param: TrainingData) -> TrainingData: pass schema = create_test_schema( uses=MyComponent, needs={"some_param": "parent"}, parent=TestComponentWithRun ) validation.validate(schema, language=None, is_train_graph=True) def test_matching_params_due_to_constructor(): class MyComponent(TestComponentWithRun): @classmethod def load( cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, some_param: TrainingData, ) -> GraphComponent: pass schema = create_test_schema( uses=MyComponent, needs={"some_param": "parent"}, eager=False, constructor_name="load", parent=TestComponentWithRun, ) validation.validate( schema, language=None, is_train_graph=True, ) def test_matching_params_due_to_constructor_but_eager(): class MyComponent(TestComponentWithRun): @classmethod def load( cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, some_param: TrainingData, ) -> GraphComponent: pass schema = create_test_schema( uses=MyComponent, needs={"some_param": "parent"}, eager=True, constructor_name="load", ) with pytest.raises(GraphSchemaValidationException, match="lazy mode"): validation.validate( schema, language=None, is_train_graph=True, ) @pytest.mark.parametrize( "eager, error_message", [(True, "lazy mode"), (False, "needs the param")] ) def test_unsatisfied_constructor(eager: bool, error_message: Text): class MyComponent(TestComponentWithRun): @classmethod def load( cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, some_param: TrainingData, ) -> GraphComponent: pass schema = create_test_schema(uses=MyComponent, eager=eager, constructor_name="load",) with pytest.raises(GraphSchemaValidationException, match=error_message): validation.validate( schema, language=None, is_train_graph=True, ) def test_parent_supplying_wrong_type(): class MyUnreliableParent(TestComponentWithoutRun): def run(self) -> Domain: pass class MyComponent(TestComponentWithoutRun): def run(self, training_data: TrainingData) -> TrainingData: pass schema = create_test_schema( uses=MyComponent, parent=MyUnreliableParent, needs={"training_data": "parent"}, ) with pytest.raises(GraphSchemaValidationException, match="type .* expected"): validation.validate(schema, language=None, is_train_graph=True) def test_parent_supplying_wrong_type_to_constructor(): class MyUnreliableParent(TestComponentWithoutRun): def run(self) -> Domain: pass class MyComponent(TestComponentWithRun): @classmethod def load( cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, some_param: TrainingData, ) -> GraphComponent: pass schema = create_test_schema( uses=MyComponent, eager=False, constructor_name="load", parent=MyUnreliableParent, needs={"some_param": "parent"}, ) with pytest.raises(GraphSchemaValidationException, match="type .* expected"): validation.validate(schema, language=None, is_train_graph=True) def test_parent_supplying_subtype(): class Parent(TestComponentWithoutRun): def run(self) -> MyTrainingData: pass class MyComponent(TestComponentWithoutRun): def run(self, training_data: TrainingData) -> TrainingData: pass schema = create_test_schema( uses=MyComponent, parent=Parent, needs={"training_data": "parent"}, ) validation.validate(schema, language=None, is_train_graph=True) def test_child_accepting_any_type_from_parent(): class Parent(TestComponentWithoutRun): def run(self) -> MyTrainingData: pass class MyComponent(TestComponentWithoutRun): def run(self, training_data: Any) -> TrainingData: pass schema = create_test_schema( uses=MyComponent, parent=Parent, needs={"training_data": "parent"}, ) validation.validate(schema, language=None, is_train_graph=True) @pytest.mark.parametrize("is_train_graph", [True, False]) def test_cycle(is_train_graph: bool): class MyTestComponent(TestComponentWithoutRun): def run(self, training_data: TrainingData) -> TrainingData: pass schema = GraphSchema( { "A": SchemaNode( needs={"training_data": "B"}, uses=MyTestComponent, eager=True, constructor_name="create", fn="run", is_target=True, config={}, ), "B": SchemaNode( needs={"training_data": "C"}, uses=MyTestComponent, eager=True, constructor_name="create", fn="run", config={}, ), "C": SchemaNode( needs={"training_data": "A"}, uses=MyTestComponent, eager=True, constructor_name="create", fn="run", config={}, ), } ) with pytest.raises(GraphSchemaValidationException, match="Cycles"): validation.validate(schema, language=None, is_train_graph=is_train_graph)
30.914931
88
0.66794
1,736
17,807
6.629608
0.103687
0.021288
0.036493
0.055609
0.809975
0.793727
0.742202
0.721088
0.704753
0.688505
0
0.000222
0.239793
17,807
575
89
30.968696
0.849967
0.018251
0
0.662791
0
0
0.05164
0
0
0
0
0
0
1
0.160465
false
0.074419
0.02093
0.006977
0.281395
0.02093
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
913bf785c951626aeaee4c3488e1f9f792d13864
97
py
Python
challenges/repeated-word/conftest.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
challenges/repeated-word/conftest.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
challenges/repeated-word/conftest.py
jeremyCtown/data-structures-and-algorithms
d4ba8741f858fb5298f8ce560240373fb7742e20
[ "MIT" ]
null
null
null
# from ../hash_table/hash_table import HashTable as ht import pytest def test_string(): pass
19.4
54
0.752577
15
97
4.666667
0.8
0.257143
0
0
0
0
0
0
0
0
0
0
0.164948
97
5
55
19.4
0.864198
0.536082
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
1
0
1
0
0
8
e6838fc696b11211ec070d0453b56350c7b98eeb
194
py
Python
ustart.py
SermetPekin/statsmodels
e8197d08db0672394404e52b335b4e393c67778d
[ "BSD-3-Clause" ]
null
null
null
ustart.py
SermetPekin/statsmodels
e8197d08db0672394404e52b335b4e393c67778d
[ "BSD-3-Clause" ]
null
null
null
ustart.py
SermetPekin/statsmodels
e8197d08db0672394404e52b335b4e393c67778d
[ "BSD-3-Clause" ]
null
null
null
import statsmodels as sm import statsmodels.formula.api as smf import scipy print( scipy.__version__ ) print("everything is fine ") print("statsmodels.formula.api {}".format( type( sm ) ))
19.4
58
0.742268
26
194
5.384615
0.576923
0.242857
0.3
0
0
0
0
0
0
0
0
0
0.14433
194
9
59
21.555556
0.843373
0
0
0
0
0
0.237113
0.118557
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
7
e6c171a6d206eb9b0484f1dddd6ac17b0c142b12
14,004
py
Python
test/geometry/test_homography.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
418
2018-10-02T22:31:36.000Z
2019-01-16T14:15:45.000Z
test/geometry/test_homography.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
94
2019-01-17T22:10:45.000Z
2019-05-22T23:47:58.000Z
test/geometry/test_homography.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
25
2018-10-02T22:50:04.000Z
2019-01-13T18:14:11.000Z
import random import pytest import torch from torch.autograd import gradcheck import kornia import kornia.testing as utils from kornia.geometry.homography import ( find_homography_dlt, find_homography_dlt_iterated, oneway_transfer_error, sample_is_valid_for_homography, symmetric_transfer_error, ) from kornia.testing import assert_close class TestSampleValidation: def test_good(self, device, dtype): pts1 = torch.tensor([[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [1.0, 0.0]], device=device, dtype=dtype)[None] mask = sample_is_valid_for_homography(pts1, pts1) expected = torch.tensor([True], device=device, dtype=torch.bool) assert torch.equal(mask, expected) def test_bad(self, device, dtype): pts1 = torch.tensor([[0.0, 0.0], [1.0, 0.0], [0.0, 1.0], [1.0, 1.0]], device=device, dtype=dtype)[None] pts2 = torch.tensor([[0.0, 0.0], [0.0, 1.0], [1.0, 0.0], [1.0, 1.0]], device=device, dtype=dtype)[None] mask = sample_is_valid_for_homography(pts1, pts2) expected = torch.tensor([False], device=device, dtype=torch.bool) assert torch.equal(mask, expected) def test_batch(self, device, dtype): batch_size = 5 pts1 = torch.rand(batch_size, 4, 2, device=device, dtype=dtype) pts2 = torch.rand(batch_size, 4, 2, device=device, dtype=dtype) mask = sample_is_valid_for_homography(pts1, pts2) assert (mask.shape == torch.Size([batch_size])) class TestOneWayError: def test_smoke(self, device, dtype): pts1 = torch.rand(1, 6, 2, device=device, dtype=dtype) pts2 = torch.rand(1, 6, 2, device=device, dtype=dtype) H = utils.create_random_homography(1, 3).type_as(pts1).to(device) assert oneway_transfer_error(pts1, pts2, H).shape == (1, 6) def test_batch(self, device, dtype): batch_size = 5 pts1 = torch.rand(batch_size, 3, 2, device=device, dtype=dtype) pts2 = torch.rand(batch_size, 3, 2, device=device, dtype=dtype) H = utils.create_random_homography(1, 3).type_as(pts1).to(device) assert oneway_transfer_error(pts1, pts2, H).shape == (batch_size, 3) def test_gradcheck(self, device): # generate input data batch_size, num_points, num_dims = 2, 3, 2 points1 = torch.rand(batch_size, num_points, num_dims, device=device, dtype=torch.float64, requires_grad=True) points2 = torch.rand(batch_size, num_points, num_dims, device=device, dtype=torch.float64) H = utils.create_random_homography(batch_size, 3).type_as(points1).to(device) assert gradcheck(oneway_transfer_error, (points1, points2, H), raise_exception=True) def test_shift(self, device, dtype): pts1 = torch.zeros(3, 2, device=device, dtype=dtype)[None] pts2 = torch.tensor([[1.0, 0.0], [2.0, 0.0], [2.0, 2.0]], device=device, dtype=dtype)[None] H = torch.tensor([[1.0, 0.0, 1.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], dtype=dtype, device=device)[None] expected = torch.tensor([0.0, 1.0, 5.0], device=device, dtype=dtype)[None] assert_close(oneway_transfer_error(pts1, pts2, H), expected, atol=1e-4, rtol=1e-4) class TestSymmetricTransferError: def test_smoke(self, device, dtype): pts1 = torch.rand(1, 6, 2, device=device, dtype=dtype) pts2 = torch.rand(1, 6, 2, device=device, dtype=dtype) H = utils.create_random_homography(1, 3).type_as(pts1).to(device) assert symmetric_transfer_error(pts1, pts2, H).shape == (1, 6) def test_batch(self, device, dtype): batch_size = 5 pts1 = torch.rand(batch_size, 3, 2, device=device, dtype=dtype) pts2 = torch.rand(batch_size, 3, 2, device=device, dtype=dtype) H = utils.create_random_homography(1, 3).type_as(pts1).to(device) assert symmetric_transfer_error(pts1, pts2, H).shape == (batch_size, 3) def test_gradcheck(self, device): # generate input data batch_size, num_points, num_dims = 2, 3, 2 points1 = torch.rand(batch_size, num_points, num_dims, device=device, dtype=torch.float64, requires_grad=True) points2 = torch.rand(batch_size, num_points, num_dims, device=device, dtype=torch.float64) H = utils.create_random_homography(batch_size, 3).type_as(points1).to(device) assert gradcheck(symmetric_transfer_error, (points1, points2, H), raise_exception=True) def test_shift(self, device, dtype): pts1 = torch.zeros(3, 2, device=device, dtype=dtype)[None] pts2 = torch.tensor([[1.0, 0.0], [2.0, 0.0], [2.0, 2.0]], device=device, dtype=dtype)[None] H = torch.tensor([[1.0, 0.0, 1.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], dtype=dtype, device=device)[None] expected = torch.tensor([0.0, 2.0, 10.0], device=device, dtype=dtype)[None] assert_close(symmetric_transfer_error(pts1, pts2, H), expected, atol=1e-4, rtol=1e-4) class TestFindHomographyDLT: def test_smoke(self, device, dtype): points1 = torch.rand(1, 4, 2, device=device, dtype=dtype) points2 = torch.rand(1, 4, 2, device=device, dtype=dtype) weights = torch.ones(1, 4, device=device, dtype=dtype) H = find_homography_dlt(points1, points2, weights) assert H.shape == (1, 3, 3) def test_nocrash(self, device, dtype): points1 = torch.rand(1, 4, 2, device=device, dtype=dtype) points2 = torch.rand(1, 4, 2, device=device, dtype=dtype) weights = torch.ones(1, 4, device=device, dtype=dtype) points1[0, 0, 0] = float('nan') H = find_homography_dlt(points1, points2, weights) assert H.shape == (1, 3, 3) @pytest.mark.parametrize("batch_size, num_points", [(1, 4), (2, 5), (3, 6)]) def test_shape(self, batch_size, num_points, device, dtype): B, N = batch_size, num_points points1 = torch.rand(B, N, 2, device=device, dtype=dtype) points2 = torch.rand(B, N, 2, device=device, dtype=dtype) weights = torch.ones(B, N, device=device, dtype=dtype) H = find_homography_dlt(points1, points2, weights) assert H.shape == (B, 3, 3) @pytest.mark.parametrize("batch_size, num_points", [(1, 4), (2, 5), (3, 6)]) def test_shape_noweights(self, batch_size, num_points, device, dtype): B, N = batch_size, num_points points1 = torch.rand(B, N, 2, device=device, dtype=dtype) points2 = torch.rand(B, N, 2, device=device, dtype=dtype) H = find_homography_dlt(points1, points2, None) assert H.shape == (B, 3, 3) @pytest.mark.parametrize("batch_size, num_points", [(1, 4), (2, 5), (3, 6)]) def test_points_noweights(self, batch_size, num_points, device, dtype): B, N = batch_size, num_points points1 = torch.rand(B, N, 2, device=device, dtype=dtype) points2 = torch.rand(B, N, 2, device=device, dtype=dtype) weights = torch.ones(B, N, device=device, dtype=dtype) H_noweights = find_homography_dlt(points1, points2, None) H_withweights = find_homography_dlt(points1, points2, weights) assert H_noweights.shape == (B, 3, 3) and H_withweights.shape == (B, 3, 3) assert_close(H_noweights, H_withweights, rtol=1e-3, atol=1e-4) @pytest.mark.parametrize("batch_size", [1, 2, 5]) def test_clean_points(self, batch_size, device, dtype): # generate input data points_src = torch.rand(batch_size, 10, 2, device=device, dtype=dtype) H = kornia.eye_like(3, points_src) H = H * 0.3 * torch.rand_like(H) H = H / H[:, 2:3, 2:3] points_dst = kornia.geometry.transform_points(H, points_src) weights = torch.ones(batch_size, 10, device=device, dtype=dtype) # compute transform from source to target dst_homo_src = find_homography_dlt(points_src, points_dst, weights) assert_close(kornia.geometry.transform_points(dst_homo_src, points_src), points_dst, rtol=1e-3, atol=1e-4) @pytest.mark.grad @pytest.mark.skipif(torch.__version__ < '1.7', reason="pytorch bug of incopatible types: #33546 fixed in v1.7") def test_gradcheck(self, device): # Save initial seed initial_seed = torch.random.initial_seed() max_number_of_checks = 10 # Test gradients for a max_number_of_checks times current_seed = initial_seed for i in range(max_number_of_checks): torch.manual_seed(current_seed) points_src = torch.rand(1, 10, 2, device=device, dtype=torch.float64, requires_grad=True) points_dst = torch.rand_like(points_src) weights = torch.ones_like(points_src)[..., 0] try: gradcheck( find_homography_dlt, (points_src, points_dst, weights), rtol=1e-6, atol=1e-6, raise_exception=True ) # Gradcheck failed except RuntimeError: # All iterations failed if i == max_number_of_checks - 1: assert gradcheck( find_homography_dlt, (points_src, points_dst, weights), rtol=1e-6, atol=1e-6, raise_exception=True, ) # Next iteration else: current_seed = random.randrange(0xFFFFFFFFFFFFFFFF) continue # Gradcheck succeed torch.manual_seed(initial_seed) return class TestFindHomographyDLTIter: def test_smoke(self, device, dtype): points1 = torch.rand(1, 4, 2, device=device, dtype=dtype) points2 = torch.rand(1, 4, 2, device=device, dtype=dtype) weights = torch.ones(1, 4, device=device, dtype=dtype) H = find_homography_dlt_iterated(points1, points2, weights, 5) assert H.shape == (1, 3, 3) @pytest.mark.parametrize("batch_size, num_points", [(1, 4), (2, 5), (3, 6)]) def test_shape(self, batch_size, num_points, device, dtype): B, N = batch_size, num_points points1 = torch.rand(B, N, 2, device=device, dtype=dtype) points2 = torch.rand(B, N, 2, device=device, dtype=dtype) weights = torch.ones(B, N, device=device, dtype=dtype) H = find_homography_dlt_iterated(points1, points2, weights, 5) assert H.shape == (B, 3, 3) @pytest.mark.parametrize("batch_size", [1, 2]) def test_clean_points(self, batch_size, device, dtype): # generate input data points_src = torch.rand(batch_size, 10, 2, device=device, dtype=dtype) H = kornia.eye_like(3, points_src) H = H * 0.3 * torch.rand_like(H) H = H / H[:, 2:3, 2:3] points_dst = kornia.geometry.transform_points(H, points_src) weights = torch.ones(batch_size, 10, device=device, dtype=dtype) # compute transform from source to target dst_homo_src = find_homography_dlt_iterated(points_src, points_dst, weights, 10) assert_close(kornia.geometry.transform_points(dst_homo_src, points_src), points_dst, rtol=1e-3, atol=1e-4) @pytest.mark.grad @pytest.mark.skipif(torch.__version__ < '1.7', reason="pytorch bug of incopatible types: #33546 fixed in v1.7") def test_gradcheck(self, device): # Save initial seed initial_seed = torch.random.initial_seed() max_number_of_checks = 10 # Test gradients for a max_number_of_checks times current_seed = initial_seed for i in range(max_number_of_checks): torch.manual_seed(current_seed) points_src = torch.rand(1, 10, 2, device=device, dtype=torch.float64, requires_grad=True) points_dst = torch.rand_like(points_src) weights = torch.ones_like(points_src)[..., 0] try: gradcheck( find_homography_dlt_iterated, (points_src, points_dst, weights), rtol=1e-6, atol=1e-6, raise_exception=True, ) # Gradcheck failed except RuntimeError: # All iterations failed if i == max_number_of_checks - 1: assert gradcheck( find_homography_dlt_iterated, (points_src, points_dst, weights), rtol=1e-6, atol=1e-6, raise_exception=True, ) # Next iteration else: current_seed = random.randrange(0xFFFFFFFFFFFFFFFF) continue # Gradcheck succeed torch.manual_seed(initial_seed) return @pytest.mark.grad @pytest.mark.parametrize("batch_size", [1, 2]) def test_dirty_points_and_gradcheck(self, batch_size, device, dtype): # generate input data points_src = torch.rand(batch_size, 10, 2, device=device, dtype=dtype) H = kornia.eye_like(3, points_src) H = H * (1 + torch.rand_like(H)) H = H / H[:, 2:3, 2:3] points_src = 100.0 * torch.rand(batch_size, 20, 2, device=device, dtype=dtype) points_dst = kornia.geometry.transform_points(H, points_src) # making last point an outlier points_dst[:, -1, :] += 20 weights = torch.ones(batch_size, 20, device=device, dtype=dtype) # compute transform from source to target dst_homo_src = find_homography_dlt_iterated(points_src, points_dst, weights, 0.5, 10) assert_close( kornia.geometry.transform_points(dst_homo_src, points_src[:, :-1]), points_dst[:, :-1], rtol=1e-3, atol=1e-3 )
44.741214
120
0.611111
1,911
14,004
4.301936
0.081109
0.097677
0.111665
0.123099
0.910716
0.898431
0.891862
0.8887
0.862426
0.851478
0
0.046974
0.267281
14,004
312
121
44.884615
0.754215
0.037418
0
0.733333
0
0
0.017462
0
0
0
0.002675
0
0.104167
1
0.095833
false
0
0.033333
0
0.158333
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
fc094dcb3e534b7be7488506bbf030fc5baeee8b
306,604
py
Python
test/unit/test_global_catalog_v1.py
nathan-hekman/platform-services-python-sdk
498c56c33bff040a77f073448563aeed550a2074
[ "Apache-2.0" ]
10
2020-04-02T15:48:33.000Z
2021-06-23T05:12:49.000Z
test/unit/test_global_catalog_v1.py
nathan-hekman/platform-services-python-sdk
498c56c33bff040a77f073448563aeed550a2074
[ "Apache-2.0" ]
151
2020-03-30T20:24:39.000Z
2022-03-30T16:51:22.000Z
test/unit/test_global_catalog_v1.py
nathan-hekman/platform-services-python-sdk
498c56c33bff040a77f073448563aeed550a2074
[ "Apache-2.0" ]
25
2020-04-16T21:03:19.000Z
2021-12-13T19:37:39.000Z
# -*- coding: utf-8 -*- # (C) Copyright IBM Corp. 2021. # # 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. """ Unit Tests for GlobalCatalogV1 """ from datetime import datetime, timezone from ibm_cloud_sdk_core.authenticators.no_auth_authenticator import NoAuthAuthenticator import inspect import io import json import pytest import re import requests import responses import tempfile import urllib from ibm_platform_services.global_catalog_v1 import * service = GlobalCatalogV1( authenticator=NoAuthAuthenticator() ) base_url = 'https://globalcatalog.cloud.ibm.com/api/v1' service.set_service_url(base_url) ############################################################################## # Start of Service: Object ############################################################################## # region class TestListCatalogEntries(): """ Test Class for list_catalog_entries """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_catalog_entries_all_params(self): """ list_catalog_entries() """ # Set up mock url = self.preprocess_url(base_url + '/') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values account = 'testString' include = 'testString' q = 'testString' sort_by = 'testString' descending = 'testString' languages = 'testString' catalog = True complete = True offset = 38 limit = 200 # Invoke method response = service.list_catalog_entries( account=account, include=include, q=q, sort_by=sort_by, descending=descending, languages=languages, catalog=catalog, complete=complete, offset=offset, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string assert 'include={}'.format(include) in query_string assert 'q={}'.format(q) in query_string assert 'sort-by={}'.format(sort_by) in query_string assert 'descending={}'.format(descending) in query_string assert 'languages={}'.format(languages) in query_string assert 'catalog={}'.format('true' if catalog else 'false') in query_string assert 'complete={}'.format('true' if complete else 'false') in query_string assert '_offset={}'.format(offset) in query_string assert '_limit={}'.format(limit) in query_string @responses.activate def test_list_catalog_entries_required_params(self): """ test_list_catalog_entries_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.list_catalog_entries() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 class TestCreateCatalogEntry(): """ Test Class for create_catalog_entry """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_catalog_entry_all_params(self): """ create_catalog_entry() """ # Set up mock url = self.preprocess_url(base_url + '/') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Construct a dict representation of a Overview model overview_model = {} overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' # Construct a dict representation of a Image model image_model = {} image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' # Construct a dict representation of a Provider model provider_model = {} provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' # Construct a dict representation of a CFMetaData model cf_meta_data_model = {} cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} # Construct a dict representation of a PlanMetaData model plan_meta_data_model = {} plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} # Construct a dict representation of a AliasMetaData model alias_meta_data_model = {} alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' # Construct a dict representation of a SourceMetaData model source_meta_data_model = {} source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' # Construct a dict representation of a TemplateMetaData model template_meta_data_model = {} template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} # Construct a dict representation of a Bullets model bullets_model = {} bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 # Construct a dict representation of a UIMetaMedia model ui_meta_media_model = {} ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model # Construct a dict representation of a Strings model strings_model = {} strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' # Construct a dict representation of a URLS model urls_model = {} urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' # Construct a dict representation of a UIMetaData model ui_meta_data_model = {} ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True # Construct a dict representation of a DRMetaData model dr_meta_data_model = {} dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' # Construct a dict representation of a SLAMetaData model sla_meta_data_model = {} sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model # Construct a dict representation of a Callbacks model callbacks_model = {} callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} # Construct a dict representation of a Price model price_model = {} price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 # Construct a dict representation of a Amount model amount_model = {} amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a dict representation of a StartingPrice model starting_price_model = {} starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] # Construct a dict representation of a PricingSet model pricing_set_model = {} pricing_set_model['type'] = 'testString' pricing_set_model['origin'] = 'testString' pricing_set_model['starting_price'] = starting_price_model # Construct a dict representation of a Broker model broker_model = {} broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a dict representation of a DeploymentBase model deployment_base_model = {} deployment_base_model['location'] = 'testString' deployment_base_model['location_url'] = 'testString' deployment_base_model['original_location'] = 'testString' deployment_base_model['target_crn'] = 'testString' deployment_base_model['service_crn'] = 'testString' deployment_base_model['mccp_id'] = 'testString' deployment_base_model['broker'] = broker_model deployment_base_model['supports_rc_migration'] = True deployment_base_model['target_network'] = 'testString' # Construct a dict representation of a ObjectMetadataSet model object_metadata_set_model = {} object_metadata_set_model['rc_compatible'] = True object_metadata_set_model['service'] = cf_meta_data_model object_metadata_set_model['plan'] = plan_meta_data_model object_metadata_set_model['alias'] = alias_meta_data_model object_metadata_set_model['template'] = template_meta_data_model object_metadata_set_model['ui'] = ui_meta_data_model object_metadata_set_model['compliance'] = ['testString'] object_metadata_set_model['sla'] = sla_meta_data_model object_metadata_set_model['callbacks'] = callbacks_model object_metadata_set_model['original_name'] = 'testString' object_metadata_set_model['version'] = 'testString' object_metadata_set_model['other'] = {} object_metadata_set_model['pricing'] = pricing_set_model object_metadata_set_model['deployment'] = deployment_base_model # Set up parameter values name = 'testString' kind = 'service' overview_ui = {} images = image_model disabled = True tags = ['testString'] provider = provider_model id = 'testString' parent_id = 'testString' group = True active = True metadata = object_metadata_set_model account = 'testString' # Invoke method response = service.create_catalog_entry( name, kind, overview_ui, images, disabled, tags, provider, id, parent_id=parent_id, group=group, active=active, metadata=metadata, account=account, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate query params query_string = responses.calls[0].request.url.split('?',1)[1] query_string = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['name'] == 'testString' assert req_body['kind'] == 'service' assert req_body['overview_ui'] == {} assert req_body['images'] == image_model assert req_body['disabled'] == True assert req_body['tags'] == ['testString'] assert req_body['provider'] == provider_model assert req_body['id'] == 'testString' assert req_body['parent_id'] == 'testString' assert req_body['group'] == True assert req_body['active'] == True assert req_body['metadata'] == object_metadata_set_model @responses.activate def test_create_catalog_entry_required_params(self): """ test_create_catalog_entry_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Construct a dict representation of a Overview model overview_model = {} overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' # Construct a dict representation of a Image model image_model = {} image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' # Construct a dict representation of a Provider model provider_model = {} provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' # Construct a dict representation of a CFMetaData model cf_meta_data_model = {} cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} # Construct a dict representation of a PlanMetaData model plan_meta_data_model = {} plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} # Construct a dict representation of a AliasMetaData model alias_meta_data_model = {} alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' # Construct a dict representation of a SourceMetaData model source_meta_data_model = {} source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' # Construct a dict representation of a TemplateMetaData model template_meta_data_model = {} template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} # Construct a dict representation of a Bullets model bullets_model = {} bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 # Construct a dict representation of a UIMetaMedia model ui_meta_media_model = {} ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model # Construct a dict representation of a Strings model strings_model = {} strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' # Construct a dict representation of a URLS model urls_model = {} urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' # Construct a dict representation of a UIMetaData model ui_meta_data_model = {} ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True # Construct a dict representation of a DRMetaData model dr_meta_data_model = {} dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' # Construct a dict representation of a SLAMetaData model sla_meta_data_model = {} sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model # Construct a dict representation of a Callbacks model callbacks_model = {} callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} # Construct a dict representation of a Price model price_model = {} price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 # Construct a dict representation of a Amount model amount_model = {} amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a dict representation of a StartingPrice model starting_price_model = {} starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] # Construct a dict representation of a PricingSet model pricing_set_model = {} pricing_set_model['type'] = 'testString' pricing_set_model['origin'] = 'testString' pricing_set_model['starting_price'] = starting_price_model # Construct a dict representation of a Broker model broker_model = {} broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a dict representation of a DeploymentBase model deployment_base_model = {} deployment_base_model['location'] = 'testString' deployment_base_model['location_url'] = 'testString' deployment_base_model['original_location'] = 'testString' deployment_base_model['target_crn'] = 'testString' deployment_base_model['service_crn'] = 'testString' deployment_base_model['mccp_id'] = 'testString' deployment_base_model['broker'] = broker_model deployment_base_model['supports_rc_migration'] = True deployment_base_model['target_network'] = 'testString' # Construct a dict representation of a ObjectMetadataSet model object_metadata_set_model = {} object_metadata_set_model['rc_compatible'] = True object_metadata_set_model['service'] = cf_meta_data_model object_metadata_set_model['plan'] = plan_meta_data_model object_metadata_set_model['alias'] = alias_meta_data_model object_metadata_set_model['template'] = template_meta_data_model object_metadata_set_model['ui'] = ui_meta_data_model object_metadata_set_model['compliance'] = ['testString'] object_metadata_set_model['sla'] = sla_meta_data_model object_metadata_set_model['callbacks'] = callbacks_model object_metadata_set_model['original_name'] = 'testString' object_metadata_set_model['version'] = 'testString' object_metadata_set_model['other'] = {} object_metadata_set_model['pricing'] = pricing_set_model object_metadata_set_model['deployment'] = deployment_base_model # Set up parameter values name = 'testString' kind = 'service' overview_ui = {} images = image_model disabled = True tags = ['testString'] provider = provider_model id = 'testString' parent_id = 'testString' group = True active = True metadata = object_metadata_set_model # Invoke method response = service.create_catalog_entry( name, kind, overview_ui, images, disabled, tags, provider, id, parent_id=parent_id, group=group, active=active, metadata=metadata, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['name'] == 'testString' assert req_body['kind'] == 'service' assert req_body['overview_ui'] == {} assert req_body['images'] == image_model assert req_body['disabled'] == True assert req_body['tags'] == ['testString'] assert req_body['provider'] == provider_model assert req_body['id'] == 'testString' assert req_body['parent_id'] == 'testString' assert req_body['group'] == True assert req_body['active'] == True assert req_body['metadata'] == object_metadata_set_model @responses.activate def test_create_catalog_entry_value_error(self): """ test_create_catalog_entry_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Construct a dict representation of a Overview model overview_model = {} overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' # Construct a dict representation of a Image model image_model = {} image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' # Construct a dict representation of a Provider model provider_model = {} provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' # Construct a dict representation of a CFMetaData model cf_meta_data_model = {} cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} # Construct a dict representation of a PlanMetaData model plan_meta_data_model = {} plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} # Construct a dict representation of a AliasMetaData model alias_meta_data_model = {} alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' # Construct a dict representation of a SourceMetaData model source_meta_data_model = {} source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' # Construct a dict representation of a TemplateMetaData model template_meta_data_model = {} template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} # Construct a dict representation of a Bullets model bullets_model = {} bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 # Construct a dict representation of a UIMetaMedia model ui_meta_media_model = {} ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model # Construct a dict representation of a Strings model strings_model = {} strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' # Construct a dict representation of a URLS model urls_model = {} urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' # Construct a dict representation of a UIMetaData model ui_meta_data_model = {} ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True # Construct a dict representation of a DRMetaData model dr_meta_data_model = {} dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' # Construct a dict representation of a SLAMetaData model sla_meta_data_model = {} sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model # Construct a dict representation of a Callbacks model callbacks_model = {} callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} # Construct a dict representation of a Price model price_model = {} price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 # Construct a dict representation of a Amount model amount_model = {} amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a dict representation of a StartingPrice model starting_price_model = {} starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] # Construct a dict representation of a PricingSet model pricing_set_model = {} pricing_set_model['type'] = 'testString' pricing_set_model['origin'] = 'testString' pricing_set_model['starting_price'] = starting_price_model # Construct a dict representation of a Broker model broker_model = {} broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a dict representation of a DeploymentBase model deployment_base_model = {} deployment_base_model['location'] = 'testString' deployment_base_model['location_url'] = 'testString' deployment_base_model['original_location'] = 'testString' deployment_base_model['target_crn'] = 'testString' deployment_base_model['service_crn'] = 'testString' deployment_base_model['mccp_id'] = 'testString' deployment_base_model['broker'] = broker_model deployment_base_model['supports_rc_migration'] = True deployment_base_model['target_network'] = 'testString' # Construct a dict representation of a ObjectMetadataSet model object_metadata_set_model = {} object_metadata_set_model['rc_compatible'] = True object_metadata_set_model['service'] = cf_meta_data_model object_metadata_set_model['plan'] = plan_meta_data_model object_metadata_set_model['alias'] = alias_meta_data_model object_metadata_set_model['template'] = template_meta_data_model object_metadata_set_model['ui'] = ui_meta_data_model object_metadata_set_model['compliance'] = ['testString'] object_metadata_set_model['sla'] = sla_meta_data_model object_metadata_set_model['callbacks'] = callbacks_model object_metadata_set_model['original_name'] = 'testString' object_metadata_set_model['version'] = 'testString' object_metadata_set_model['other'] = {} object_metadata_set_model['pricing'] = pricing_set_model object_metadata_set_model['deployment'] = deployment_base_model # Set up parameter values name = 'testString' kind = 'service' overview_ui = {} images = image_model disabled = True tags = ['testString'] provider = provider_model id = 'testString' parent_id = 'testString' group = True active = True metadata = object_metadata_set_model # Pass in all but one required param and check for a ValueError req_param_dict = { "name": name, "kind": kind, "overview_ui": overview_ui, "images": images, "disabled": disabled, "tags": tags, "provider": provider, "id": 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.create_catalog_entry(**req_copy) class TestGetCatalogEntry(): """ Test Class for get_catalog_entry """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_catalog_entry_all_params(self): """ get_catalog_entry() """ # Set up mock url = self.preprocess_url(base_url + '/testString') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' account = 'testString' include = 'testString' languages = 'testString' complete = True depth = 38 # Invoke method response = service.get_catalog_entry( id, account=account, include=include, languages=languages, complete=complete, depth=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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string assert 'include={}'.format(include) in query_string assert 'languages={}'.format(languages) in query_string assert 'complete={}'.format('true' if complete else 'false') in query_string assert 'depth={}'.format(depth) in query_string @responses.activate def test_get_catalog_entry_required_params(self): """ test_get_catalog_entry_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Invoke method response = service.get_catalog_entry( id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_catalog_entry_value_error(self): """ test_get_catalog_entry_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "id": 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_catalog_entry(**req_copy) class TestUpdateCatalogEntry(): """ Test Class for update_catalog_entry """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_catalog_entry_all_params(self): """ update_catalog_entry() """ # Set up mock url = self.preprocess_url(base_url + '/testString') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a Overview model overview_model = {} overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' # Construct a dict representation of a Image model image_model = {} image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' # Construct a dict representation of a Provider model provider_model = {} provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' # Construct a dict representation of a CFMetaData model cf_meta_data_model = {} cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} # Construct a dict representation of a PlanMetaData model plan_meta_data_model = {} plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} # Construct a dict representation of a AliasMetaData model alias_meta_data_model = {} alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' # Construct a dict representation of a SourceMetaData model source_meta_data_model = {} source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' # Construct a dict representation of a TemplateMetaData model template_meta_data_model = {} template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} # Construct a dict representation of a Bullets model bullets_model = {} bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 # Construct a dict representation of a UIMetaMedia model ui_meta_media_model = {} ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model # Construct a dict representation of a Strings model strings_model = {} strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' # Construct a dict representation of a URLS model urls_model = {} urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' # Construct a dict representation of a UIMetaData model ui_meta_data_model = {} ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True # Construct a dict representation of a DRMetaData model dr_meta_data_model = {} dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' # Construct a dict representation of a SLAMetaData model sla_meta_data_model = {} sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model # Construct a dict representation of a Callbacks model callbacks_model = {} callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} # Construct a dict representation of a Price model price_model = {} price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 # Construct a dict representation of a Amount model amount_model = {} amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a dict representation of a StartingPrice model starting_price_model = {} starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] # Construct a dict representation of a PricingSet model pricing_set_model = {} pricing_set_model['type'] = 'testString' pricing_set_model['origin'] = 'testString' pricing_set_model['starting_price'] = starting_price_model # Construct a dict representation of a Broker model broker_model = {} broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a dict representation of a DeploymentBase model deployment_base_model = {} deployment_base_model['location'] = 'testString' deployment_base_model['location_url'] = 'testString' deployment_base_model['original_location'] = 'testString' deployment_base_model['target_crn'] = 'testString' deployment_base_model['service_crn'] = 'testString' deployment_base_model['mccp_id'] = 'testString' deployment_base_model['broker'] = broker_model deployment_base_model['supports_rc_migration'] = True deployment_base_model['target_network'] = 'testString' # Construct a dict representation of a ObjectMetadataSet model object_metadata_set_model = {} object_metadata_set_model['rc_compatible'] = True object_metadata_set_model['service'] = cf_meta_data_model object_metadata_set_model['plan'] = plan_meta_data_model object_metadata_set_model['alias'] = alias_meta_data_model object_metadata_set_model['template'] = template_meta_data_model object_metadata_set_model['ui'] = ui_meta_data_model object_metadata_set_model['compliance'] = ['testString'] object_metadata_set_model['sla'] = sla_meta_data_model object_metadata_set_model['callbacks'] = callbacks_model object_metadata_set_model['original_name'] = 'testString' object_metadata_set_model['version'] = 'testString' object_metadata_set_model['other'] = {} object_metadata_set_model['pricing'] = pricing_set_model object_metadata_set_model['deployment'] = deployment_base_model # Set up parameter values id = 'testString' name = 'testString' kind = 'service' overview_ui = {} images = image_model disabled = True tags = ['testString'] provider = provider_model parent_id = 'testString' group = True active = True metadata = object_metadata_set_model account = 'testString' move = 'testString' # Invoke method response = service.update_catalog_entry( id, name, kind, overview_ui, images, disabled, tags, provider, parent_id=parent_id, group=group, active=active, metadata=metadata, account=account, move=move, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string assert 'move={}'.format(move) in query_string # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['name'] == 'testString' assert req_body['kind'] == 'service' assert req_body['overview_ui'] == {} assert req_body['images'] == image_model assert req_body['disabled'] == True assert req_body['tags'] == ['testString'] assert req_body['provider'] == provider_model assert req_body['parent_id'] == 'testString' assert req_body['group'] == True assert req_body['active'] == True assert req_body['metadata'] == object_metadata_set_model @responses.activate def test_update_catalog_entry_required_params(self): """ test_update_catalog_entry_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a Overview model overview_model = {} overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' # Construct a dict representation of a Image model image_model = {} image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' # Construct a dict representation of a Provider model provider_model = {} provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' # Construct a dict representation of a CFMetaData model cf_meta_data_model = {} cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} # Construct a dict representation of a PlanMetaData model plan_meta_data_model = {} plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} # Construct a dict representation of a AliasMetaData model alias_meta_data_model = {} alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' # Construct a dict representation of a SourceMetaData model source_meta_data_model = {} source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' # Construct a dict representation of a TemplateMetaData model template_meta_data_model = {} template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} # Construct a dict representation of a Bullets model bullets_model = {} bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 # Construct a dict representation of a UIMetaMedia model ui_meta_media_model = {} ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model # Construct a dict representation of a Strings model strings_model = {} strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' # Construct a dict representation of a URLS model urls_model = {} urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' # Construct a dict representation of a UIMetaData model ui_meta_data_model = {} ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True # Construct a dict representation of a DRMetaData model dr_meta_data_model = {} dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' # Construct a dict representation of a SLAMetaData model sla_meta_data_model = {} sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model # Construct a dict representation of a Callbacks model callbacks_model = {} callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} # Construct a dict representation of a Price model price_model = {} price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 # Construct a dict representation of a Amount model amount_model = {} amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a dict representation of a StartingPrice model starting_price_model = {} starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] # Construct a dict representation of a PricingSet model pricing_set_model = {} pricing_set_model['type'] = 'testString' pricing_set_model['origin'] = 'testString' pricing_set_model['starting_price'] = starting_price_model # Construct a dict representation of a Broker model broker_model = {} broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a dict representation of a DeploymentBase model deployment_base_model = {} deployment_base_model['location'] = 'testString' deployment_base_model['location_url'] = 'testString' deployment_base_model['original_location'] = 'testString' deployment_base_model['target_crn'] = 'testString' deployment_base_model['service_crn'] = 'testString' deployment_base_model['mccp_id'] = 'testString' deployment_base_model['broker'] = broker_model deployment_base_model['supports_rc_migration'] = True deployment_base_model['target_network'] = 'testString' # Construct a dict representation of a ObjectMetadataSet model object_metadata_set_model = {} object_metadata_set_model['rc_compatible'] = True object_metadata_set_model['service'] = cf_meta_data_model object_metadata_set_model['plan'] = plan_meta_data_model object_metadata_set_model['alias'] = alias_meta_data_model object_metadata_set_model['template'] = template_meta_data_model object_metadata_set_model['ui'] = ui_meta_data_model object_metadata_set_model['compliance'] = ['testString'] object_metadata_set_model['sla'] = sla_meta_data_model object_metadata_set_model['callbacks'] = callbacks_model object_metadata_set_model['original_name'] = 'testString' object_metadata_set_model['version'] = 'testString' object_metadata_set_model['other'] = {} object_metadata_set_model['pricing'] = pricing_set_model object_metadata_set_model['deployment'] = deployment_base_model # Set up parameter values id = 'testString' name = 'testString' kind = 'service' overview_ui = {} images = image_model disabled = True tags = ['testString'] provider = provider_model parent_id = 'testString' group = True active = True metadata = object_metadata_set_model # Invoke method response = service.update_catalog_entry( id, name, kind, overview_ui, images, disabled, tags, provider, parent_id=parent_id, group=group, active=active, metadata=metadata, 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['name'] == 'testString' assert req_body['kind'] == 'service' assert req_body['overview_ui'] == {} assert req_body['images'] == image_model assert req_body['disabled'] == True assert req_body['tags'] == ['testString'] assert req_body['provider'] == provider_model assert req_body['parent_id'] == 'testString' assert req_body['group'] == True assert req_body['active'] == True assert req_body['metadata'] == object_metadata_set_model @responses.activate def test_update_catalog_entry_value_error(self): """ test_update_catalog_entry_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString') mock_response = '{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a Overview model overview_model = {} overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' # Construct a dict representation of a Image model image_model = {} image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' # Construct a dict representation of a Provider model provider_model = {} provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' # Construct a dict representation of a CFMetaData model cf_meta_data_model = {} cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} # Construct a dict representation of a PlanMetaData model plan_meta_data_model = {} plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} # Construct a dict representation of a AliasMetaData model alias_meta_data_model = {} alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' # Construct a dict representation of a SourceMetaData model source_meta_data_model = {} source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' # Construct a dict representation of a TemplateMetaData model template_meta_data_model = {} template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} # Construct a dict representation of a Bullets model bullets_model = {} bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 # Construct a dict representation of a UIMetaMedia model ui_meta_media_model = {} ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model # Construct a dict representation of a Strings model strings_model = {} strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' # Construct a dict representation of a URLS model urls_model = {} urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' # Construct a dict representation of a UIMetaData model ui_meta_data_model = {} ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True # Construct a dict representation of a DRMetaData model dr_meta_data_model = {} dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' # Construct a dict representation of a SLAMetaData model sla_meta_data_model = {} sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model # Construct a dict representation of a Callbacks model callbacks_model = {} callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} # Construct a dict representation of a Price model price_model = {} price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 # Construct a dict representation of a Amount model amount_model = {} amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a dict representation of a StartingPrice model starting_price_model = {} starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] # Construct a dict representation of a PricingSet model pricing_set_model = {} pricing_set_model['type'] = 'testString' pricing_set_model['origin'] = 'testString' pricing_set_model['starting_price'] = starting_price_model # Construct a dict representation of a Broker model broker_model = {} broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a dict representation of a DeploymentBase model deployment_base_model = {} deployment_base_model['location'] = 'testString' deployment_base_model['location_url'] = 'testString' deployment_base_model['original_location'] = 'testString' deployment_base_model['target_crn'] = 'testString' deployment_base_model['service_crn'] = 'testString' deployment_base_model['mccp_id'] = 'testString' deployment_base_model['broker'] = broker_model deployment_base_model['supports_rc_migration'] = True deployment_base_model['target_network'] = 'testString' # Construct a dict representation of a ObjectMetadataSet model object_metadata_set_model = {} object_metadata_set_model['rc_compatible'] = True object_metadata_set_model['service'] = cf_meta_data_model object_metadata_set_model['plan'] = plan_meta_data_model object_metadata_set_model['alias'] = alias_meta_data_model object_metadata_set_model['template'] = template_meta_data_model object_metadata_set_model['ui'] = ui_meta_data_model object_metadata_set_model['compliance'] = ['testString'] object_metadata_set_model['sla'] = sla_meta_data_model object_metadata_set_model['callbacks'] = callbacks_model object_metadata_set_model['original_name'] = 'testString' object_metadata_set_model['version'] = 'testString' object_metadata_set_model['other'] = {} object_metadata_set_model['pricing'] = pricing_set_model object_metadata_set_model['deployment'] = deployment_base_model # Set up parameter values id = 'testString' name = 'testString' kind = 'service' overview_ui = {} images = image_model disabled = True tags = ['testString'] provider = provider_model parent_id = 'testString' group = True active = True metadata = object_metadata_set_model # Pass in all but one required param and check for a ValueError req_param_dict = { "id": id, "name": name, "kind": kind, "overview_ui": overview_ui, "images": images, "disabled": disabled, "tags": tags, "provider": provider, } 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.update_catalog_entry(**req_copy) class TestDeleteCatalogEntry(): """ Test Class for delete_catalog_entry """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_catalog_entry_all_params(self): """ delete_catalog_entry() """ # Set up mock url = self.preprocess_url(base_url + '/testString') responses.add(responses.DELETE, url, status=200) # Set up parameter values id = 'testString' account = 'testString' force = True # Invoke method response = service.delete_catalog_entry( id, account=account, force=force, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string assert 'force={}'.format('true' if force else 'false') in query_string @responses.activate def test_delete_catalog_entry_required_params(self): """ test_delete_catalog_entry_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString') responses.add(responses.DELETE, url, status=200) # Set up parameter values id = 'testString' # Invoke method response = service.delete_catalog_entry( id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_catalog_entry_value_error(self): """ test_delete_catalog_entry_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString') responses.add(responses.DELETE, url, status=200) # Set up parameter values id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "id": 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.delete_catalog_entry(**req_copy) class TestGetChildObjects(): """ Test Class for get_child_objects """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_child_objects_all_params(self): """ get_child_objects() """ # Set up mock url = self.preprocess_url(base_url + '/testString/testString') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' kind = 'testString' account = 'testString' include = 'testString' q = 'testString' sort_by = 'testString' descending = 'testString' languages = 'testString' complete = True offset = 38 limit = 200 # Invoke method response = service.get_child_objects( id, kind, account=account, include=include, q=q, sort_by=sort_by, descending=descending, languages=languages, complete=complete, offset=offset, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string assert 'include={}'.format(include) in query_string assert 'q={}'.format(q) in query_string assert 'sort-by={}'.format(sort_by) in query_string assert 'descending={}'.format(descending) in query_string assert 'languages={}'.format(languages) in query_string assert 'complete={}'.format('true' if complete else 'false') in query_string assert '_offset={}'.format(offset) in query_string assert '_limit={}'.format(limit) in query_string @responses.activate def test_get_child_objects_required_params(self): """ test_get_child_objects_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/testString') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' kind = 'testString' # Invoke method response = service.get_child_objects( id, kind, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_child_objects_value_error(self): """ test_get_child_objects_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/testString') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"name": "name", "kind": "service", "overview_ui": {"mapKey": {"display_name": "display_name", "long_description": "long_description", "description": "description", "featured_description": "featured_description"}}, "images": {"image": "image", "small_image": "small_image", "medium_image": "medium_image", "feature_image": "feature_image"}, "parent_id": "parent_id", "disabled": true, "tags": ["tags"], "group": false, "provider": {"email": "email", "name": "name", "contact": "contact", "support_email": "support_email", "phone": "phone"}, "active": true, "metadata": {"rc_compatible": false, "service": {"type": "type", "iam_compatible": true, "unique_api_key": true, "provisionable": false, "bindable": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "requires": ["requires"], "plan_updateable": false, "state": "state", "service_check_enabled": false, "test_check_interval": 19, "service_key_supported": false, "cf_guid": {"mapKey": "inner"}}, "plan": {"bindable": true, "reservable": true, "allow_internal_users": true, "async_provisioning_supported": true, "async_unprovisioning_supported": true, "test_check_interval": 19, "single_scope_instance": "single_scope_instance", "service_check_enabled": false, "cf_guid": {"mapKey": "inner"}}, "alias": {"type": "type", "plan_id": "plan_id"}, "template": {"services": ["services"], "default_memory": 14, "start_cmd": "start_cmd", "source": {"path": "path", "type": "type", "url": "url"}, "runtime_catalog_id": "runtime_catalog_id", "cf_runtime_id": "cf_runtime_id", "template_id": "template_id", "executable_file": "executable_file", "buildpack": "buildpack", "environment_variables": {"mapKey": "inner"}}, "ui": {"strings": {"mapKey": {"bullets": [{"title": "title", "description": "description", "icon": "icon", "quantity": 8}], "media": [{"caption": "caption", "thumbnail_url": "thumbnail_url", "type": "type", "URL": "url", "source": {"title": "title", "description": "description", "icon": "icon", "quantity": 8}}], "not_creatable_msg": "not_creatable_msg", "not_creatable__robot_msg": "not_creatable_robot_msg", "deprecation_warning": "deprecation_warning", "popup_warning_message": "popup_warning_message", "instruction": "instruction"}}, "urls": {"doc_url": "doc_url", "instructions_url": "instructions_url", "api_url": "api_url", "create_url": "create_url", "sdk_download_url": "sdk_download_url", "terms_url": "terms_url", "custom_create_page_url": "custom_create_page_url", "catalog_details_url": "catalog_details_url", "deprecation_doc_url": "deprecation_doc_url", "dashboard_url": "dashboard_url", "registration_url": "registration_url", "apidocsurl": "apidocsurl"}, "embeddable_dashboard": "embeddable_dashboard", "embeddable_dashboard_full_width": false, "navigation_order": ["navigation_order"], "not_creatable": false, "primary_offering_id": "primary_offering_id", "accessible_during_provision": false, "side_by_side_index": 18, "end_of_service_time": "2019-01-01T12:00:00.000Z", "hidden": true, "hide_lite_metering": true, "no_upgrade_next_step": true}, "compliance": ["compliance"], "sla": {"terms": "terms", "tenancy": "tenancy", "provisioning": "provisioning", "responsiveness": "responsiveness", "dr": {"dr": true, "description": "description"}}, "callbacks": {"controller_url": "controller_url", "broker_url": "broker_url", "broker_proxy_url": "broker_proxy_url", "dashboard_url": "dashboard_url", "dashboard_data_url": "dashboard_data_url", "dashboard_detail_tab_url": "dashboard_detail_tab_url", "dashboard_detail_tab_ext_url": "dashboard_detail_tab_ext_url", "service_monitor_api": "service_monitor_api", "service_monitor_app": "service_monitor_app", "api_endpoint": {"mapKey": "inner"}}, "original_name": "original_name", "version": "version", "other": {"mapKey": {"anyKey": "anyValue"}}, "pricing": {"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}, "deployment": {"location": "location", "location_url": "location_url", "original_location": "original_location", "target_crn": "target_crn", "service_crn": "service_crn", "mccp_id": "mccp_id", "broker": {"name": "name", "guid": "guid"}, "supports_rc_migration": false, "target_network": "target_network"}}, "id": "id", "catalog_crn": "catalog_crn", "url": "url", "children_url": "children_url", "geo_tags": ["geo_tags"], "pricing_tags": ["pricing_tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' kind = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "id": id, "kind": kind, } 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_child_objects(**req_copy) class TestRestoreCatalogEntry(): """ Test Class for restore_catalog_entry """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_restore_catalog_entry_all_params(self): """ restore_catalog_entry() """ # Set up mock url = self.preprocess_url(base_url + '/testString/restore') responses.add(responses.PUT, url, status=200) # Set up parameter values id = 'testString' account = 'testString' # Invoke method response = service.restore_catalog_entry( id, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string @responses.activate def test_restore_catalog_entry_required_params(self): """ test_restore_catalog_entry_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/restore') responses.add(responses.PUT, url, status=200) # Set up parameter values id = 'testString' # Invoke method response = service.restore_catalog_entry( id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_restore_catalog_entry_value_error(self): """ test_restore_catalog_entry_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/restore') responses.add(responses.PUT, url, status=200) # Set up parameter values id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "id": 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.restore_catalog_entry(**req_copy) # endregion ############################################################################## # End of Service: Object ############################################################################## ############################################################################## # Start of Service: Visibility ############################################################################## # region class TestGetVisibility(): """ Test Class for get_visibility """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_visibility_all_params(self): """ get_visibility() """ # Set up mock url = self.preprocess_url(base_url + '/testString/visibility') mock_response = '{"restrictions": "restrictions", "owner": "owner", "extendable": true, "include": {"accounts": {"_accountid_": "accountid"}}, "exclude": {"accounts": {"_accountid_": "accountid"}}, "approved": true}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' account = 'testString' # Invoke method response = service.get_visibility( id, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string @responses.activate def test_get_visibility_required_params(self): """ test_get_visibility_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/visibility') mock_response = '{"restrictions": "restrictions", "owner": "owner", "extendable": true, "include": {"accounts": {"_accountid_": "accountid"}}, "exclude": {"accounts": {"_accountid_": "accountid"}}, "approved": true}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Invoke method response = service.get_visibility( id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_visibility_value_error(self): """ test_get_visibility_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/visibility') mock_response = '{"restrictions": "restrictions", "owner": "owner", "extendable": true, "include": {"accounts": {"_accountid_": "accountid"}}, "exclude": {"accounts": {"_accountid_": "accountid"}}, "approved": true}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "id": 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_visibility(**req_copy) class TestUpdateVisibility(): """ Test Class for update_visibility """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_visibility_all_params(self): """ update_visibility() """ # Set up mock url = self.preprocess_url(base_url + '/testString/visibility') responses.add(responses.PUT, url, status=200) # Construct a dict representation of a VisibilityDetailAccounts model visibility_detail_accounts_model = {} visibility_detail_accounts_model['_accountid_'] = 'testString' # Construct a dict representation of a VisibilityDetail model visibility_detail_model = {} visibility_detail_model['accounts'] = visibility_detail_accounts_model # Set up parameter values id = 'testString' extendable = True include = visibility_detail_model exclude = visibility_detail_model account = 'testString' # Invoke method response = service.update_visibility( id, extendable=extendable, include=include, exclude=exclude, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['extendable'] == True assert req_body['include'] == visibility_detail_model assert req_body['exclude'] == visibility_detail_model @responses.activate def test_update_visibility_required_params(self): """ test_update_visibility_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/visibility') responses.add(responses.PUT, url, status=200) # Construct a dict representation of a VisibilityDetailAccounts model visibility_detail_accounts_model = {} visibility_detail_accounts_model['_accountid_'] = 'testString' # Construct a dict representation of a VisibilityDetail model visibility_detail_model = {} visibility_detail_model['accounts'] = visibility_detail_accounts_model # Set up parameter values id = 'testString' extendable = True include = visibility_detail_model exclude = visibility_detail_model # Invoke method response = service.update_visibility( id, extendable=extendable, include=include, exclude=exclude, 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['extendable'] == True assert req_body['include'] == visibility_detail_model assert req_body['exclude'] == visibility_detail_model @responses.activate def test_update_visibility_value_error(self): """ test_update_visibility_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/visibility') responses.add(responses.PUT, url, status=200) # Construct a dict representation of a VisibilityDetailAccounts model visibility_detail_accounts_model = {} visibility_detail_accounts_model['_accountid_'] = 'testString' # Construct a dict representation of a VisibilityDetail model visibility_detail_model = {} visibility_detail_model['accounts'] = visibility_detail_accounts_model # Set up parameter values id = 'testString' extendable = True include = visibility_detail_model exclude = visibility_detail_model # Pass in all but one required param and check for a ValueError req_param_dict = { "id": 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.update_visibility(**req_copy) # endregion ############################################################################## # End of Service: Visibility ############################################################################## ############################################################################## # Start of Service: Pricing ############################################################################## # region class TestGetPricing(): """ Test Class for get_pricing """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_pricing_all_params(self): """ get_pricing() """ # Set up mock url = self.preprocess_url(base_url + '/testString/pricing') mock_response = '{"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' account = 'testString' # Invoke method response = service.get_pricing( id, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string @responses.activate def test_get_pricing_required_params(self): """ test_get_pricing_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/pricing') mock_response = '{"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Invoke method response = service.get_pricing( id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_pricing_value_error(self): """ test_get_pricing_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/pricing') mock_response = '{"type": "type", "origin": "origin", "starting_price": {"plan_id": "plan_id", "deployment_id": "deployment_id", "unit": "unit", "amount": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}, "metrics": [{"part_ref": "part_ref", "metric_id": "metric_id", "tier_model": "tier_model", "charge_unit": "charge_unit", "charge_unit_name": "charge_unit_name", "charge_unit_quantity": "charge_unit_quantity", "resource_display_name": "resource_display_name", "charge_unit_display_name": "charge_unit_display_name", "usage_cap_qty": 13, "display_cap": 11, "effective_from": "2019-01-01T12:00:00.000Z", "effective_until": "2019-01-01T12:00:00.000Z", "amounts": [{"country": "country", "currency": "currency", "prices": [{"quantity_tier": 13, "Price": 5}]}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "id": 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_pricing(**req_copy) # endregion ############################################################################## # End of Service: Pricing ############################################################################## ############################################################################## # Start of Service: Audit ############################################################################## # region class TestGetAuditLogs(): """ Test Class for get_audit_logs """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_audit_logs_all_params(self): """ get_audit_logs() """ # Set up mock url = self.preprocess_url(base_url + '/testString/logs') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"id": "id", "effective": {"restrictions": "restrictions", "owner": "owner", "extendable": true, "include": {"accounts": {"_accountid_": "accountid"}}, "exclude": {"accounts": {"_accountid_": "accountid"}}, "approved": true}, "time": "2019-01-01T12:00:00.000Z", "who_id": "who_id", "who_name": "who_name", "who_email": "who_email", "instance": "instance", "gid": "gid", "type": "type", "message": "message", "data": {"mapKey": {"anyKey": "anyValue"}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' account = 'testString' ascending = 'testString' startat = 'testString' offset = 38 limit = 200 # Invoke method response = service.get_audit_logs( id, account=account, ascending=ascending, startat=startat, offset=offset, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string assert 'ascending={}'.format(ascending) in query_string assert 'startat={}'.format(startat) in query_string assert '_offset={}'.format(offset) in query_string assert '_limit={}'.format(limit) in query_string @responses.activate def test_get_audit_logs_required_params(self): """ test_get_audit_logs_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/logs') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"id": "id", "effective": {"restrictions": "restrictions", "owner": "owner", "extendable": true, "include": {"accounts": {"_accountid_": "accountid"}}, "exclude": {"accounts": {"_accountid_": "accountid"}}, "approved": true}, "time": "2019-01-01T12:00:00.000Z", "who_id": "who_id", "who_name": "who_name", "who_email": "who_email", "instance": "instance", "gid": "gid", "type": "type", "message": "message", "data": {"mapKey": {"anyKey": "anyValue"}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Invoke method response = service.get_audit_logs( id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_audit_logs_value_error(self): """ test_get_audit_logs_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/logs') mock_response = '{"offset": 6, "limit": 5, "count": 5, "resource_count": 14, "first": "first", "last": "last", "prev": "prev", "next": "next", "resources": [{"id": "id", "effective": {"restrictions": "restrictions", "owner": "owner", "extendable": true, "include": {"accounts": {"_accountid_": "accountid"}}, "exclude": {"accounts": {"_accountid_": "accountid"}}, "approved": true}, "time": "2019-01-01T12:00:00.000Z", "who_id": "who_id", "who_name": "who_name", "who_email": "who_email", "instance": "instance", "gid": "gid", "type": "type", "message": "message", "data": {"mapKey": {"anyKey": "anyValue"}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "id": 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_audit_logs(**req_copy) # endregion ############################################################################## # End of Service: Audit ############################################################################## ############################################################################## # Start of Service: Artifact ############################################################################## # region class TestListArtifacts(): """ Test Class for list_artifacts """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_artifacts_all_params(self): """ list_artifacts() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts') mock_response = '{"count": 5, "resources": [{"name": "name", "updated": "2019-01-01T12:00:00.000Z", "url": "url", "etag": "etag", "size": 4}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values object_id = 'testString' account = 'testString' # Invoke method response = service.list_artifacts( object_id, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string @responses.activate def test_list_artifacts_required_params(self): """ test_list_artifacts_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts') mock_response = '{"count": 5, "resources": [{"name": "name", "updated": "2019-01-01T12:00:00.000Z", "url": "url", "etag": "etag", "size": 4}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values object_id = 'testString' # Invoke method response = service.list_artifacts( object_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_artifacts_value_error(self): """ test_list_artifacts_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts') mock_response = '{"count": 5, "resources": [{"name": "name", "updated": "2019-01-01T12:00:00.000Z", "url": "url", "etag": "etag", "size": 4}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values object_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "object_id": object_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.list_artifacts(**req_copy) class TestGetArtifact(): """ Test Class for get_artifact """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_artifact_all_params(self): """ get_artifact() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') mock_response = 'This is a mock binary response.' responses.add(responses.GET, url, body=mock_response, content_type='*/*', status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' account = 'testString' # Invoke method response = service.get_artifact( object_id, artifact_id, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string @responses.activate def test_get_artifact_required_params(self): """ test_get_artifact_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') mock_response = 'This is a mock binary response.' responses.add(responses.GET, url, body=mock_response, content_type='*/*', status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' # Invoke method response = service.get_artifact( object_id, artifact_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_artifact_value_error(self): """ test_get_artifact_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') mock_response = 'This is a mock binary response.' responses.add(responses.GET, url, body=mock_response, content_type='*/*', status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "object_id": object_id, "artifact_id": artifact_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_artifact(**req_copy) class TestUploadArtifact(): """ Test Class for upload_artifact """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_upload_artifact_all_params(self): """ upload_artifact() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') responses.add(responses.PUT, url, status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' artifact = io.BytesIO(b'This is a mock file.').getvalue() content_type = 'testString' account = 'testString' # Invoke method response = service.upload_artifact( object_id, artifact_id, artifact=artifact, content_type=content_type, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string # Validate body params @responses.activate def test_upload_artifact_required_params(self): """ test_upload_artifact_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') responses.add(responses.PUT, url, status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' # Invoke method response = service.upload_artifact( object_id, artifact_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_upload_artifact_value_error(self): """ test_upload_artifact_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') responses.add(responses.PUT, url, status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "object_id": object_id, "artifact_id": artifact_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.upload_artifact(**req_copy) class TestDeleteArtifact(): """ Test Class for delete_artifact """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_artifact_all_params(self): """ delete_artifact() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') responses.add(responses.DELETE, url, status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' account = 'testString' # Invoke method response = service.delete_artifact( object_id, artifact_id, account=account, 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 = urllib.parse.unquote_plus(query_string) assert 'account={}'.format(account) in query_string @responses.activate def test_delete_artifact_required_params(self): """ test_delete_artifact_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') responses.add(responses.DELETE, url, status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' # Invoke method response = service.delete_artifact( object_id, artifact_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_artifact_value_error(self): """ test_delete_artifact_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/testString/artifacts/testString') responses.add(responses.DELETE, url, status=200) # Set up parameter values object_id = 'testString' artifact_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "object_id": object_id, "artifact_id": artifact_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.delete_artifact(**req_copy) # endregion ############################################################################## # End of Service: Artifact ############################################################################## ############################################################################## # Start of Model Tests ############################################################################## # region class TestAliasMetaData(): """ Test Class for AliasMetaData """ def test_alias_meta_data_serialization(self): """ Test serialization/deserialization for AliasMetaData """ # Construct a json representation of a AliasMetaData model alias_meta_data_model_json = {} alias_meta_data_model_json['type'] = 'testString' alias_meta_data_model_json['plan_id'] = 'testString' # Construct a model instance of AliasMetaData by calling from_dict on the json representation alias_meta_data_model = AliasMetaData.from_dict(alias_meta_data_model_json) assert alias_meta_data_model != False # Construct a model instance of AliasMetaData by calling from_dict on the json representation alias_meta_data_model_dict = AliasMetaData.from_dict(alias_meta_data_model_json).__dict__ alias_meta_data_model2 = AliasMetaData(**alias_meta_data_model_dict) # Verify the model instances are equivalent assert alias_meta_data_model == alias_meta_data_model2 # Convert model instance back to dict and verify no loss of data alias_meta_data_model_json2 = alias_meta_data_model.to_dict() assert alias_meta_data_model_json2 == alias_meta_data_model_json class TestAmount(): """ Test Class for Amount """ def test_amount_serialization(self): """ Test serialization/deserialization for Amount """ # Construct dict forms of any model objects needed in order to build this model. price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 # Construct a json representation of a Amount model amount_model_json = {} amount_model_json['country'] = 'testString' amount_model_json['currency'] = 'testString' amount_model_json['prices'] = [price_model] # Construct a model instance of Amount by calling from_dict on the json representation amount_model = Amount.from_dict(amount_model_json) assert amount_model != False # Construct a model instance of Amount by calling from_dict on the json representation amount_model_dict = Amount.from_dict(amount_model_json).__dict__ amount_model2 = Amount(**amount_model_dict) # Verify the model instances are equivalent assert amount_model == amount_model2 # Convert model instance back to dict and verify no loss of data amount_model_json2 = amount_model.to_dict() assert amount_model_json2 == amount_model_json class TestArtifact(): """ Test Class for Artifact """ def test_artifact_serialization(self): """ Test serialization/deserialization for Artifact """ # Construct a json representation of a Artifact model artifact_model_json = {} artifact_model_json['name'] = 'testString' artifact_model_json['updated'] = '2020-01-28T18:40:40.123456Z' artifact_model_json['url'] = 'testString' artifact_model_json['etag'] = 'testString' artifact_model_json['size'] = 38 # Construct a model instance of Artifact by calling from_dict on the json representation artifact_model = Artifact.from_dict(artifact_model_json) assert artifact_model != False # Construct a model instance of Artifact by calling from_dict on the json representation artifact_model_dict = Artifact.from_dict(artifact_model_json).__dict__ artifact_model2 = Artifact(**artifact_model_dict) # Verify the model instances are equivalent assert artifact_model == artifact_model2 # Convert model instance back to dict and verify no loss of data artifact_model_json2 = artifact_model.to_dict() assert artifact_model_json2 == artifact_model_json class TestArtifacts(): """ Test Class for Artifacts """ def test_artifacts_serialization(self): """ Test serialization/deserialization for Artifacts """ # Construct dict forms of any model objects needed in order to build this model. artifact_model = {} # Artifact artifact_model['name'] = 'testString' artifact_model['updated'] = '2020-01-28T18:40:40.123456Z' artifact_model['url'] = 'testString' artifact_model['etag'] = 'testString' artifact_model['size'] = 38 # Construct a json representation of a Artifacts model artifacts_model_json = {} artifacts_model_json['count'] = 38 artifacts_model_json['resources'] = [artifact_model] # Construct a model instance of Artifacts by calling from_dict on the json representation artifacts_model = Artifacts.from_dict(artifacts_model_json) assert artifacts_model != False # Construct a model instance of Artifacts by calling from_dict on the json representation artifacts_model_dict = Artifacts.from_dict(artifacts_model_json).__dict__ artifacts_model2 = Artifacts(**artifacts_model_dict) # Verify the model instances are equivalent assert artifacts_model == artifacts_model2 # Convert model instance back to dict and verify no loss of data artifacts_model_json2 = artifacts_model.to_dict() assert artifacts_model_json2 == artifacts_model_json class TestAuditSearchResult(): """ Test Class for AuditSearchResult """ def test_audit_search_result_serialization(self): """ Test serialization/deserialization for AuditSearchResult """ # Construct dict forms of any model objects needed in order to build this model. visibility_detail_accounts_model = {} # VisibilityDetailAccounts visibility_detail_accounts_model['_accountid_'] = 'testString' visibility_detail_model = {} # VisibilityDetail visibility_detail_model['accounts'] = visibility_detail_accounts_model visibility_model = {} # Visibility visibility_model['restrictions'] = 'testString' visibility_model['owner'] = 'testString' visibility_model['extendable'] = True visibility_model['include'] = visibility_detail_model visibility_model['exclude'] = visibility_detail_model visibility_model['approved'] = True message_model = {} # Message message_model['id'] = 'testString' message_model['effective'] = visibility_model message_model['time'] = '2020-01-28T18:40:40.123456Z' message_model['who_id'] = 'testString' message_model['who_name'] = 'testString' message_model['who_email'] = 'testString' message_model['instance'] = 'testString' message_model['gid'] = 'testString' message_model['type'] = 'testString' message_model['message'] = 'testString' message_model['data'] = {} # Construct a json representation of a AuditSearchResult model audit_search_result_model_json = {} audit_search_result_model_json['offset'] = 38 audit_search_result_model_json['limit'] = 38 audit_search_result_model_json['count'] = 38 audit_search_result_model_json['resource_count'] = 38 audit_search_result_model_json['first'] = 'testString' audit_search_result_model_json['last'] = 'testString' audit_search_result_model_json['prev'] = 'testString' audit_search_result_model_json['next'] = 'testString' audit_search_result_model_json['resources'] = [message_model] # Construct a model instance of AuditSearchResult by calling from_dict on the json representation audit_search_result_model = AuditSearchResult.from_dict(audit_search_result_model_json) assert audit_search_result_model != False # Construct a model instance of AuditSearchResult by calling from_dict on the json representation audit_search_result_model_dict = AuditSearchResult.from_dict(audit_search_result_model_json).__dict__ audit_search_result_model2 = AuditSearchResult(**audit_search_result_model_dict) # Verify the model instances are equivalent assert audit_search_result_model == audit_search_result_model2 # Convert model instance back to dict and verify no loss of data audit_search_result_model_json2 = audit_search_result_model.to_dict() assert audit_search_result_model_json2 == audit_search_result_model_json class TestBroker(): """ Test Class for Broker """ def test_broker_serialization(self): """ Test serialization/deserialization for Broker """ # Construct a json representation of a Broker model broker_model_json = {} broker_model_json['name'] = 'testString' broker_model_json['guid'] = 'testString' # Construct a model instance of Broker by calling from_dict on the json representation broker_model = Broker.from_dict(broker_model_json) assert broker_model != False # Construct a model instance of Broker by calling from_dict on the json representation broker_model_dict = Broker.from_dict(broker_model_json).__dict__ broker_model2 = Broker(**broker_model_dict) # Verify the model instances are equivalent assert broker_model == broker_model2 # Convert model instance back to dict and verify no loss of data broker_model_json2 = broker_model.to_dict() assert broker_model_json2 == broker_model_json class TestBullets(): """ Test Class for Bullets """ def test_bullets_serialization(self): """ Test serialization/deserialization for Bullets """ # Construct a json representation of a Bullets model bullets_model_json = {} bullets_model_json['title'] = 'testString' bullets_model_json['description'] = 'testString' bullets_model_json['icon'] = 'testString' bullets_model_json['quantity'] = 38 # Construct a model instance of Bullets by calling from_dict on the json representation bullets_model = Bullets.from_dict(bullets_model_json) assert bullets_model != False # Construct a model instance of Bullets by calling from_dict on the json representation bullets_model_dict = Bullets.from_dict(bullets_model_json).__dict__ bullets_model2 = Bullets(**bullets_model_dict) # Verify the model instances are equivalent assert bullets_model == bullets_model2 # Convert model instance back to dict and verify no loss of data bullets_model_json2 = bullets_model.to_dict() assert bullets_model_json2 == bullets_model_json class TestCFMetaData(): """ Test Class for CFMetaData """ def test_cf_meta_data_serialization(self): """ Test serialization/deserialization for CFMetaData """ # Construct a json representation of a CFMetaData model cf_meta_data_model_json = {} cf_meta_data_model_json['type'] = 'testString' cf_meta_data_model_json['iam_compatible'] = True cf_meta_data_model_json['unique_api_key'] = True cf_meta_data_model_json['provisionable'] = True cf_meta_data_model_json['bindable'] = True cf_meta_data_model_json['async_provisioning_supported'] = True cf_meta_data_model_json['async_unprovisioning_supported'] = True cf_meta_data_model_json['requires'] = ['testString'] cf_meta_data_model_json['plan_updateable'] = True cf_meta_data_model_json['state'] = 'testString' cf_meta_data_model_json['service_check_enabled'] = True cf_meta_data_model_json['test_check_interval'] = 38 cf_meta_data_model_json['service_key_supported'] = True cf_meta_data_model_json['cf_guid'] = {} # Construct a model instance of CFMetaData by calling from_dict on the json representation cf_meta_data_model = CFMetaData.from_dict(cf_meta_data_model_json) assert cf_meta_data_model != False # Construct a model instance of CFMetaData by calling from_dict on the json representation cf_meta_data_model_dict = CFMetaData.from_dict(cf_meta_data_model_json).__dict__ cf_meta_data_model2 = CFMetaData(**cf_meta_data_model_dict) # Verify the model instances are equivalent assert cf_meta_data_model == cf_meta_data_model2 # Convert model instance back to dict and verify no loss of data cf_meta_data_model_json2 = cf_meta_data_model.to_dict() assert cf_meta_data_model_json2 == cf_meta_data_model_json class TestCallbacks(): """ Test Class for Callbacks """ def test_callbacks_serialization(self): """ Test serialization/deserialization for Callbacks """ # Construct a json representation of a Callbacks model callbacks_model_json = {} callbacks_model_json['controller_url'] = 'testString' callbacks_model_json['broker_url'] = 'testString' callbacks_model_json['broker_proxy_url'] = 'testString' callbacks_model_json['dashboard_url'] = 'testString' callbacks_model_json['dashboard_data_url'] = 'testString' callbacks_model_json['dashboard_detail_tab_url'] = 'testString' callbacks_model_json['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model_json['service_monitor_api'] = 'testString' callbacks_model_json['service_monitor_app'] = 'testString' callbacks_model_json['api_endpoint'] = {} # Construct a model instance of Callbacks by calling from_dict on the json representation callbacks_model = Callbacks.from_dict(callbacks_model_json) assert callbacks_model != False # Construct a model instance of Callbacks by calling from_dict on the json representation callbacks_model_dict = Callbacks.from_dict(callbacks_model_json).__dict__ callbacks_model2 = Callbacks(**callbacks_model_dict) # Verify the model instances are equivalent assert callbacks_model == callbacks_model2 # Convert model instance back to dict and verify no loss of data callbacks_model_json2 = callbacks_model.to_dict() assert callbacks_model_json2 == callbacks_model_json class TestCatalogEntry(): """ Test Class for CatalogEntry """ def test_catalog_entry_serialization(self): """ Test serialization/deserialization for CatalogEntry """ # Construct dict forms of any model objects needed in order to build this model. overview_model = {} # Overview overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' image_model = {} # Image image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' provider_model = {} # Provider provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' cf_meta_data_model = {} # CFMetaData cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} plan_meta_data_model = {} # PlanMetaData plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} alias_meta_data_model = {} # AliasMetaData alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' source_meta_data_model = {} # SourceMetaData source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' template_meta_data_model = {} # TemplateMetaData template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} bullets_model = {} # Bullets bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 ui_meta_media_model = {} # UIMetaMedia ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model strings_model = {} # Strings strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' urls_model = {} # URLS urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' ui_meta_data_model = {} # UIMetaData ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True dr_meta_data_model = {} # DRMetaData dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' sla_meta_data_model = {} # SLAMetaData sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model callbacks_model = {} # Callbacks callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] starting_price_model = {} # StartingPrice starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] metrics_model = {} # Metrics metrics_model['part_ref'] = 'testString' metrics_model['metric_id'] = 'testString' metrics_model['tier_model'] = 'testString' metrics_model['charge_unit'] = 'testString' metrics_model['charge_unit_name'] = 'testString' metrics_model['charge_unit_quantity'] = 'testString' metrics_model['resource_display_name'] = 'testString' metrics_model['charge_unit_display_name'] = 'testString' metrics_model['usage_cap_qty'] = 38 metrics_model['display_cap'] = 38 metrics_model['effective_from'] = '2020-01-28T18:40:40.123456Z' metrics_model['effective_until'] = '2020-01-28T18:40:40.123456Z' metrics_model['amounts'] = [amount_model] catalog_entry_metadata_pricing_model = {} # CatalogEntryMetadataPricing catalog_entry_metadata_pricing_model['type'] = 'testString' catalog_entry_metadata_pricing_model['origin'] = 'testString' catalog_entry_metadata_pricing_model['starting_price'] = starting_price_model catalog_entry_metadata_pricing_model['metrics'] = [metrics_model] broker_model = {} # Broker broker_model['name'] = 'testString' broker_model['guid'] = 'testString' catalog_entry_metadata_deployment_model = {} # CatalogEntryMetadataDeployment catalog_entry_metadata_deployment_model['location'] = 'testString' catalog_entry_metadata_deployment_model['location_url'] = 'testString' catalog_entry_metadata_deployment_model['original_location'] = 'testString' catalog_entry_metadata_deployment_model['target_crn'] = 'testString' catalog_entry_metadata_deployment_model['service_crn'] = 'testString' catalog_entry_metadata_deployment_model['mccp_id'] = 'testString' catalog_entry_metadata_deployment_model['broker'] = broker_model catalog_entry_metadata_deployment_model['supports_rc_migration'] = True catalog_entry_metadata_deployment_model['target_network'] = 'testString' catalog_entry_metadata_model = {} # CatalogEntryMetadata catalog_entry_metadata_model['rc_compatible'] = True catalog_entry_metadata_model['service'] = cf_meta_data_model catalog_entry_metadata_model['plan'] = plan_meta_data_model catalog_entry_metadata_model['alias'] = alias_meta_data_model catalog_entry_metadata_model['template'] = template_meta_data_model catalog_entry_metadata_model['ui'] = ui_meta_data_model catalog_entry_metadata_model['compliance'] = ['testString'] catalog_entry_metadata_model['sla'] = sla_meta_data_model catalog_entry_metadata_model['callbacks'] = callbacks_model catalog_entry_metadata_model['original_name'] = 'testString' catalog_entry_metadata_model['version'] = 'testString' catalog_entry_metadata_model['other'] = {} catalog_entry_metadata_model['pricing'] = catalog_entry_metadata_pricing_model catalog_entry_metadata_model['deployment'] = catalog_entry_metadata_deployment_model # Construct a json representation of a CatalogEntry model catalog_entry_model_json = {} catalog_entry_model_json['name'] = 'testString' catalog_entry_model_json['kind'] = 'service' catalog_entry_model_json['overview_ui'] = {} catalog_entry_model_json['images'] = image_model catalog_entry_model_json['parent_id'] = 'testString' catalog_entry_model_json['disabled'] = True catalog_entry_model_json['tags'] = ['testString'] catalog_entry_model_json['group'] = True catalog_entry_model_json['provider'] = provider_model catalog_entry_model_json['active'] = True catalog_entry_model_json['metadata'] = catalog_entry_metadata_model catalog_entry_model_json['id'] = 'testString' catalog_entry_model_json['catalog_crn'] = 'testString' catalog_entry_model_json['url'] = 'testString' catalog_entry_model_json['children_url'] = 'testString' catalog_entry_model_json['geo_tags'] = ['testString'] catalog_entry_model_json['pricing_tags'] = ['testString'] catalog_entry_model_json['created'] = '2020-01-28T18:40:40.123456Z' catalog_entry_model_json['updated'] = '2020-01-28T18:40:40.123456Z' # Construct a model instance of CatalogEntry by calling from_dict on the json representation catalog_entry_model = CatalogEntry.from_dict(catalog_entry_model_json) assert catalog_entry_model != False # Construct a model instance of CatalogEntry by calling from_dict on the json representation catalog_entry_model_dict = CatalogEntry.from_dict(catalog_entry_model_json).__dict__ catalog_entry_model2 = CatalogEntry(**catalog_entry_model_dict) # Verify the model instances are equivalent assert catalog_entry_model == catalog_entry_model2 # Convert model instance back to dict and verify no loss of data catalog_entry_model_json2 = catalog_entry_model.to_dict() assert catalog_entry_model_json2 == catalog_entry_model_json class TestCatalogEntryMetadata(): """ Test Class for CatalogEntryMetadata """ def test_catalog_entry_metadata_serialization(self): """ Test serialization/deserialization for CatalogEntryMetadata """ # Construct dict forms of any model objects needed in order to build this model. cf_meta_data_model = {} # CFMetaData cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} plan_meta_data_model = {} # PlanMetaData plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} alias_meta_data_model = {} # AliasMetaData alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' source_meta_data_model = {} # SourceMetaData source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' template_meta_data_model = {} # TemplateMetaData template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} bullets_model = {} # Bullets bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 ui_meta_media_model = {} # UIMetaMedia ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model strings_model = {} # Strings strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' urls_model = {} # URLS urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' ui_meta_data_model = {} # UIMetaData ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True dr_meta_data_model = {} # DRMetaData dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' sla_meta_data_model = {} # SLAMetaData sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model callbacks_model = {} # Callbacks callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] starting_price_model = {} # StartingPrice starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] metrics_model = {} # Metrics metrics_model['part_ref'] = 'testString' metrics_model['metric_id'] = 'testString' metrics_model['tier_model'] = 'testString' metrics_model['charge_unit'] = 'testString' metrics_model['charge_unit_name'] = 'testString' metrics_model['charge_unit_quantity'] = 'testString' metrics_model['resource_display_name'] = 'testString' metrics_model['charge_unit_display_name'] = 'testString' metrics_model['usage_cap_qty'] = 38 metrics_model['display_cap'] = 38 metrics_model['effective_from'] = '2020-01-28T18:40:40.123456Z' metrics_model['effective_until'] = '2020-01-28T18:40:40.123456Z' metrics_model['amounts'] = [amount_model] catalog_entry_metadata_pricing_model = {} # CatalogEntryMetadataPricing catalog_entry_metadata_pricing_model['type'] = 'testString' catalog_entry_metadata_pricing_model['origin'] = 'testString' catalog_entry_metadata_pricing_model['starting_price'] = starting_price_model catalog_entry_metadata_pricing_model['metrics'] = [metrics_model] broker_model = {} # Broker broker_model['name'] = 'testString' broker_model['guid'] = 'testString' catalog_entry_metadata_deployment_model = {} # CatalogEntryMetadataDeployment catalog_entry_metadata_deployment_model['location'] = 'testString' catalog_entry_metadata_deployment_model['location_url'] = 'testString' catalog_entry_metadata_deployment_model['original_location'] = 'testString' catalog_entry_metadata_deployment_model['target_crn'] = 'testString' catalog_entry_metadata_deployment_model['service_crn'] = 'testString' catalog_entry_metadata_deployment_model['mccp_id'] = 'testString' catalog_entry_metadata_deployment_model['broker'] = broker_model catalog_entry_metadata_deployment_model['supports_rc_migration'] = True catalog_entry_metadata_deployment_model['target_network'] = 'testString' # Construct a json representation of a CatalogEntryMetadata model catalog_entry_metadata_model_json = {} catalog_entry_metadata_model_json['rc_compatible'] = True catalog_entry_metadata_model_json['service'] = cf_meta_data_model catalog_entry_metadata_model_json['plan'] = plan_meta_data_model catalog_entry_metadata_model_json['alias'] = alias_meta_data_model catalog_entry_metadata_model_json['template'] = template_meta_data_model catalog_entry_metadata_model_json['ui'] = ui_meta_data_model catalog_entry_metadata_model_json['compliance'] = ['testString'] catalog_entry_metadata_model_json['sla'] = sla_meta_data_model catalog_entry_metadata_model_json['callbacks'] = callbacks_model catalog_entry_metadata_model_json['original_name'] = 'testString' catalog_entry_metadata_model_json['version'] = 'testString' catalog_entry_metadata_model_json['other'] = {} catalog_entry_metadata_model_json['pricing'] = catalog_entry_metadata_pricing_model catalog_entry_metadata_model_json['deployment'] = catalog_entry_metadata_deployment_model # Construct a model instance of CatalogEntryMetadata by calling from_dict on the json representation catalog_entry_metadata_model = CatalogEntryMetadata.from_dict(catalog_entry_metadata_model_json) assert catalog_entry_metadata_model != False # Construct a model instance of CatalogEntryMetadata by calling from_dict on the json representation catalog_entry_metadata_model_dict = CatalogEntryMetadata.from_dict(catalog_entry_metadata_model_json).__dict__ catalog_entry_metadata_model2 = CatalogEntryMetadata(**catalog_entry_metadata_model_dict) # Verify the model instances are equivalent assert catalog_entry_metadata_model == catalog_entry_metadata_model2 # Convert model instance back to dict and verify no loss of data catalog_entry_metadata_model_json2 = catalog_entry_metadata_model.to_dict() assert catalog_entry_metadata_model_json2 == catalog_entry_metadata_model_json class TestCatalogEntryMetadataDeployment(): """ Test Class for CatalogEntryMetadataDeployment """ def test_catalog_entry_metadata_deployment_serialization(self): """ Test serialization/deserialization for CatalogEntryMetadataDeployment """ # Construct dict forms of any model objects needed in order to build this model. broker_model = {} # Broker broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a json representation of a CatalogEntryMetadataDeployment model catalog_entry_metadata_deployment_model_json = {} catalog_entry_metadata_deployment_model_json['location'] = 'testString' catalog_entry_metadata_deployment_model_json['location_url'] = 'testString' catalog_entry_metadata_deployment_model_json['original_location'] = 'testString' catalog_entry_metadata_deployment_model_json['target_crn'] = 'testString' catalog_entry_metadata_deployment_model_json['service_crn'] = 'testString' catalog_entry_metadata_deployment_model_json['mccp_id'] = 'testString' catalog_entry_metadata_deployment_model_json['broker'] = broker_model catalog_entry_metadata_deployment_model_json['supports_rc_migration'] = True catalog_entry_metadata_deployment_model_json['target_network'] = 'testString' # Construct a model instance of CatalogEntryMetadataDeployment by calling from_dict on the json representation catalog_entry_metadata_deployment_model = CatalogEntryMetadataDeployment.from_dict(catalog_entry_metadata_deployment_model_json) assert catalog_entry_metadata_deployment_model != False # Construct a model instance of CatalogEntryMetadataDeployment by calling from_dict on the json representation catalog_entry_metadata_deployment_model_dict = CatalogEntryMetadataDeployment.from_dict(catalog_entry_metadata_deployment_model_json).__dict__ catalog_entry_metadata_deployment_model2 = CatalogEntryMetadataDeployment(**catalog_entry_metadata_deployment_model_dict) # Verify the model instances are equivalent assert catalog_entry_metadata_deployment_model == catalog_entry_metadata_deployment_model2 # Convert model instance back to dict and verify no loss of data catalog_entry_metadata_deployment_model_json2 = catalog_entry_metadata_deployment_model.to_dict() assert catalog_entry_metadata_deployment_model_json2 == catalog_entry_metadata_deployment_model_json class TestCatalogEntryMetadataPricing(): """ Test Class for CatalogEntryMetadataPricing """ def test_catalog_entry_metadata_pricing_serialization(self): """ Test serialization/deserialization for CatalogEntryMetadataPricing """ # Construct dict forms of any model objects needed in order to build this model. price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] starting_price_model = {} # StartingPrice starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] metrics_model = {} # Metrics metrics_model['part_ref'] = 'testString' metrics_model['metric_id'] = 'testString' metrics_model['tier_model'] = 'testString' metrics_model['charge_unit'] = 'testString' metrics_model['charge_unit_name'] = 'testString' metrics_model['charge_unit_quantity'] = 'testString' metrics_model['resource_display_name'] = 'testString' metrics_model['charge_unit_display_name'] = 'testString' metrics_model['usage_cap_qty'] = 38 metrics_model['display_cap'] = 38 metrics_model['effective_from'] = '2020-01-28T18:40:40.123456Z' metrics_model['effective_until'] = '2020-01-28T18:40:40.123456Z' metrics_model['amounts'] = [amount_model] # Construct a json representation of a CatalogEntryMetadataPricing model catalog_entry_metadata_pricing_model_json = {} catalog_entry_metadata_pricing_model_json['type'] = 'testString' catalog_entry_metadata_pricing_model_json['origin'] = 'testString' catalog_entry_metadata_pricing_model_json['starting_price'] = starting_price_model catalog_entry_metadata_pricing_model_json['metrics'] = [metrics_model] # Construct a model instance of CatalogEntryMetadataPricing by calling from_dict on the json representation catalog_entry_metadata_pricing_model = CatalogEntryMetadataPricing.from_dict(catalog_entry_metadata_pricing_model_json) assert catalog_entry_metadata_pricing_model != False # Construct a model instance of CatalogEntryMetadataPricing by calling from_dict on the json representation catalog_entry_metadata_pricing_model_dict = CatalogEntryMetadataPricing.from_dict(catalog_entry_metadata_pricing_model_json).__dict__ catalog_entry_metadata_pricing_model2 = CatalogEntryMetadataPricing(**catalog_entry_metadata_pricing_model_dict) # Verify the model instances are equivalent assert catalog_entry_metadata_pricing_model == catalog_entry_metadata_pricing_model2 # Convert model instance back to dict and verify no loss of data catalog_entry_metadata_pricing_model_json2 = catalog_entry_metadata_pricing_model.to_dict() assert catalog_entry_metadata_pricing_model_json2 == catalog_entry_metadata_pricing_model_json class TestDRMetaData(): """ Test Class for DRMetaData """ def test_dr_meta_data_serialization(self): """ Test serialization/deserialization for DRMetaData """ # Construct a json representation of a DRMetaData model dr_meta_data_model_json = {} dr_meta_data_model_json['dr'] = True dr_meta_data_model_json['description'] = 'testString' # Construct a model instance of DRMetaData by calling from_dict on the json representation dr_meta_data_model = DRMetaData.from_dict(dr_meta_data_model_json) assert dr_meta_data_model != False # Construct a model instance of DRMetaData by calling from_dict on the json representation dr_meta_data_model_dict = DRMetaData.from_dict(dr_meta_data_model_json).__dict__ dr_meta_data_model2 = DRMetaData(**dr_meta_data_model_dict) # Verify the model instances are equivalent assert dr_meta_data_model == dr_meta_data_model2 # Convert model instance back to dict and verify no loss of data dr_meta_data_model_json2 = dr_meta_data_model.to_dict() assert dr_meta_data_model_json2 == dr_meta_data_model_json class TestDeploymentBase(): """ Test Class for DeploymentBase """ def test_deployment_base_serialization(self): """ Test serialization/deserialization for DeploymentBase """ # Construct dict forms of any model objects needed in order to build this model. broker_model = {} # Broker broker_model['name'] = 'testString' broker_model['guid'] = 'testString' # Construct a json representation of a DeploymentBase model deployment_base_model_json = {} deployment_base_model_json['location'] = 'testString' deployment_base_model_json['location_url'] = 'testString' deployment_base_model_json['original_location'] = 'testString' deployment_base_model_json['target_crn'] = 'testString' deployment_base_model_json['service_crn'] = 'testString' deployment_base_model_json['mccp_id'] = 'testString' deployment_base_model_json['broker'] = broker_model deployment_base_model_json['supports_rc_migration'] = True deployment_base_model_json['target_network'] = 'testString' # Construct a model instance of DeploymentBase by calling from_dict on the json representation deployment_base_model = DeploymentBase.from_dict(deployment_base_model_json) assert deployment_base_model != False # Construct a model instance of DeploymentBase by calling from_dict on the json representation deployment_base_model_dict = DeploymentBase.from_dict(deployment_base_model_json).__dict__ deployment_base_model2 = DeploymentBase(**deployment_base_model_dict) # Verify the model instances are equivalent assert deployment_base_model == deployment_base_model2 # Convert model instance back to dict and verify no loss of data deployment_base_model_json2 = deployment_base_model.to_dict() assert deployment_base_model_json2 == deployment_base_model_json class TestEntrySearchResult(): """ Test Class for EntrySearchResult """ def test_entry_search_result_serialization(self): """ Test serialization/deserialization for EntrySearchResult """ # Construct dict forms of any model objects needed in order to build this model. overview_model = {} # Overview overview_model['display_name'] = 'testString' overview_model['long_description'] = 'testString' overview_model['description'] = 'testString' overview_model['featured_description'] = 'testString' image_model = {} # Image image_model['image'] = 'testString' image_model['small_image'] = 'testString' image_model['medium_image'] = 'testString' image_model['feature_image'] = 'testString' provider_model = {} # Provider provider_model['email'] = 'testString' provider_model['name'] = 'testString' provider_model['contact'] = 'testString' provider_model['support_email'] = 'testString' provider_model['phone'] = 'testString' cf_meta_data_model = {} # CFMetaData cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} plan_meta_data_model = {} # PlanMetaData plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} alias_meta_data_model = {} # AliasMetaData alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' source_meta_data_model = {} # SourceMetaData source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' template_meta_data_model = {} # TemplateMetaData template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} bullets_model = {} # Bullets bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 ui_meta_media_model = {} # UIMetaMedia ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model strings_model = {} # Strings strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' urls_model = {} # URLS urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' ui_meta_data_model = {} # UIMetaData ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True dr_meta_data_model = {} # DRMetaData dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' sla_meta_data_model = {} # SLAMetaData sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model callbacks_model = {} # Callbacks callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] starting_price_model = {} # StartingPrice starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] metrics_model = {} # Metrics metrics_model['part_ref'] = 'testString' metrics_model['metric_id'] = 'testString' metrics_model['tier_model'] = 'testString' metrics_model['charge_unit'] = 'testString' metrics_model['charge_unit_name'] = 'testString' metrics_model['charge_unit_quantity'] = 'testString' metrics_model['resource_display_name'] = 'testString' metrics_model['charge_unit_display_name'] = 'testString' metrics_model['usage_cap_qty'] = 38 metrics_model['display_cap'] = 38 metrics_model['effective_from'] = '2020-01-28T18:40:40.123456Z' metrics_model['effective_until'] = '2020-01-28T18:40:40.123456Z' metrics_model['amounts'] = [amount_model] catalog_entry_metadata_pricing_model = {} # CatalogEntryMetadataPricing catalog_entry_metadata_pricing_model['type'] = 'testString' catalog_entry_metadata_pricing_model['origin'] = 'testString' catalog_entry_metadata_pricing_model['starting_price'] = starting_price_model catalog_entry_metadata_pricing_model['metrics'] = [metrics_model] broker_model = {} # Broker broker_model['name'] = 'testString' broker_model['guid'] = 'testString' catalog_entry_metadata_deployment_model = {} # CatalogEntryMetadataDeployment catalog_entry_metadata_deployment_model['location'] = 'testString' catalog_entry_metadata_deployment_model['location_url'] = 'testString' catalog_entry_metadata_deployment_model['original_location'] = 'testString' catalog_entry_metadata_deployment_model['target_crn'] = 'testString' catalog_entry_metadata_deployment_model['service_crn'] = 'testString' catalog_entry_metadata_deployment_model['mccp_id'] = 'testString' catalog_entry_metadata_deployment_model['broker'] = broker_model catalog_entry_metadata_deployment_model['supports_rc_migration'] = True catalog_entry_metadata_deployment_model['target_network'] = 'testString' catalog_entry_metadata_model = {} # CatalogEntryMetadata catalog_entry_metadata_model['rc_compatible'] = True catalog_entry_metadata_model['service'] = cf_meta_data_model catalog_entry_metadata_model['plan'] = plan_meta_data_model catalog_entry_metadata_model['alias'] = alias_meta_data_model catalog_entry_metadata_model['template'] = template_meta_data_model catalog_entry_metadata_model['ui'] = ui_meta_data_model catalog_entry_metadata_model['compliance'] = ['testString'] catalog_entry_metadata_model['sla'] = sla_meta_data_model catalog_entry_metadata_model['callbacks'] = callbacks_model catalog_entry_metadata_model['original_name'] = 'testString' catalog_entry_metadata_model['version'] = 'testString' catalog_entry_metadata_model['other'] = {} catalog_entry_metadata_model['pricing'] = catalog_entry_metadata_pricing_model catalog_entry_metadata_model['deployment'] = catalog_entry_metadata_deployment_model catalog_entry_model = {} # CatalogEntry catalog_entry_model['name'] = 'testString' catalog_entry_model['kind'] = 'service' catalog_entry_model['overview_ui'] = {} catalog_entry_model['images'] = image_model catalog_entry_model['parent_id'] = 'testString' catalog_entry_model['disabled'] = True catalog_entry_model['tags'] = ['testString'] catalog_entry_model['group'] = True catalog_entry_model['provider'] = provider_model catalog_entry_model['active'] = True catalog_entry_model['metadata'] = catalog_entry_metadata_model catalog_entry_model['id'] = 'testString' catalog_entry_model['catalog_crn'] = 'testString' catalog_entry_model['url'] = 'testString' catalog_entry_model['children_url'] = 'testString' catalog_entry_model['geo_tags'] = ['testString'] catalog_entry_model['pricing_tags'] = ['testString'] catalog_entry_model['created'] = '2020-01-28T18:40:40.123456Z' catalog_entry_model['updated'] = '2020-01-28T18:40:40.123456Z' # Construct a json representation of a EntrySearchResult model entry_search_result_model_json = {} entry_search_result_model_json['offset'] = 38 entry_search_result_model_json['limit'] = 38 entry_search_result_model_json['count'] = 38 entry_search_result_model_json['resource_count'] = 38 entry_search_result_model_json['first'] = 'testString' entry_search_result_model_json['last'] = 'testString' entry_search_result_model_json['prev'] = 'testString' entry_search_result_model_json['next'] = 'testString' entry_search_result_model_json['resources'] = [catalog_entry_model] # Construct a model instance of EntrySearchResult by calling from_dict on the json representation entry_search_result_model = EntrySearchResult.from_dict(entry_search_result_model_json) assert entry_search_result_model != False # Construct a model instance of EntrySearchResult by calling from_dict on the json representation entry_search_result_model_dict = EntrySearchResult.from_dict(entry_search_result_model_json).__dict__ entry_search_result_model2 = EntrySearchResult(**entry_search_result_model_dict) # Verify the model instances are equivalent assert entry_search_result_model == entry_search_result_model2 # Convert model instance back to dict and verify no loss of data entry_search_result_model_json2 = entry_search_result_model.to_dict() assert entry_search_result_model_json2 == entry_search_result_model_json class TestImage(): """ Test Class for Image """ def test_image_serialization(self): """ Test serialization/deserialization for Image """ # Construct a json representation of a Image model image_model_json = {} image_model_json['image'] = 'testString' image_model_json['small_image'] = 'testString' image_model_json['medium_image'] = 'testString' image_model_json['feature_image'] = 'testString' # Construct a model instance of Image by calling from_dict on the json representation image_model = Image.from_dict(image_model_json) assert image_model != False # Construct a model instance of Image by calling from_dict on the json representation image_model_dict = Image.from_dict(image_model_json).__dict__ image_model2 = Image(**image_model_dict) # Verify the model instances are equivalent assert image_model == image_model2 # Convert model instance back to dict and verify no loss of data image_model_json2 = image_model.to_dict() assert image_model_json2 == image_model_json class TestMessage(): """ Test Class for Message """ def test_message_serialization(self): """ Test serialization/deserialization for Message """ # Construct dict forms of any model objects needed in order to build this model. visibility_detail_accounts_model = {} # VisibilityDetailAccounts visibility_detail_accounts_model['_accountid_'] = 'testString' visibility_detail_model = {} # VisibilityDetail visibility_detail_model['accounts'] = visibility_detail_accounts_model visibility_model = {} # Visibility visibility_model['restrictions'] = 'testString' visibility_model['owner'] = 'testString' visibility_model['extendable'] = True visibility_model['include'] = visibility_detail_model visibility_model['exclude'] = visibility_detail_model visibility_model['approved'] = True # Construct a json representation of a Message model message_model_json = {} message_model_json['id'] = 'testString' message_model_json['effective'] = visibility_model message_model_json['time'] = '2020-01-28T18:40:40.123456Z' message_model_json['who_id'] = 'testString' message_model_json['who_name'] = 'testString' message_model_json['who_email'] = 'testString' message_model_json['instance'] = 'testString' message_model_json['gid'] = 'testString' message_model_json['type'] = 'testString' message_model_json['message'] = 'testString' message_model_json['data'] = {} # 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 class TestMetrics(): """ Test Class for Metrics """ def test_metrics_serialization(self): """ Test serialization/deserialization for Metrics """ # Construct dict forms of any model objects needed in order to build this model. price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a json representation of a Metrics model metrics_model_json = {} metrics_model_json['part_ref'] = 'testString' metrics_model_json['metric_id'] = 'testString' metrics_model_json['tier_model'] = 'testString' metrics_model_json['charge_unit'] = 'testString' metrics_model_json['charge_unit_name'] = 'testString' metrics_model_json['charge_unit_quantity'] = 'testString' metrics_model_json['resource_display_name'] = 'testString' metrics_model_json['charge_unit_display_name'] = 'testString' metrics_model_json['usage_cap_qty'] = 38 metrics_model_json['display_cap'] = 38 metrics_model_json['effective_from'] = '2020-01-28T18:40:40.123456Z' metrics_model_json['effective_until'] = '2020-01-28T18:40:40.123456Z' metrics_model_json['amounts'] = [amount_model] # Construct a model instance of Metrics by calling from_dict on the json representation metrics_model = Metrics.from_dict(metrics_model_json) assert metrics_model != False # Construct a model instance of Metrics by calling from_dict on the json representation metrics_model_dict = Metrics.from_dict(metrics_model_json).__dict__ metrics_model2 = Metrics(**metrics_model_dict) # Verify the model instances are equivalent assert metrics_model == metrics_model2 # Convert model instance back to dict and verify no loss of data metrics_model_json2 = metrics_model.to_dict() assert metrics_model_json2 == metrics_model_json class TestObjectMetadataSet(): """ Test Class for ObjectMetadataSet """ def test_object_metadata_set_serialization(self): """ Test serialization/deserialization for ObjectMetadataSet """ # Construct dict forms of any model objects needed in order to build this model. cf_meta_data_model = {} # CFMetaData cf_meta_data_model['type'] = 'testString' cf_meta_data_model['iam_compatible'] = True cf_meta_data_model['unique_api_key'] = True cf_meta_data_model['provisionable'] = True cf_meta_data_model['bindable'] = True cf_meta_data_model['async_provisioning_supported'] = True cf_meta_data_model['async_unprovisioning_supported'] = True cf_meta_data_model['requires'] = ['testString'] cf_meta_data_model['plan_updateable'] = True cf_meta_data_model['state'] = 'testString' cf_meta_data_model['service_check_enabled'] = True cf_meta_data_model['test_check_interval'] = 38 cf_meta_data_model['service_key_supported'] = True cf_meta_data_model['cf_guid'] = {} plan_meta_data_model = {} # PlanMetaData plan_meta_data_model['bindable'] = True plan_meta_data_model['reservable'] = True plan_meta_data_model['allow_internal_users'] = True plan_meta_data_model['async_provisioning_supported'] = True plan_meta_data_model['async_unprovisioning_supported'] = True plan_meta_data_model['test_check_interval'] = 38 plan_meta_data_model['single_scope_instance'] = 'testString' plan_meta_data_model['service_check_enabled'] = True plan_meta_data_model['cf_guid'] = {} alias_meta_data_model = {} # AliasMetaData alias_meta_data_model['type'] = 'testString' alias_meta_data_model['plan_id'] = 'testString' source_meta_data_model = {} # SourceMetaData source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' template_meta_data_model = {} # TemplateMetaData template_meta_data_model['services'] = ['testString'] template_meta_data_model['default_memory'] = 38 template_meta_data_model['start_cmd'] = 'testString' template_meta_data_model['source'] = source_meta_data_model template_meta_data_model['runtime_catalog_id'] = 'testString' template_meta_data_model['cf_runtime_id'] = 'testString' template_meta_data_model['template_id'] = 'testString' template_meta_data_model['executable_file'] = 'testString' template_meta_data_model['buildpack'] = 'testString' template_meta_data_model['environment_variables'] = {} bullets_model = {} # Bullets bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 ui_meta_media_model = {} # UIMetaMedia ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model strings_model = {} # Strings strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' urls_model = {} # URLS urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' ui_meta_data_model = {} # UIMetaData ui_meta_data_model['strings'] = {} ui_meta_data_model['urls'] = urls_model ui_meta_data_model['embeddable_dashboard'] = 'testString' ui_meta_data_model['embeddable_dashboard_full_width'] = True ui_meta_data_model['navigation_order'] = ['testString'] ui_meta_data_model['not_creatable'] = True ui_meta_data_model['primary_offering_id'] = 'testString' ui_meta_data_model['accessible_during_provision'] = True ui_meta_data_model['side_by_side_index'] = 38 ui_meta_data_model['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model['hidden'] = True ui_meta_data_model['hide_lite_metering'] = True ui_meta_data_model['no_upgrade_next_step'] = True dr_meta_data_model = {} # DRMetaData dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' sla_meta_data_model = {} # SLAMetaData sla_meta_data_model['terms'] = 'testString' sla_meta_data_model['tenancy'] = 'testString' sla_meta_data_model['provisioning'] = 'testString' sla_meta_data_model['responsiveness'] = 'testString' sla_meta_data_model['dr'] = dr_meta_data_model callbacks_model = {} # Callbacks callbacks_model['controller_url'] = 'testString' callbacks_model['broker_url'] = 'testString' callbacks_model['broker_proxy_url'] = 'testString' callbacks_model['dashboard_url'] = 'testString' callbacks_model['dashboard_data_url'] = 'testString' callbacks_model['dashboard_detail_tab_url'] = 'testString' callbacks_model['dashboard_detail_tab_ext_url'] = 'testString' callbacks_model['service_monitor_api'] = 'testString' callbacks_model['service_monitor_app'] = 'testString' callbacks_model['api_endpoint'] = {} price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] starting_price_model = {} # StartingPrice starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] pricing_set_model = {} # PricingSet pricing_set_model['type'] = 'testString' pricing_set_model['origin'] = 'testString' pricing_set_model['starting_price'] = starting_price_model broker_model = {} # Broker broker_model['name'] = 'testString' broker_model['guid'] = 'testString' deployment_base_model = {} # DeploymentBase deployment_base_model['location'] = 'testString' deployment_base_model['location_url'] = 'testString' deployment_base_model['original_location'] = 'testString' deployment_base_model['target_crn'] = 'testString' deployment_base_model['service_crn'] = 'testString' deployment_base_model['mccp_id'] = 'testString' deployment_base_model['broker'] = broker_model deployment_base_model['supports_rc_migration'] = True deployment_base_model['target_network'] = 'testString' # Construct a json representation of a ObjectMetadataSet model object_metadata_set_model_json = {} object_metadata_set_model_json['rc_compatible'] = True object_metadata_set_model_json['service'] = cf_meta_data_model object_metadata_set_model_json['plan'] = plan_meta_data_model object_metadata_set_model_json['alias'] = alias_meta_data_model object_metadata_set_model_json['template'] = template_meta_data_model object_metadata_set_model_json['ui'] = ui_meta_data_model object_metadata_set_model_json['compliance'] = ['testString'] object_metadata_set_model_json['sla'] = sla_meta_data_model object_metadata_set_model_json['callbacks'] = callbacks_model object_metadata_set_model_json['original_name'] = 'testString' object_metadata_set_model_json['version'] = 'testString' object_metadata_set_model_json['other'] = {} object_metadata_set_model_json['pricing'] = pricing_set_model object_metadata_set_model_json['deployment'] = deployment_base_model # Construct a model instance of ObjectMetadataSet by calling from_dict on the json representation object_metadata_set_model = ObjectMetadataSet.from_dict(object_metadata_set_model_json) assert object_metadata_set_model != False # Construct a model instance of ObjectMetadataSet by calling from_dict on the json representation object_metadata_set_model_dict = ObjectMetadataSet.from_dict(object_metadata_set_model_json).__dict__ object_metadata_set_model2 = ObjectMetadataSet(**object_metadata_set_model_dict) # Verify the model instances are equivalent assert object_metadata_set_model == object_metadata_set_model2 # Convert model instance back to dict and verify no loss of data object_metadata_set_model_json2 = object_metadata_set_model.to_dict() assert object_metadata_set_model_json2 == object_metadata_set_model_json class TestOverview(): """ Test Class for Overview """ def test_overview_serialization(self): """ Test serialization/deserialization for Overview """ # Construct a json representation of a Overview model overview_model_json = {} overview_model_json['display_name'] = 'testString' overview_model_json['long_description'] = 'testString' overview_model_json['description'] = 'testString' overview_model_json['featured_description'] = 'testString' # Construct a model instance of Overview by calling from_dict on the json representation overview_model = Overview.from_dict(overview_model_json) assert overview_model != False # Construct a model instance of Overview by calling from_dict on the json representation overview_model_dict = Overview.from_dict(overview_model_json).__dict__ overview_model2 = Overview(**overview_model_dict) # Verify the model instances are equivalent assert overview_model == overview_model2 # Convert model instance back to dict and verify no loss of data overview_model_json2 = overview_model.to_dict() assert overview_model_json2 == overview_model_json class TestPlanMetaData(): """ Test Class for PlanMetaData """ def test_plan_meta_data_serialization(self): """ Test serialization/deserialization for PlanMetaData """ # Construct a json representation of a PlanMetaData model plan_meta_data_model_json = {} plan_meta_data_model_json['bindable'] = True plan_meta_data_model_json['reservable'] = True plan_meta_data_model_json['allow_internal_users'] = True plan_meta_data_model_json['async_provisioning_supported'] = True plan_meta_data_model_json['async_unprovisioning_supported'] = True plan_meta_data_model_json['test_check_interval'] = 38 plan_meta_data_model_json['single_scope_instance'] = 'testString' plan_meta_data_model_json['service_check_enabled'] = True plan_meta_data_model_json['cf_guid'] = {} # Construct a model instance of PlanMetaData by calling from_dict on the json representation plan_meta_data_model = PlanMetaData.from_dict(plan_meta_data_model_json) assert plan_meta_data_model != False # Construct a model instance of PlanMetaData by calling from_dict on the json representation plan_meta_data_model_dict = PlanMetaData.from_dict(plan_meta_data_model_json).__dict__ plan_meta_data_model2 = PlanMetaData(**plan_meta_data_model_dict) # Verify the model instances are equivalent assert plan_meta_data_model == plan_meta_data_model2 # Convert model instance back to dict and verify no loss of data plan_meta_data_model_json2 = plan_meta_data_model.to_dict() assert plan_meta_data_model_json2 == plan_meta_data_model_json class TestPrice(): """ Test Class for Price """ def test_price_serialization(self): """ Test serialization/deserialization for Price """ # Construct a json representation of a Price model price_model_json = {} price_model_json['quantity_tier'] = 38 price_model_json['Price'] = 72.5 # Construct a model instance of Price by calling from_dict on the json representation price_model = Price.from_dict(price_model_json) assert price_model != False # Construct a model instance of Price by calling from_dict on the json representation price_model_dict = Price.from_dict(price_model_json).__dict__ price_model2 = Price(**price_model_dict) # Verify the model instances are equivalent assert price_model == price_model2 # Convert model instance back to dict and verify no loss of data price_model_json2 = price_model.to_dict() assert price_model_json2 == price_model_json class TestPricingGet(): """ Test Class for PricingGet """ def test_pricing_get_serialization(self): """ Test serialization/deserialization for PricingGet """ # Construct dict forms of any model objects needed in order to build this model. price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] starting_price_model = {} # StartingPrice starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] metrics_model = {} # Metrics metrics_model['part_ref'] = 'testString' metrics_model['metric_id'] = 'testString' metrics_model['tier_model'] = 'testString' metrics_model['charge_unit'] = 'testString' metrics_model['charge_unit_name'] = 'testString' metrics_model['charge_unit_quantity'] = 'testString' metrics_model['resource_display_name'] = 'testString' metrics_model['charge_unit_display_name'] = 'testString' metrics_model['usage_cap_qty'] = 38 metrics_model['display_cap'] = 38 metrics_model['effective_from'] = '2020-01-28T18:40:40.123456Z' metrics_model['effective_until'] = '2020-01-28T18:40:40.123456Z' metrics_model['amounts'] = [amount_model] # Construct a json representation of a PricingGet model pricing_get_model_json = {} pricing_get_model_json['type'] = 'testString' pricing_get_model_json['origin'] = 'testString' pricing_get_model_json['starting_price'] = starting_price_model pricing_get_model_json['metrics'] = [metrics_model] # Construct a model instance of PricingGet by calling from_dict on the json representation pricing_get_model = PricingGet.from_dict(pricing_get_model_json) assert pricing_get_model != False # Construct a model instance of PricingGet by calling from_dict on the json representation pricing_get_model_dict = PricingGet.from_dict(pricing_get_model_json).__dict__ pricing_get_model2 = PricingGet(**pricing_get_model_dict) # Verify the model instances are equivalent assert pricing_get_model == pricing_get_model2 # Convert model instance back to dict and verify no loss of data pricing_get_model_json2 = pricing_get_model.to_dict() assert pricing_get_model_json2 == pricing_get_model_json class TestPricingSet(): """ Test Class for PricingSet """ def test_pricing_set_serialization(self): """ Test serialization/deserialization for PricingSet """ # Construct dict forms of any model objects needed in order to build this model. price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] starting_price_model = {} # StartingPrice starting_price_model['plan_id'] = 'testString' starting_price_model['deployment_id'] = 'testString' starting_price_model['unit'] = 'testString' starting_price_model['amount'] = [amount_model] # Construct a json representation of a PricingSet model pricing_set_model_json = {} pricing_set_model_json['type'] = 'testString' pricing_set_model_json['origin'] = 'testString' pricing_set_model_json['starting_price'] = starting_price_model # Construct a model instance of PricingSet by calling from_dict on the json representation pricing_set_model = PricingSet.from_dict(pricing_set_model_json) assert pricing_set_model != False # Construct a model instance of PricingSet by calling from_dict on the json representation pricing_set_model_dict = PricingSet.from_dict(pricing_set_model_json).__dict__ pricing_set_model2 = PricingSet(**pricing_set_model_dict) # Verify the model instances are equivalent assert pricing_set_model == pricing_set_model2 # Convert model instance back to dict and verify no loss of data pricing_set_model_json2 = pricing_set_model.to_dict() assert pricing_set_model_json2 == pricing_set_model_json class TestProvider(): """ Test Class for Provider """ def test_provider_serialization(self): """ Test serialization/deserialization for Provider """ # Construct a json representation of a Provider model provider_model_json = {} provider_model_json['email'] = 'testString' provider_model_json['name'] = 'testString' provider_model_json['contact'] = 'testString' provider_model_json['support_email'] = 'testString' provider_model_json['phone'] = 'testString' # Construct a model instance of Provider by calling from_dict on the json representation provider_model = Provider.from_dict(provider_model_json) assert provider_model != False # Construct a model instance of Provider by calling from_dict on the json representation provider_model_dict = Provider.from_dict(provider_model_json).__dict__ provider_model2 = Provider(**provider_model_dict) # Verify the model instances are equivalent assert provider_model == provider_model2 # Convert model instance back to dict and verify no loss of data provider_model_json2 = provider_model.to_dict() assert provider_model_json2 == provider_model_json class TestSLAMetaData(): """ Test Class for SLAMetaData """ def test_sla_meta_data_serialization(self): """ Test serialization/deserialization for SLAMetaData """ # Construct dict forms of any model objects needed in order to build this model. dr_meta_data_model = {} # DRMetaData dr_meta_data_model['dr'] = True dr_meta_data_model['description'] = 'testString' # Construct a json representation of a SLAMetaData model sla_meta_data_model_json = {} sla_meta_data_model_json['terms'] = 'testString' sla_meta_data_model_json['tenancy'] = 'testString' sla_meta_data_model_json['provisioning'] = 'testString' sla_meta_data_model_json['responsiveness'] = 'testString' sla_meta_data_model_json['dr'] = dr_meta_data_model # Construct a model instance of SLAMetaData by calling from_dict on the json representation sla_meta_data_model = SLAMetaData.from_dict(sla_meta_data_model_json) assert sla_meta_data_model != False # Construct a model instance of SLAMetaData by calling from_dict on the json representation sla_meta_data_model_dict = SLAMetaData.from_dict(sla_meta_data_model_json).__dict__ sla_meta_data_model2 = SLAMetaData(**sla_meta_data_model_dict) # Verify the model instances are equivalent assert sla_meta_data_model == sla_meta_data_model2 # Convert model instance back to dict and verify no loss of data sla_meta_data_model_json2 = sla_meta_data_model.to_dict() assert sla_meta_data_model_json2 == sla_meta_data_model_json class TestSourceMetaData(): """ Test Class for SourceMetaData """ def test_source_meta_data_serialization(self): """ Test serialization/deserialization for SourceMetaData """ # Construct a json representation of a SourceMetaData model source_meta_data_model_json = {} source_meta_data_model_json['path'] = 'testString' source_meta_data_model_json['type'] = 'testString' source_meta_data_model_json['url'] = 'testString' # Construct a model instance of SourceMetaData by calling from_dict on the json representation source_meta_data_model = SourceMetaData.from_dict(source_meta_data_model_json) assert source_meta_data_model != False # Construct a model instance of SourceMetaData by calling from_dict on the json representation source_meta_data_model_dict = SourceMetaData.from_dict(source_meta_data_model_json).__dict__ source_meta_data_model2 = SourceMetaData(**source_meta_data_model_dict) # Verify the model instances are equivalent assert source_meta_data_model == source_meta_data_model2 # Convert model instance back to dict and verify no loss of data source_meta_data_model_json2 = source_meta_data_model.to_dict() assert source_meta_data_model_json2 == source_meta_data_model_json class TestStartingPrice(): """ Test Class for StartingPrice """ def test_starting_price_serialization(self): """ Test serialization/deserialization for StartingPrice """ # Construct dict forms of any model objects needed in order to build this model. price_model = {} # Price price_model['quantity_tier'] = 38 price_model['Price'] = 72.5 amount_model = {} # Amount amount_model['country'] = 'testString' amount_model['currency'] = 'testString' amount_model['prices'] = [price_model] # Construct a json representation of a StartingPrice model starting_price_model_json = {} starting_price_model_json['plan_id'] = 'testString' starting_price_model_json['deployment_id'] = 'testString' starting_price_model_json['unit'] = 'testString' starting_price_model_json['amount'] = [amount_model] # Construct a model instance of StartingPrice by calling from_dict on the json representation starting_price_model = StartingPrice.from_dict(starting_price_model_json) assert starting_price_model != False # Construct a model instance of StartingPrice by calling from_dict on the json representation starting_price_model_dict = StartingPrice.from_dict(starting_price_model_json).__dict__ starting_price_model2 = StartingPrice(**starting_price_model_dict) # Verify the model instances are equivalent assert starting_price_model == starting_price_model2 # Convert model instance back to dict and verify no loss of data starting_price_model_json2 = starting_price_model.to_dict() assert starting_price_model_json2 == starting_price_model_json class TestStrings(): """ Test Class for Strings """ def test_strings_serialization(self): """ Test serialization/deserialization for Strings """ # Construct dict forms of any model objects needed in order to build this model. bullets_model = {} # Bullets bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 ui_meta_media_model = {} # UIMetaMedia ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model # Construct a json representation of a Strings model strings_model_json = {} strings_model_json['bullets'] = [bullets_model] strings_model_json['media'] = [ui_meta_media_model] strings_model_json['not_creatable_msg'] = 'testString' strings_model_json['not_creatable__robot_msg'] = 'testString' strings_model_json['deprecation_warning'] = 'testString' strings_model_json['popup_warning_message'] = 'testString' strings_model_json['instruction'] = 'testString' # Construct a model instance of Strings by calling from_dict on the json representation strings_model = Strings.from_dict(strings_model_json) assert strings_model != False # Construct a model instance of Strings by calling from_dict on the json representation strings_model_dict = Strings.from_dict(strings_model_json).__dict__ strings_model2 = Strings(**strings_model_dict) # Verify the model instances are equivalent assert strings_model == strings_model2 # Convert model instance back to dict and verify no loss of data strings_model_json2 = strings_model.to_dict() assert strings_model_json2 == strings_model_json class TestTemplateMetaData(): """ Test Class for TemplateMetaData """ def test_template_meta_data_serialization(self): """ Test serialization/deserialization for TemplateMetaData """ # Construct dict forms of any model objects needed in order to build this model. source_meta_data_model = {} # SourceMetaData source_meta_data_model['path'] = 'testString' source_meta_data_model['type'] = 'testString' source_meta_data_model['url'] = 'testString' # Construct a json representation of a TemplateMetaData model template_meta_data_model_json = {} template_meta_data_model_json['services'] = ['testString'] template_meta_data_model_json['default_memory'] = 38 template_meta_data_model_json['start_cmd'] = 'testString' template_meta_data_model_json['source'] = source_meta_data_model template_meta_data_model_json['runtime_catalog_id'] = 'testString' template_meta_data_model_json['cf_runtime_id'] = 'testString' template_meta_data_model_json['template_id'] = 'testString' template_meta_data_model_json['executable_file'] = 'testString' template_meta_data_model_json['buildpack'] = 'testString' template_meta_data_model_json['environment_variables'] = {} # Construct a model instance of TemplateMetaData by calling from_dict on the json representation template_meta_data_model = TemplateMetaData.from_dict(template_meta_data_model_json) assert template_meta_data_model != False # Construct a model instance of TemplateMetaData by calling from_dict on the json representation template_meta_data_model_dict = TemplateMetaData.from_dict(template_meta_data_model_json).__dict__ template_meta_data_model2 = TemplateMetaData(**template_meta_data_model_dict) # Verify the model instances are equivalent assert template_meta_data_model == template_meta_data_model2 # Convert model instance back to dict and verify no loss of data template_meta_data_model_json2 = template_meta_data_model.to_dict() assert template_meta_data_model_json2 == template_meta_data_model_json class TestUIMetaData(): """ Test Class for UIMetaData """ def test_ui_meta_data_serialization(self): """ Test serialization/deserialization for UIMetaData """ # Construct dict forms of any model objects needed in order to build this model. bullets_model = {} # Bullets bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 ui_meta_media_model = {} # UIMetaMedia ui_meta_media_model['caption'] = 'testString' ui_meta_media_model['thumbnail_url'] = 'testString' ui_meta_media_model['type'] = 'testString' ui_meta_media_model['URL'] = 'testString' ui_meta_media_model['source'] = bullets_model strings_model = {} # Strings strings_model['bullets'] = [bullets_model] strings_model['media'] = [ui_meta_media_model] strings_model['not_creatable_msg'] = 'testString' strings_model['not_creatable__robot_msg'] = 'testString' strings_model['deprecation_warning'] = 'testString' strings_model['popup_warning_message'] = 'testString' strings_model['instruction'] = 'testString' urls_model = {} # URLS urls_model['doc_url'] = 'testString' urls_model['instructions_url'] = 'testString' urls_model['api_url'] = 'testString' urls_model['create_url'] = 'testString' urls_model['sdk_download_url'] = 'testString' urls_model['terms_url'] = 'testString' urls_model['custom_create_page_url'] = 'testString' urls_model['catalog_details_url'] = 'testString' urls_model['deprecation_doc_url'] = 'testString' urls_model['dashboard_url'] = 'testString' urls_model['registration_url'] = 'testString' urls_model['apidocsurl'] = 'testString' # Construct a json representation of a UIMetaData model ui_meta_data_model_json = {} ui_meta_data_model_json['strings'] = {} ui_meta_data_model_json['urls'] = urls_model ui_meta_data_model_json['embeddable_dashboard'] = 'testString' ui_meta_data_model_json['embeddable_dashboard_full_width'] = True ui_meta_data_model_json['navigation_order'] = ['testString'] ui_meta_data_model_json['not_creatable'] = True ui_meta_data_model_json['primary_offering_id'] = 'testString' ui_meta_data_model_json['accessible_during_provision'] = True ui_meta_data_model_json['side_by_side_index'] = 38 ui_meta_data_model_json['end_of_service_time'] = '2020-01-28T18:40:40.123456Z' ui_meta_data_model_json['hidden'] = True ui_meta_data_model_json['hide_lite_metering'] = True ui_meta_data_model_json['no_upgrade_next_step'] = True # Construct a model instance of UIMetaData by calling from_dict on the json representation ui_meta_data_model = UIMetaData.from_dict(ui_meta_data_model_json) assert ui_meta_data_model != False # Construct a model instance of UIMetaData by calling from_dict on the json representation ui_meta_data_model_dict = UIMetaData.from_dict(ui_meta_data_model_json).__dict__ ui_meta_data_model2 = UIMetaData(**ui_meta_data_model_dict) # Verify the model instances are equivalent assert ui_meta_data_model == ui_meta_data_model2 # Convert model instance back to dict and verify no loss of data ui_meta_data_model_json2 = ui_meta_data_model.to_dict() assert ui_meta_data_model_json2 == ui_meta_data_model_json class TestUIMetaMedia(): """ Test Class for UIMetaMedia """ def test_ui_meta_media_serialization(self): """ Test serialization/deserialization for UIMetaMedia """ # Construct dict forms of any model objects needed in order to build this model. bullets_model = {} # Bullets bullets_model['title'] = 'testString' bullets_model['description'] = 'testString' bullets_model['icon'] = 'testString' bullets_model['quantity'] = 38 # Construct a json representation of a UIMetaMedia model ui_meta_media_model_json = {} ui_meta_media_model_json['caption'] = 'testString' ui_meta_media_model_json['thumbnail_url'] = 'testString' ui_meta_media_model_json['type'] = 'testString' ui_meta_media_model_json['URL'] = 'testString' ui_meta_media_model_json['source'] = bullets_model # Construct a model instance of UIMetaMedia by calling from_dict on the json representation ui_meta_media_model = UIMetaMedia.from_dict(ui_meta_media_model_json) assert ui_meta_media_model != False # Construct a model instance of UIMetaMedia by calling from_dict on the json representation ui_meta_media_model_dict = UIMetaMedia.from_dict(ui_meta_media_model_json).__dict__ ui_meta_media_model2 = UIMetaMedia(**ui_meta_media_model_dict) # Verify the model instances are equivalent assert ui_meta_media_model == ui_meta_media_model2 # Convert model instance back to dict and verify no loss of data ui_meta_media_model_json2 = ui_meta_media_model.to_dict() assert ui_meta_media_model_json2 == ui_meta_media_model_json class TestURLS(): """ Test Class for URLS """ def test_urls_serialization(self): """ Test serialization/deserialization for URLS """ # Construct a json representation of a URLS model urls_model_json = {} urls_model_json['doc_url'] = 'testString' urls_model_json['instructions_url'] = 'testString' urls_model_json['api_url'] = 'testString' urls_model_json['create_url'] = 'testString' urls_model_json['sdk_download_url'] = 'testString' urls_model_json['terms_url'] = 'testString' urls_model_json['custom_create_page_url'] = 'testString' urls_model_json['catalog_details_url'] = 'testString' urls_model_json['deprecation_doc_url'] = 'testString' urls_model_json['dashboard_url'] = 'testString' urls_model_json['registration_url'] = 'testString' urls_model_json['apidocsurl'] = 'testString' # Construct a model instance of URLS by calling from_dict on the json representation urls_model = URLS.from_dict(urls_model_json) assert urls_model != False # Construct a model instance of URLS by calling from_dict on the json representation urls_model_dict = URLS.from_dict(urls_model_json).__dict__ urls_model2 = URLS(**urls_model_dict) # Verify the model instances are equivalent assert urls_model == urls_model2 # Convert model instance back to dict and verify no loss of data urls_model_json2 = urls_model.to_dict() assert urls_model_json2 == urls_model_json class TestVisibility(): """ Test Class for Visibility """ def test_visibility_serialization(self): """ Test serialization/deserialization for Visibility """ # Construct dict forms of any model objects needed in order to build this model. visibility_detail_accounts_model = {} # VisibilityDetailAccounts visibility_detail_accounts_model['_accountid_'] = 'testString' visibility_detail_model = {} # VisibilityDetail visibility_detail_model['accounts'] = visibility_detail_accounts_model # Construct a json representation of a Visibility model visibility_model_json = {} visibility_model_json['restrictions'] = 'testString' visibility_model_json['owner'] = 'testString' visibility_model_json['extendable'] = True visibility_model_json['include'] = visibility_detail_model visibility_model_json['exclude'] = visibility_detail_model visibility_model_json['approved'] = True # Construct a model instance of Visibility by calling from_dict on the json representation visibility_model = Visibility.from_dict(visibility_model_json) assert visibility_model != False # Construct a model instance of Visibility by calling from_dict on the json representation visibility_model_dict = Visibility.from_dict(visibility_model_json).__dict__ visibility_model2 = Visibility(**visibility_model_dict) # Verify the model instances are equivalent assert visibility_model == visibility_model2 # Convert model instance back to dict and verify no loss of data visibility_model_json2 = visibility_model.to_dict() assert visibility_model_json2 == visibility_model_json class TestVisibilityDetail(): """ Test Class for VisibilityDetail """ def test_visibility_detail_serialization(self): """ Test serialization/deserialization for VisibilityDetail """ # Construct dict forms of any model objects needed in order to build this model. visibility_detail_accounts_model = {} # VisibilityDetailAccounts visibility_detail_accounts_model['_accountid_'] = 'testString' # Construct a json representation of a VisibilityDetail model visibility_detail_model_json = {} visibility_detail_model_json['accounts'] = visibility_detail_accounts_model # Construct a model instance of VisibilityDetail by calling from_dict on the json representation visibility_detail_model = VisibilityDetail.from_dict(visibility_detail_model_json) assert visibility_detail_model != False # Construct a model instance of VisibilityDetail by calling from_dict on the json representation visibility_detail_model_dict = VisibilityDetail.from_dict(visibility_detail_model_json).__dict__ visibility_detail_model2 = VisibilityDetail(**visibility_detail_model_dict) # Verify the model instances are equivalent assert visibility_detail_model == visibility_detail_model2 # Convert model instance back to dict and verify no loss of data visibility_detail_model_json2 = visibility_detail_model.to_dict() assert visibility_detail_model_json2 == visibility_detail_model_json class TestVisibilityDetailAccounts(): """ Test Class for VisibilityDetailAccounts """ def test_visibility_detail_accounts_serialization(self): """ Test serialization/deserialization for VisibilityDetailAccounts """ # Construct a json representation of a VisibilityDetailAccounts model visibility_detail_accounts_model_json = {} visibility_detail_accounts_model_json['_accountid_'] = 'testString' # Construct a model instance of VisibilityDetailAccounts by calling from_dict on the json representation visibility_detail_accounts_model = VisibilityDetailAccounts.from_dict(visibility_detail_accounts_model_json) assert visibility_detail_accounts_model != False # Construct a model instance of VisibilityDetailAccounts by calling from_dict on the json representation visibility_detail_accounts_model_dict = VisibilityDetailAccounts.from_dict(visibility_detail_accounts_model_json).__dict__ visibility_detail_accounts_model2 = VisibilityDetailAccounts(**visibility_detail_accounts_model_dict) # Verify the model instances are equivalent assert visibility_detail_accounts_model == visibility_detail_accounts_model2 # Convert model instance back to dict and verify no loss of data visibility_detail_accounts_model_json2 = visibility_detail_accounts_model.to_dict() assert visibility_detail_accounts_model_json2 == visibility_detail_accounts_model_json # endregion ############################################################################## # End of Model Tests ##############################################################################
55.403686
5,309
0.670396
34,671
306,604
5.542759
0.014652
0.03859
0.061086
0.014518
0.953766
0.928746
0.891801
0.870148
0.849323
0.827634
0
0.012659
0.200268
306,604
5,533
5,310
55.4137
0.771078
0.113381
0
0.777172
0
0.007083
0.43316
0.107066
0
0
0
0
0.072187
1
0.026151
false
0
0.003269
0
0.051757
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
fc0c2a4170724d5b1843e2250ed661beab1b4b26
8,972
py
Python
src/tests/project_test.py
ucsb-cs148-s21/1pm-we-connect
27b4e04c85619f1e369c142c6a93e109f30a13f3
[ "Apache-2.0" ]
null
null
null
src/tests/project_test.py
ucsb-cs148-s21/1pm-we-connect
27b4e04c85619f1e369c142c6a93e109f30a13f3
[ "Apache-2.0" ]
1
2021-05-27T23:37:10.000Z
2021-05-27T23:37:10.000Z
src/tests/project_test.py
ucsb-cs148-s21/1pm-we-connect
27b4e04c85619f1e369c142c6a93e109f30a13f3
[ "Apache-2.0" ]
1
2021-05-28T20:33:13.000Z
2021-05-28T20:33:13.000Z
from ..models import formModel, tagModel, PTRelation from flask import url_for import json def test_post_request(client): form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) assert res.status_code == 200 # returns None if data is not found data = formModel.query.filter_by(projectName="hello").first() # Makes sure data is added properly assert data != None assert data.author == "thanawat" assert data.projectName == "hello" assert data.contactInfo == "111-111-1111" assert data.projectDescription == "hello world" # Makes sure the tags are added properly tag_data = tagModel.query.filter_by(name="hello").first() assert tag_data != None # Makes sure PTRelation is correctly relating posts to tags ptr_data = PTRelation.query.filter_by(projectID=data.id).first() assert ptr_data != None assert ptr_data.tagName == "hello" def test_project_get_request(client): # To use the url_for use <Blueprint-name>.<route name> res = client.get(url_for("route.projects")) # run "pytest -s" to get see print result # to get the response, use: res.json assert res.status_code == 200 # same form object as before. This assumes that the previous post test already ran(whcih adds the form to the database). # This test makes sure that the GET request value matches the POST request value(minus the tags) form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello"} resForm = list(res.json.values())[0] assert form == resForm #Test makes sure multiple tags can get entered def test_post_request(client): form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math,science"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) assert res.status_code == 200 # returns None if data is not found data = formModel.query.filter_by(projectName="hello").first() # Makes sure data is added properly assert data != None assert data.author == "thanawat" assert data.projectName == "hello" assert data.contactInfo == "111-111-1111" assert data.projectDescription == "hello world" # Makes sure the tags are added properly tag_data = tagModel.query.filter_by(name="hello").first() assert tag_data.name == "hello" tag_data = tagModel.query.filter_by(name="cs").first() assert tag_data.name == "cs" tag_data = tagModel.query.filter_by(name="prob").first() assert tag_data.name == "prob" tag_data = tagModel.query.filter_by(name="math").first() assert tag_data.name == "math" tag_data = tagModel.query.filter_by(name="science").first() assert tag_data.name == "science" # Makes sure PTRelation is correctly relating posts to tags ptr_data = PTRelation.query.filter_by(projectID=data.id) assert ptr_data != None for row in ptr_data: assert row.tagName != None #Test checks to see if multiple tags can be returned in a get request def test_getMultipleTags(client): form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math,science" } res = client.get(url_for("route.projects")) assert res.status_code == 200 resForm = list(res.json.values())[0] assert form == resForm #tests top K def test_topKTags(client): #inserting a few forms form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math,science"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) #I don't know if this syntax is right with the / res = client.get(url_for("route.popular/4")) assert res.status_code == 200 #I also don't know the exact return type of res so might be wrong resForm = {"tags": {"hello": 3, "cs":3, "prob":3, "math":2}} assert res == resForm #Note to Surendra - as of writing this the search route doesn't have tags included in the returned dictionary. #I made the test with the expectation that you added it, but if we decide not to, feel free to edit the test def test_searchBySingleTag(client): #inserting a few forms form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math,science"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) form = {"author": "thanawat2", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) form = {"author": "thanawat3", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) #I don't know if this syntax is right with the / res = client.get(url_for("route.search/math")) assert res.status_code == 200 #I also don't know the exact return type of res so might be wrong assert res.values() == { {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math,science"}, {"author": "thanawat2", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math"}, } def test_searchByMultipleTags(client): #inserting a few forms form = {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math,science"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) form = {"author": "thanawat2", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) form = {"author": "thanawat3", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob"} res = client.post( url_for("route.projects"), headers={"Content-Type": "application/json"}, data= json.dumps(form) ) #I don't know if this syntax is right with the / res = client.get(url_for("route.search/science,hello")) assert res.status_code == 200 #I also don't know the exact return type of res so might be wrong assert res.values() == { {"author": "thanawat", "projectName": "hello", "contactInfo": "111-111-1111", "projectDescription": "hello world", "tags": "hello,cs,prob,math,science"}, }
34.507692
142
0.601315
1,061
8,972
5.024505
0.147974
0.060026
0.0574
0.070906
0.82311
0.797599
0.797599
0.763647
0.763647
0.74789
0
0.031944
0.256799
8,972
259
143
34.640927
0.767546
0.156933
0
0.764398
0
0
0.316788
0.027605
0
0
0
0
0.167539
1
0.036649
false
0
0.015707
0
0.052356
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
fc3d0b72db361c3a2220721e3dd696f771a15c8c
25,388
py
Python
code/generate_grammar/hollo1996/NounPhraseGenerator/basicNP.py
Judiiith/semantic_parsing_with_IRTGs
f7f82482d8850ee5e0775af0639c0b4f95ad8226
[ "MIT" ]
5
2019-05-15T08:00:11.000Z
2021-03-31T01:42:02.000Z
code/generate_grammar/hollo1996/NounPhraseGenerator/basicNP.py
Judiiith/semantic_parsing_with_IRTGs
f7f82482d8850ee5e0775af0639c0b4f95ad8226
[ "MIT" ]
null
null
null
code/generate_grammar/hollo1996/NounPhraseGenerator/basicNP.py
Judiiith/semantic_parsing_with_IRTGs
f7f82482d8850ee5e0775af0639c0b4f95ad8226
[ "MIT" ]
3
2018-10-17T10:40:25.000Z
2021-06-04T05:36:01.000Z
from Data import * from Dependency import * from Fourlang import * """ //NounPhrase out of one Word //NP(WD(stuff)) NP -> one_WD(WD) [tree] NP(?1) [ud] ?1 [fourlang] ?1 """ #This is the function that generates 2 wide, 1 high NP-s. def basicUnariNP(): result="" datas=Data.fromFile("Data/Input/NP/np_1x1_trees", "Data/Input/NP/np_1x1_terms", "Data/Input/NP/np_1x1_deps", 1642) uniqData={} for i in range(len(datas)-1,-1,-1): if not (uniqData.keys().__contains__(datas[i].tree.wordLess)): uniqData[datas[i].tree.wordLess]=datas[i] for input in uniqData.values(): result+="\n" result+="//NounPhrase out of one " + input.words[0].type.Longer + ".\n" result+="//" + input.tree.stanford+"\n" result+="//" + input.tree.tagTree+"\n" result+="NP -> one_" + input.words[0].type.Shortest.replace("basic", "") + "(" + input.words[0].type.Shortest + ")\n" result+="[string] ?1\n" result+="[tree] NP(?1)\n" result+="[ud] ?1\n" result+="[fourlang] ?1\n" return result """ //NounPhrase out of a Word1 (whitch is a Modifier1) and a Word2. //(NP (WD1 stuff) (WD2 stuff)) NP -> mod1_WD1_WD2(WD1, WD2) [tree] NP2(?1,?2) [ud] merge(f_dep(merge("(r<root> :mod1 (d<dep>))", r_dep(?1))),?2) [fourlang] merge(f_dep(merge("(r<root> :_ (d<dep>))", r_dep(?1))),?2) """ #This is the function that generates 1 wide, 1 high NP-s. def basicBinaryNP(): reverse = False connected = False sameType = False result = "" datas = Data.fromFile("Data/Input/NP/np_1x2_trees", "Data/Input/NP/np_1x2_terms", "Data/Input/NP/np_1x2_deps", 4633) uniqData = {} for i in range(len(datas)-1,-1,-1): if not (uniqData.keys().__contains__(datas[i].tree.wordLess)): uniqData[datas[i].tree.wordLess] = datas[i] for input in uniqData.values(): result+="\n" connected = len(input.dependencies) > 1 sameType = input.words[0].type.Shortest == input.words[1].type.Shortest if connected: if input.dependencies[1].depType.Shortest == "root": input.dependencies[0], input.dependencies[1] = input.dependencies[1], input.dependencies[0] reverse = input.words[1].word == input.dependencies[0].endWord if not reverse: result += ("//NounPhrase out of a " + input.words[0].type.Longer + " (which is a " + input.dependencies[1].depType.Longest + ") and a " + input.words[1].type.Longer + ".\n") else: result += ("//NounPhrase out of a " + input.words[0].type.Longer + "and a " + input.words[1].type.Longer + " (which is a " + input.dependencies[1].depType.Longest + "). \n") else: if sameType != sameType: result += ("//NounPhrase out of a " + input.words[0].type.Longer + " and a" + input.words[ 1].type.Longer + ".\n") else: result += ("//NounPhrase out of two " + input.words[0].type.Longer + "-s.\n") result += ("//NP2" + input.tree.tagTree[2:] + "\n") result += ("//" + input.tree.stanford + "\n") if len(input.dependencies) <= 1: result += ("NP -> undependent_" + input.words[1].type.Shortest.replace("basic", "") + "_" + input.words[0].type.Shortest.replace("basic", "") + "(" + input.words[1].type.Shortest + "," + input.words[0].type.Shortest + ")\n") else: result += ("NP -> "+Digiter.toDigited(input.dependencies[1].depType.Shortest)+"_" + input.words[1].type.Shortest.replace("basic", "") + "_" + input.words[0].type.Shortest.replace("basic", "") + "(" + input.words[1].type.Shortest + "," + input.words[0].type.Shortest + ")\n") result+="[string] *(?1,?2)\n" result += "[tree] NP2(?1,?2)\n" reverse = input.words[1].word == input.dependencies[0].endWord if connected: if not reverse: result += ("[ud] merge(f_dep(merge(\"(r<root> :" + input.dependencies[ 1].depType.Shortest + " (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[ud] merge(f_dep(merge(\"(r<root> :" + input.dependencies[ 1].depType.Shortest + " (d<dep>))\", r_dep(?1))),?2)\n") else: if not reverse: result += ("[ud] ?1\n") else: result += ("[ud] ?2\n") if connected: if input.dependencies[1].flangType == Fourlang._None: if not reverse: result += ("[fourlang] ?2\n") else: result += ("[fourlang] ?1\n") elif input.dependencies[1].flangType == Fourlang.OneBack_at_TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/AT :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/AT :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?2)))\n") elif input.dependencies[1].flangType == Fourlang.OneBack_has_TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/HAS :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/HAS :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?1))), r_dep1(?2)))\n") elif input.dependencies[1].flangType == Fourlang.OneBack__TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root> :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root> :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?1))), r_dep1(?2)))\n") elif input.dependencies[1].flangType == Fourlang.OneTo_ZeroBack: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :1 (d<dep> :0 (r<root>)))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :1 (d<dep> :0 (r<root>)))\", r_dep(?1))),?2)\n") elif input.dependencies[1].flangType == Fourlang.Zero: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep> :0 (r<root>)))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep> :0 (r<root>)))\", r_dep(?1))),?2)\n") elif input.dependencies[1].flangType == Fourlang.ZeroFlat: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_flat (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_flat (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[1].flangType == Fourlang.ZeroCompound: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_compound (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_compound (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[1].flangType == Fourlang.ZeroTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[1].flangType == Fourlang.UnderTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :_ (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :_ (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[1].flangType == Fourlang.TwoTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :2 (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :2 (d<dep>))\", r_dep(?1))),?2)\n") else: if not reverse: result += ("[fourlang] ?1\n") else: result += ("[fourlang] ?2\n") else: if not reverse: result += ("[fourlang] ?1\n") else: result += ("[fourlang] ?2\n") return result """ 1. Reading in the data 2. format the wordless trees 3. clean data from redundancy 4. sort the data into categories 5. generate the right text depending on the category NP( VB( ), NN( ), NNS( )) """ #This is the function that generates 3 wide, 1 high NP-s. def basicTernaryNPTail(): reverse = False connected = False sameType = False result = "" datas = Data.fromFile("Data/Input/NP/np_1x3_trees", "Data/Input/NP/np_1x3_terms", "Data/Input/NP/np_1x3_deps", 2884) for input in datas: tmp=input.tree.wordLess.split(" ") input.tree.wordLess=tmp[0]+" ...( "+tmp[2]+" "+tmp[3]+" "+tmp[4]+" "+tmp[5]+" "+tmp[6] uniqData = {} for i in range(len(datas)-1,-1,-1): if not (uniqData.keys().__contains__(datas[i].tree.wordLess)): uniqData[datas[i].tree.wordLess] = datas[i] for input in uniqData.values(): input.words.remove(input.words[2]) place=-1 for index in range(0,len(input.dependencies)): if ((input.dependencies[index].startWord == input.words[0].word and input.dependencies[index].endWord == input.words[1].word) or (input.dependencies[index].startWord == input.words[1].word and input.dependencies[index].endWord == input.words[0].word)): place=index if place != -1: input.dependencies=[input.dependencies[place]] else: input.dependencies=[] result+="\n" connected = len(input.dependencies) ==1 sameType = input.words[0].type.Shortest == input.words[1].type.Shortest if connected: reverse = input.words[1].word == input.dependencies[0].startWord if not reverse: result += ("//End of a NounPhrase out of a " + input.words[1].type.Longer + " (which is a " + input.dependencies[0].depType.Longest + ") and a " + input.words[0].type.Longer + ".\n") else: result += ("//End of a NounPhrase End out of a " + input.words[1].type.Longer + "and a " + input.words[0].type.Longer + " (which is a " + input.dependencies[0].depType.Longest + "). \n") else: if sameType != sameType: result += ("//End of a NounPhrase End out of a " + input.words[1].type.Longer + " and a" + input.words[0].type.Longer + ".\n") else: result += ("//End of a NounPhrase End out of two " + input.words[0].type.Longer + "-s.\n") result += ("//NP3" + input.tree.tagTree[2:] + "\n") result += ("//" + input.tree.stanford + "\n") if len(input.dependencies)==1: result += ("NP_BAR -> "+Digiter.toDigited(input.dependencies[0].depType.Shortest)+"_" + input.words[1].type.Shortest.replace("basic", "") + "_" + input.words[0].type.Shortest.replace("basic", "") + "_Tail(" + input.words[1].type.Shortest + "," + input.words[0].type.Shortest + ")\n") else: result += ("NP_BAR -> undependent_" + input.words[1].type.Shortest.replace("basic", "") + "_" + input.words[0].type.Shortest.replace("basic", "") + "_Tail(" + input.words[1].type.Shortest + "," + input.words[0].type.Shortest + ")\n") result+="[string] *(?1,?2)\n" result += "[tree] NP3(*,?1,?2)\n" if connected: if not reverse: result += ("[ud] merge(f_dep(merge(\"(r<root> :" + input.dependencies[ 0].depType.Shortest + " (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[ud] merge(f_dep(merge(\"(r<root> :" + input.dependencies[ 0].depType.Shortest + " (d<dep>))\", r_dep(?1))),?2)\n") else: if not reverse: result += ("[ud] ?1\n") else: result += ("[ud] ?2\n") if connected: if input.dependencies[0].flangType == Fourlang._None: if not reverse: result += ("[fourlang] ?2\n") else: result += ("[fourlang] ?1\n") elif input.dependencies[0].flangType == Fourlang.OneBack_at_TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/AT :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/AT :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?2)))\n") elif input.dependencies[0].flangType == Fourlang.OneBack_has_TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/HAS :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/HAS :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?1))), r_dep1(?2)))\n") elif input.dependencies[0].flangType == Fourlang.OneBack__TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root> :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root> :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?1))), r_dep1(?2)))\n") elif input.dependencies[0].flangType == Fourlang.OneTo_ZeroBack: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :1 (d<dep> :0 (r<root>)))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :1 (d<dep> :0 (r<root>)))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.Zero: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep> :0 (r<root>)))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep> :0 (r<root>)))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.ZeroFlat: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_flat (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_flat (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.ZeroCompound: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_compound (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_compound (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.ZeroTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.UnderTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :_ (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :_ (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.TwoTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :2 (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :2 (d<dep>))\", r_dep(?1))),?2)\n") else: if not reverse: result += ("[fourlang] ?1\n") else: result += ("[fourlang] ?2\n") else: if not reverse: result += ("[fourlang] ?1\n") else: result += ("[fourlang] ?2\n") return result """ NP( VB( ), NN( ), NNS( )) """ def basicTernaryNPComplete(): reverse = False connected = False result = "" datas = Data.fromFile("Data/Input/NP/np_1x3_trees", "Data/Input/NP/np_1x3_terms", "Data/Input/NP/np_1x3_deps", 2884) for input in datas: tmp=input.tree.wordLess.split(" ") input.tree.wordLess=tmp[0]+" "+tmp[1]+" "+tmp[2]+" ...( "+tmp[4]+" ...( "+tmp[6] uniqData = {} for i in range(len(datas)-1,-1,-1): if not (uniqData.keys().__contains__(datas[i].tree.wordLess)): uniqData[datas[i].tree.wordLess] = datas[i] for input in uniqData.values(): input.words.remove(input.words[1]) input.words.remove(input.words[0]) place=-1 for index in range(0,len(input.dependencies)): if ((input.dependencies[index].startWord == input.words[0].word or input.dependencies[index].endWord == input.words[0].word)): place=index break if place != -1: input.dependencies=[input.dependencies[place]] else: input.dependencies=[] if(len(input.dependencies)==0 or input.dependencies[0].depType.Shortest=="root"): print("root") result+="\n" connected = len(input.dependencies) == 1 if connected: reverse = input.words[0].word == input.dependencies[0].endWord if not reverse: result += ("//a long NounPhrase out of a " + input.words[0].type.Longer + " (which is a " + input.dependencies[0].depType.Longest + ") and a NounPhrase Bar.\n") else: result += ("//a long NounPhrase out of a NounPhrase Bar and a " + input.words[0].type.Longer + " (which is a " + input.dependencies[0].depType.Longest + "). \n") else: result += ("//a long NounPhrase out of a " + input.words[0].type.Longer + " and a NounPhrase Bar.\n") result += ("//NP3" + input.tree.tagTree[2:] + "\n") result += ("//" + input.tree.stanford + "\n") if len(input.dependencies)==1: result += ("NP -> "+Digiter.toDigited(input.dependencies[0].depType.Shortest)+"_" + input.words[0].type.Shortest.replace("basic", "") + "_NPBAR_Tail(" + input.words[0].type.Shortest + ", NP_BAR)\n") else: result += ("NP -> unconnected_" + input.words[0].type.Shortest.replace("basic", "") + "_NPBAR(" + input.words[0].type.Shortest + ", NP_BAR)\n") result+="[string] *(?1,?2)\n" result += "[tree] @(?2,?1)\n" if connected: if not reverse: result += ("[ud] merge(f_dep(merge(\"(r<root> :" + input.dependencies[ 0].depType.Shortest + " (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[ud] merge(f_dep(merge(\"(r<root> :" + input.dependencies[ 0].depType.Shortest + " (d<dep>))\", r_dep(?1))),?2)\n") else: if not reverse: result += ("[ud] ?1\n") else: result += ("[ud] ?2\n") if connected: if input.dependencies[0].flangType == Fourlang._None: if not reverse: result += ("[fourlang] ?2\n") else: result += ("[fourlang] ?1\n") elif input.dependencies[0].flangType == Fourlang.OneBack_at_TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/AT :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/AT :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?2)))\n") elif input.dependencies[0].flangType == Fourlang.OneBack_has_TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/HAS :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root>/HAS :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?1))), r_dep1(?2)))\n") elif input.dependencies[0].flangType == Fourlang.OneBack__TwoTo: if not reverse: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root> :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?2))), r_dep1(?1)))\n") else: result += ( "[fourlang] f_dep1(merge(f_dep2(merge(\"(r<root> :1 d1<dep1> :2 (d2<dep2>))\", r_dep2(?1))), r_dep1(?2)))\n") elif input.dependencies[0].flangType == Fourlang.OneTo_ZeroBack: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :1 (d<dep> :0 (r<root>)))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :1 (d<dep> :0 (r<root>)))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.Zero: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep> :0 (r<root>)))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep> :0 (r<root>)))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.ZeroFlat: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_flat (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_flat (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.ZeroCompound: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_compound (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0_compound (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.ZeroTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :0 (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.UnderTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :_ (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :_ (d<dep>))\", r_dep(?1))),?2)\n") elif input.dependencies[0].flangType == Fourlang.TwoTo: if not reverse: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :2 (d<dep>))\", r_dep(?2))),?1)\n") else: result += ("[fourlang] merge(f_dep(merge(\"(r<root> :2 (d<dep>))\", r_dep(?1))),?2)\n") else: if not reverse: result += ("[fourlang] ?1\n") else: result += ("[fourlang] ?2\n") else: if not reverse: result += ("[fourlang] ?1\n") else: result += ("[fourlang] ?2\n") return result
49.976378
151
0.481842
3,077
25,388
3.885278
0.050049
0.033459
0.05688
0.058553
0.939272
0.912422
0.887662
0.882811
0.855625
0.834881
0
0.036692
0.322633
25,388
507
152
50.074951
0.658487
0.006617
0
0.828704
0
0
0.211145
0.032415
0
0
0
0
0
1
0.009259
false
0
0.006944
0
0.025463
0.002315
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
fc45d5ab448e59c8f698c36d7effb9c4dba5eae3
93,766
py
Python
sympy/integrals/rubi/rubi_tests/tests/test_secant.py
gum3ng/sympy
e9414fafa976b26aa0b701a0217ab0f3b561989f
[ "BSD-3-Clause" ]
1
2020-09-09T20:40:17.000Z
2020-09-09T20:40:17.000Z
sympy/integrals/rubi/rubi_tests/tests/test_secant.py
gum3ng/sympy
e9414fafa976b26aa0b701a0217ab0f3b561989f
[ "BSD-3-Clause" ]
14
2018-02-08T10:11:03.000Z
2019-04-16T10:32:46.000Z
sympy/integrals/rubi/rubi_tests/tests/test_secant.py
gum3ng/sympy
e9414fafa976b26aa0b701a0217ab0f3b561989f
[ "BSD-3-Clause" ]
1
2020-09-09T20:41:34.000Z
2020-09-09T20:41:34.000Z
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate(sec(a + b*x), x), x, atanh(sin(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2), x), x, tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3), x), x, tan(a + b*x)*sec(a + b*x)/(S(2)*b) + atanh(sin(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4), x), x, tan(a + b*x)**S(3)/(S(3)*b) + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5), x), x, tan(a + b*x)*sec(a + b*x)**S(3)/(S(4)*b) + S(3)*tan(a + b*x)*sec(a + b*x)/(S(8)*b) + S(3)*atanh(sin(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(6), x), x, tan(a + b*x)**S(5)/(S(5)*b) + S(2)*tan(a + b*x)**S(3)/(S(3)*b) + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(7), x), x, tan(a + b*x)*sec(a + b*x)**S(5)/(S(6)*b) + S(5)*tan(a + b*x)*sec(a + b*x)**S(3)/(S(24)*b) + S(5)*tan(a + b*x)*sec(a + b*x)/(S(16)*b) + S(5)*atanh(sin(a + b*x))/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(8), x), x, tan(a + b*x)**S(7)/(S(7)*b) + S(3)*tan(a + b*x)**S(5)/(S(5)*b) + tan(a + b*x)**S(3)/b + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(7)/2), x), x, -S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(5)*b) + S(2)*sin(a + b*x)*sec(a + b*x)**(S(5)/2)/(S(5)*b) + S(6)*sin(a + b*x)*sqrt(sec(a + b*x))/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(5)/2), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(3)*b) + S(2)*sin(a + b*x)*sec(a + b*x)**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(3)/2), x), x, -S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b + S(2)*sin(a + b*x)*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(a + b*x)), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sec(a + b*x)), x), x, S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-3)/2), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(3)*b) + S(2)*sin(a + b*x)/(S(3)*b*sqrt(sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-5)/2), x), x, S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(5)*b) + S(2)*sin(a + b*x)/(S(5)*b*sec(a + b*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-7)/2), x), x, S(10)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(21)*b) + S(10)*sin(a + b*x)/(S(21)*b*sqrt(sec(a + b*x))) + S(2)*sin(a + b*x)/(S(7)*b*sec(a + b*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(7)/2), x), x, -S(6)*c**S(4)*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))) + S(6)*c**S(3)*sqrt(c*sec(a + b*x))*sin(a + b*x)/(S(5)*b) + S(2)*c*(c*sec(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2), x), x, S(2)*c**S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*c**S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))) + S(2)*c*sqrt(c*sec(a + b*x))*sin(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x)), x), x, S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*sec(a + b*x)), x), x, S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-3)/2), x), x, S(2)*sin(a + b*x)/(S(3)*b*c*sqrt(c*sec(a + b*x))) + S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-5)/2), x), x, S(2)*sin(a + b*x)/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) + S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-7)/2), x), x, S(2)*sin(a + b*x)/(S(7)*b*c*(c*sec(a + b*x))**(S(5)/2)) + S(10)*sin(a + b*x)/(S(21)*b*c**S(3)*sqrt(c*sec(a + b*x))) + S(10)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(21)*b*c**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(4)/3), x), x, S(3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(a + b*x)**S(2))*sin(a + b*x)*sec(a + b*x)**(S(1)/3)/(b*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(2)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(4)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(5)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(7)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(7)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(4)/3), x), x, S(3)*c*(c*sec(a + b*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(2)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*(c*sec(a + b*x))**(S(1)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(1)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(2)*b*(c*sec(a + b*x))**(S(2)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-1)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(4)*b*(c*sec(a + b*x))**(S(4)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-2)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(5)*b*(c*sec(a + b*x))**(S(5)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-4)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(7)*b*(c*sec(a + b*x))**(S(7)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**n, x), x, -Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)*sec(a + b*x)**(n + S(-1))/(b*(-n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**n, x), x, -c*(c*sec(a + b*x))**(n + S(-1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)/(b*(-n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(7)/2), x), x, (sec(x)**S(2))**(S(5)/2)*tan(x)/S(6) + S(5)*(sec(x)**S(2))**(S(3)/2)*tan(x)/S(24) + S(5)*sqrt(sec(x)**S(2))*tan(x)/S(16) + S(5)*asinh(tan(x))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(5)/2), x), x, (sec(x)**S(2))**(S(3)/2)*tan(x)/S(4) + S(3)*sqrt(sec(x)**S(2))*tan(x)/S(8) + S(3)*asinh(tan(x))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(3)/2), x), x, sqrt(sec(x)**S(2))*tan(x)/S(2) + asinh(tan(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(x)**S(2)), x), x, asinh(tan(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sec(x)**S(2)), x), x, tan(x)/sqrt(sec(x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-3)/2), x), x, S(2)*tan(x)/(S(3)*sqrt(sec(x)**S(2))) + tan(x)/(S(3)*(sec(x)**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-5)/2), x), x, S(8)*tan(x)/(S(15)*sqrt(sec(x)**S(2))) + S(4)*tan(x)/(S(15)*(sec(x)**S(2))**(S(3)/2)) + tan(x)/(S(5)*(sec(x)**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-7)/2), x), x, S(16)*tan(x)/(S(35)*sqrt(sec(x)**S(2))) + S(8)*tan(x)/(S(35)*(sec(x)**S(2))**(S(3)/2)) + S(6)*tan(x)/(S(35)*(sec(x)**S(2))**(S(5)/2)) + tan(x)/(S(7)*(sec(x)**S(2))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(7)/2), x), x, S(5)*a**(S(7)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(16) + S(5)*a**S(3)*sqrt(a*sec(x)**S(2))*tan(x)/S(16) + S(5)*a**S(2)*(a*sec(x)**S(2))**(S(3)/2)*tan(x)/S(24) + a*(a*sec(x)**S(2))**(S(5)/2)*tan(x)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(5)/2), x), x, S(3)*a**(S(5)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(8) + S(3)*a**S(2)*sqrt(a*sec(x)**S(2))*tan(x)/S(8) + a*(a*sec(x)**S(2))**(S(3)/2)*tan(x)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(3)/2), x), x, a**(S(3)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(2) + a*sqrt(a*sec(x)**S(2))*tan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(2)), x), x, sqrt(a)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(2)), x), x, tan(x)/sqrt(a*sec(x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-3)/2), x), x, tan(x)/(S(3)*(a*sec(x)**S(2))**(S(3)/2)) + S(2)*tan(x)/(S(3)*a*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-5)/2), x), x, tan(x)/(S(5)*(a*sec(x)**S(2))**(S(5)/2)) + S(4)*tan(x)/(S(15)*a*(a*sec(x)**S(2))**(S(3)/2)) + S(8)*tan(x)/(S(15)*a**S(2)*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-7)/2), x), x, tan(x)/(S(7)*(a*sec(x)**S(2))**(S(7)/2)) + S(6)*tan(x)/(S(35)*a*(a*sec(x)**S(2))**(S(5)/2)) + S(8)*tan(x)/(S(35)*a**S(2)*(a*sec(x)**S(2))**(S(3)/2)) + S(16)*tan(x)/(S(35)*a**S(3)*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(5)/2), x), x, -S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*EllipticE(x/S(2), S(2))*cos(x)**(S(3)/2)/S(195) + S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*sin(x)*cos(x)/S(195) + S(2)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)**S(4)/S(13) + S(22)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)**S(2)/S(117) + S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)/S(585), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(3)/2), x), x, S(10)*a*sqrt(a*sec(x)**S(3))*EllipticF(x/S(2), S(2))*cos(x)**(S(3)/2)/S(21) + S(10)*a*sqrt(a*sec(x)**S(3))*sin(x)/S(21) + S(2)*a*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(3)), x), x, -S(2)*sqrt(a*sec(x)**S(3))*EllipticE(x/S(2), S(2))*cos(x)**(S(3)/2) + S(2)*sqrt(a*sec(x)**S(3))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(3)), x), x, S(2)*EllipticF(x/S(2), S(2))/(S(3)*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*tan(x)/(S(3)*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(-3)/2), x), x, S(14)*EllipticE(x/S(2), S(2))/(S(15)*a*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*sin(x)*cos(x)**S(2)/(S(9)*a*sqrt(a*sec(x)**S(3))) + S(14)*sin(x)/(S(45)*a*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(-5)/2), x), x, S(26)*EllipticF(x/S(2), S(2))/(S(77)*a**S(2)*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*sin(x)*cos(x)**S(5)/(S(15)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(26)*sin(x)*cos(x)**S(3)/(S(165)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(78)*sin(x)*cos(x)/(S(385)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(26)*tan(x)/(S(77)*a**S(2)*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(7)/2), x), x, a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(11)/S(13) + S(6)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(9)/S(11) + S(5)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(7)/S(3) + S(20)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(5)/S(7) + S(3)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3) + S(2)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x) + a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(5)/2), x), x, a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(7)/S(9) + S(4)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(5)/S(7) + S(6)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3)/S(5) + S(4)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)/S(3) + a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(3)/2), x), x, a*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3)/S(5) + S(2)*a*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)/S(3) + a*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(4)), x), x, sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(4)), x), x, x*sec(x)**S(2)/(S(2)*sqrt(a*sec(x)**S(4))) + tan(x)/(S(2)*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(-3)/2), x), x, S(5)*x*sec(x)**S(2)/(S(16)*a*sqrt(a*sec(x)**S(4))) + sin(x)*cos(x)**S(3)/(S(6)*a*sqrt(a*sec(x)**S(4))) + S(5)*sin(x)*cos(x)/(S(24)*a*sqrt(a*sec(x)**S(4))) + S(5)*tan(x)/(S(16)*a*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(-5)/2), x), x, S(63)*x*sec(x)**S(2)/(S(256)*a**S(2)*sqrt(a*sec(x)**S(4))) + sin(x)*cos(x)**S(7)/(S(10)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(9)*sin(x)*cos(x)**S(5)/(S(80)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(21)*sin(x)*cos(x)**S(3)/(S(160)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(21)*sin(x)*cos(x)/(S(128)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(63)*tan(x)/(S(256)*a**S(2)*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((b*sec(c + d*x))**p)**n, x), x, -((b*sec(c + d*x))**p)**n*Hypergeometric2F1(S(1)/2, -n*p/S(2) + S(1)/2, -n*p/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(-n*p + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*sec(c + d*x))**p)**n, x), x, -(a*(b*sec(c + d*x))**p)**n*Hypergeometric2F1(S(1)/2, -n*p/S(2) + S(1)/2, -n*p/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(-n*p + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(4), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(3), x), x, -S(6)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x), x), x, -S(2)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x), x), x, S(2)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(2), x), x, S(2)*b*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(3), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(2)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**S(3), x), x, S(10)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**S(2), x), x, -S(6)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x), x), x, S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2), x), x, -S(2)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x), x), x, S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(2), x), x, S(2)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(3), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b**S(2)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(6), x), x, S(2)*b**S(5)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(3)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**S(2), x), x, S(10)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*b*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x), x), x, -S(6)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2), x), x, S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*b*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x), x), x, -S(2)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(2), x), x, S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(3), x), x, S(2)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(6), x), x, S(2)*b**S(5)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b**S(3)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(7), x), x, S(2)*b**S(6)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(4)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(7)/2), x), x, -S(6)*b**S(4)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b**S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*b*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/sqrt(b*sec(c + d*x)), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/sqrt(b*sec(c + d*x)), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/sqrt(b*sec(c + d*x)), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*sec(c + d*x)), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/sqrt(b*sec(c + d*x)), x), x, S(2)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/sqrt(b*sec(c + d*x)), x), x, S(2)*b*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(3)/sqrt(b*sec(c + d*x)), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(4)/sqrt(b*sec(c + d*x)), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(6)/(b*sec(c + d*x))**(S(3)/2), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(2)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/(b*sec(c + d*x))**(S(3)/2), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/(b*sec(c + d*x))**(S(3)/2), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-3)/2), x), x, S(2)*sin(c + d*x)/(S(3)*b*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*b*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(3)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(7)/(b*sec(c + d*x))**(S(5)/2), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(3)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(4)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(6)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(6)/(b*sec(c + d*x))**(S(5)/2), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/(b*sec(c + d*x))**(S(5)/2), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sin(c + d*x)/(S(3)*b**S(2)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-5)/2), x), x, S(2)*sin(c + d*x)/(S(5)*b*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b**S(2)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*b*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*sin(c + d*x)/(S(45)*b*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-7)/2), x), x, S(2)*sin(c + d*x)/(S(7)*b*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b**S(3)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(9)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(7)/2)/(S(4)*d) + S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(8)*d) + S(3)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(8)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(7)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(3)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x)), x), x, sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), x), x, x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(3)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(5)/2), x), x, x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(7)/2), x), x, -sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(9)/2), x), x, S(3)*x*sqrt(b*sec(c + d*x))/(S(8)*sqrt(sec(c + d*x))) + S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(8)*d*sec(c + d*x)**(S(3)/2)) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(4)*d*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(7)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(7)/2)/(S(4)*d) + S(3)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(8)*d) + S(3)*b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(8)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(5)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(3)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sqrt(sec(c + d*x)), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sqrt(sec(c + d*x)), x), x, b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(3)/2), x), x, b*x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(5)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(7)/2), x), x, b*x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(9)/2), x), x, -b*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(11)/2), x), x, S(3)*b*x*sqrt(b*sec(c + d*x))/(S(8)*sqrt(sec(c + d*x))) + S(3)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(8)*d*sec(c + d*x)**(S(3)/2)) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(4)*d*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(7)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(5)*sec(c + d*x)**(S(9)/2)/(S(5)*d) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(3)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sqrt(sec(c + d*x)), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + b**S(2)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sqrt(sec(c + d*x)), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(3)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(5)/2), x), x, b**S(2)*x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(7)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(9)/2), x), x, b**S(2)*x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(11)/2), x), x, -b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/sqrt(b*sec(c + d*x)), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/sqrt(b*sec(c + d*x)), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/sqrt(b*sec(c + d*x)), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/sqrt(b*sec(c + d*x)), x), x, x*sqrt(sec(c + d*x))/sqrt(b*sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(3)/2)), x), x, x*sqrt(sec(c + d*x))/(S(2)*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(9)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*b*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, x*sqrt(sec(c + d*x))/(b*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sqrt(sec(c + d*x))), x), x, x*sqrt(sec(c + d*x))/(S(2)*b*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*b*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(3)/2)), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*b*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(5)/2)), x), x, S(3)*x*sqrt(sec(c + d*x))/(S(8)*b*sqrt(b*sec(c + d*x))) + S(3)*sin(c + d*x)/(S(8)*b*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))) + sin(c + d*x)/(S(4)*b*d*sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(11)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(9)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, x*sqrt(sec(c + d*x))/(b**S(2)*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/(b*sec(c + d*x))**(S(5)/2), x), x, x*sqrt(sec(c + d*x))/(S(2)*b**S(2)*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(5)/2)*sqrt(sec(c + d*x))), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*b**S(2)*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(3)/2)), x), x, S(3)*x*sqrt(sec(c + d*x))/(S(8)*b**S(2)*sqrt(b*sec(c + d*x))) + S(3)*sin(c + d*x)/(S(8)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))) + sin(c + d*x)/(S(4)*b**S(2)*d*sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x)**S(2), x), x, S(3)*(b*sec(c + d*x))**(S(4)/3)*Hypergeometric2F1(S(-2)/3, S(1)/2, S(1)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x), x), x, S(3)*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*d*(b*sec(c + d*x))**(S(2)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*cos(c + d*x), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(5)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*cos(c + d*x)**S(2), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(4)/3, S(7)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(8)*d*(b*sec(c + d*x))**(S(8)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x)**S(2), x), x, S(3)*(b*sec(c + d*x))**(S(7)/3)*Hypergeometric2F1(S(-7)/6, S(1)/2, S(-1)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x), x), x, S(3)*(b*sec(c + d*x))**(S(4)/3)*Hypergeometric2F1(S(-2)/3, S(1)/2, S(1)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3), x), x, S(3)*b*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*cos(c + d*x), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*d*(b*sec(c + d*x))**(S(2)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*cos(c + d*x)**S(2), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(5)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(1)/3), x), x, S(3)*(b*sec(c + d*x))**(S(2)/3)*Hypergeometric2F1(S(-1)/3, S(1)/2, S(2)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(b*sec(c + d*x))**(S(1)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-1)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*(b*sec(c + d*x))**(S(4)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(7)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(5)/3, S(8)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(10)*d*(b*sec(c + d*x))**(S(10)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(b*d*(b*sec(c + d*x))**(S(1)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*(b*sec(c + d*x))**(S(4)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-4)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(7)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(5)/3, S(8)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(10)*d*(b*sec(c + d*x))**(S(10)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(13)/6, S(19)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(13)*d*(b*sec(c + d*x))**(S(13)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x)**m, x), x, S(3)*b*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(-1)/6, -m/S(2) + S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**m/(d*(S(3)*m + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(2)/3)*sec(c + d*x)**m, x), x, -S(3)*(b*sec(c + d*x))**(S(2)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(1)/6, -m/S(2) + S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-S(3)*m + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x)**m, x), x, -S(3)*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(1)/3, -m/S(2) + S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-S(3)*m + S(2))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(2)/3, -m/S(2) + S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(b*sec(c + d*x))**(S(1)/3)*(-S(3)*m + S(4))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(5)/6, -m/S(2) + S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(b*sec(c + d*x))**(S(2)/3)*(-S(3)*m + S(5))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(7)/6, -m/S(2) + S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-2))/(b*d*(b*sec(c + d*x))**(S(1)/3)*(-S(3)*m + S(7))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**m, x), x, -(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -m/S(2) - n/S(2) + S(1)/2, -m/S(2) - n/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-m - n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**S(2), x), x, (b*sec(c + d*x))**(n + S(1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-1)/2, -n/S(2) + S(1)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(b*d*(n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x), x), x, (b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2), -n/S(2) + S(1), cos(c + d*x)**S(2))*sin(c + d*x)/(d*n*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n, x), x, -b*(b*sec(c + d*x))**(n + S(-1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x), x), x, -b**S(2)*(b*sec(c + d*x))**(n + S(-2))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1), -n/S(2) + S(2), cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(2))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x)**S(2), x), x, -b**S(3)*(b*sec(c + d*x))**(n + S(-3))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(3)/2, -n/S(2) + S(5)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(3))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x)**S(3), x), x, -b**S(4)*(b*sec(c + d*x))**(n + S(-4))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(2), -n/S(2) + S(3), cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(4))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**(S(5)/2), x), x, S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-3)/4, -n/S(2) + S(1)/4, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(d*(S(2)*n + S(3))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**(S(3)/2), x), x, S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-1)/4, -n/S(2) + S(3)/4, cos(c + d*x)**S(2))*sin(c + d*x)*sqrt(sec(c + d*x))/(d*(S(2)*n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sqrt(sec(c + d*x)), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/4, -n/S(2) + S(5)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(1))*sqrt(sin(c + d*x)**S(2))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sqrt(sec(c + d*x)), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(3)/4, -n/S(2) + S(7)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(3))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sec(c + d*x)**(S(3)/2), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(5)/4, -n/S(2) + S(9)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(5))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sec(c + d*x)**(S(5)/2), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(7)/4, -n/S(2) + S(11)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(7))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(7)/2)*sin(a + b*x), x), x, S(2)*d*(d*sec(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(5)/2)*sin(a + b*x), x), x, S(2)*d*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(3)/2)*sin(a + b*x), x), x, S(2)*d*sqrt(d*sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*sec(a + b*x))*sin(a + b*x), x), x, -S(2)*d/(b*sqrt(d*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/sqrt(d*sec(a + b*x)), x), x, -S(2)*d/(S(3)*b*(d*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(5)/2)*sin(a + b*x)**S(3), x), x, S(2)*d**S(3)/(b*sqrt(d*sec(a + b*x))) + S(2)*d*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(9)/2)*sin(a + b*x)**S(3), x), x, -S(2)*d**S(3)*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b) + S(2)*d*(d*sec(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(9)/2), x), x, -S(4)*c*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(7)*b*sqrt(c*sec(a + b*x))) - S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*sqrt(c*sec(a + b*x))) + S(4)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(7)/2), x), x, -S(8)*c*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*sqrt(c*sec(a + b*x))) - S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(c*sec(a + b*x))) + S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2), x), x, -S(2)*c*d*sqrt(d*csc(a + b*x))/(b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x)), x), x, sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/sqrt(d*csc(a + b*x)), x), x, -sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/(d*csc(a + b*x))**(S(3)/2), x), x, -c/(b*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/(d*csc(a + b*x))**(S(5)/2), x), x, -c/(S(2)*b*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(9)/2), x), x, S(64)*c*d**S(5)*sqrt(c*sec(a + b*x))/(S(21)*b*sqrt(d*csc(a + b*x))) - S(16)*c*d**S(3)*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(7)/2), x), x, -S(24)*c**S(2)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(24)*c*d**S(5)*sqrt(c*sec(a + b*x))/(S(5)*b*(d*csc(a + b*x))**(S(3)/2)) - S(12)*c*d**S(3)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))/(S(5)*b) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2), x), x, S(8)*c*d**S(3)*sqrt(c*sec(a + b*x))/(S(3)*b*sqrt(d*csc(a + b*x))) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2), x), x, -S(4)*c**S(2)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(4)*c*d**S(3)*sqrt(c*sec(a + b*x))/(b*(d*csc(a + b*x))**(S(3)/2)) - S(2)*c*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x)), x), x, S(2)*c*d*sqrt(c*sec(a + b*x))/(b*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/sqrt(d*csc(a + b*x)), x), x, -S(2)*c**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*d*sqrt(c*sec(a + b*x))/(b*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/(d*csc(a + b*x))**(S(3)/2), x), x, sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*d**S(2)*sqrt(c*sec(a + b*x))) + S(2)*c*sqrt(c*sec(a + b*x))/(b*d*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/(d*csc(a + b*x))**(S(5)/2), x), x, -S(3)*c**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*sqrt(c*sec(a + b*x))/(b*d*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(9)/2), x), x, S(40)*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(21)*b) + S(40)*c*d**S(5)*(c*sec(a + b*x))**(S(3)/2)/(S(21)*b*sqrt(d*csc(a + b*x))) - S(20)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(7)/2), x), x, S(64)*c*d**S(5)*(c*sec(a + b*x))**(S(3)/2)/(S(15)*b*(d*csc(a + b*x))**(S(3)/2)) - S(16)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))/(S(5)*b) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(5)/2), x), x, S(4)*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b) + S(4)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(d*csc(a + b*x))) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2), x), x, S(8)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*(d*csc(a + b*x))**(S(3)/2)) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x)), x), x, S(2)*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b) + S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/sqrt(d*csc(a + b*x)), x), x, S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/(d*csc(a + b*x))**(S(3)/2), x), x, -c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*d**S(2)) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*d*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/(d*csc(a + b*x))**(S(5)/2), x), x, sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*d*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/sqrt(c*sec(a + b*x)), x), x, -S(8)*c*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*(c*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/sqrt(c*sec(a + b*x)), x), x, -S(4)*c*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*(c*sec(a + b*x))**(S(3)/2)) - S(4)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/sqrt(c*sec(a + b*x)), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*(c*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/sqrt(c*sec(a + b*x)), x), x, -S(2)*c*d*sqrt(d*csc(a + b*x))/(b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/sqrt(c*sec(a + b*x)), x), x, -sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*sqrt(c*sec(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))), x), x, EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(2)*b*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*d**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(3)*b*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(11)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, S(8)*d**S(5)*sqrt(d*csc(a + b*x))/(S(45)*b*c*sqrt(c*sec(a + b*x))) + S(2)*d**S(3)*(d*csc(a + b*x))**(S(5)/2)/(S(45)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d*(d*csc(a + b*x))**(S(9)/2)/(S(9)*b*c*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, S(2)*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(21)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*(c*sec(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*c*sqrt(c*sec(a + b*x))) - d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*d*sqrt(d*csc(a + b*x))/(b*c*sqrt(c*sec(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/(c*sec(a + b*x))**(S(3)/2), x), x, d/(b*c*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))), x), x, d/(S(2)*b*c*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(3)*b*d*(c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x))) + S(1)/(S(6)*b*c*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(12)*b*c**S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(4)*b*d*(c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(3)/(S(16)*b*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(64)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(64)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(128)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(128)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*(c*sec(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, S(6)*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) - S(2)*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) + S(6)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*c*(c*sec(a + b*x))**(S(3)/2)) + sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*c**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*c**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*d*sqrt(d*csc(a + b*x))/(b*c*(c*sec(a + b*x))**(S(3)/2)) - S(3)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/(c*sec(a + b*x))**(S(5)/2), x), x, d/(S(2)*b*c*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*c**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*c**S(2)*sqrt(c*sec(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*c**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*c**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x))), x), x, d/(S(3)*b*c*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(4)*b*d*(c*sec(a + b*x))**(S(7)/2)*sqrt(d*csc(a + b*x))) + S(1)/(S(16)*b*c*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(64)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(64)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(128)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(128)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(5)*b*d*(c*sec(a + b*x))**(S(7)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(1)/(S(10)*b*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(3)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(20)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(7)/2)), x), x, -c/(S(6)*b*d*(c*sec(a + b*x))**(S(7)/2)*(d*csc(a + b*x))**(S(5)/2)) - S(5)*c/(S(48)*b*d**S(3)*(c*sec(a + b*x))**(S(7)/2)*sqrt(d*csc(a + b*x))) + S(5)/(S(192)*b*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(256)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) + S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(256)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) - S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(512)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) + S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(512)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**n*sec(e + f*x)**m, x), x, (cos(e + f*x)**S(2))**(m/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, sin(e + f*x)**S(2))*csc(e + f*x)**(n + S(-1))*sec(e + f*x)**(m + S(1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(e + f*x))**m*csc(e + f*x)**n, x), x, -(a*sec(e + f*x))**m*(sin(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(-m/S(2) + S(1)/2, n/S(2) + S(1)/2, -m/S(2) + S(3)/2, cos(e + f*x)**S(2))*cos(e + f*x)*csc(e + f*x)**(n + S(1))/(f*(-m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*csc(e + f*x))**n*sec(e + f*x)**m, x), x, (b*csc(e + f*x))**n*(cos(e + f*x)**S(2))**(m/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, sin(e + f*x)**S(2))*sin(e + f*x)*sec(e + f*x)**(m + S(1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True)
219.592506
996
0.553793
21,966
93,766
2.311937
0.026996
0.059034
0.058778
0.073606
0.86159
0.857849
0.852946
0.846133
0.842116
0.833235
0
0.045775
0.10651
93,766
426
997
220.107981
0.560391
0.000416
0
0.004773
0
0.002387
0.000886
0
0
0
0
0
0.673031
1
0.002387
false
0
0.052506
0
0.054893
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
8
fc6466b005aae838ae463cd3d6d4e1140ecdfb03
612,170
py
Python
BestMtgDeck/prices_usd.py
ElLorans/Best-MTG-Deck
79170d547982421e5e94a36ed1e76d5db8670c20
[ "Apache-2.0" ]
10
2020-06-30T13:37:03.000Z
2022-01-30T04:13:45.000Z
BestMtgDeck/prices_usd.py
ElLorans/Best-MTG-Deck
79170d547982421e5e94a36ed1e76d5db8670c20
[ "Apache-2.0" ]
11
2021-04-06T05:29:37.000Z
2022-01-02T09:13:40.000Z
BestMtgDeck/prices_usd.py
ElLorans/Best-MTG-Deck
79170d547982421e5e94a36ed1e76d5db8670c20
[ "Apache-2.0" ]
2
2021-04-15T07:52:28.000Z
2021-05-05T19:48:51.000Z
prices_usd = {'black lotus': 6826.21, 'mox sapphire': 2538.67, 'time walk': 1480.89, 'mox jet': 2538.76, 'mox pearl': 1396.26, 'timetwister': 1221.97, 'mox emerald': 2454.05, 'taiga': 103.16, 'serra angel': 0.09, 'underground sea': 280.0, 'mox ruby': 2534.44, 'ancestral recall': 1942.0, 'volcanic island': 267.7, 'time vault': 543.69, 'demonic tutor': 35.63, 'birds of paradise': 10.79, 'tropical island': 215.19, 'bayou': 180.3, 'chaos orb': 896.24, 'savannah': 102.12, 'tundra': 0.25, 'badlands': 0.02, 'vesuvan doppelganger': 6.63, 'the tabernacle at pendrell vale': 1526.41, 'nightmare': 0.1, 'plateau': 87.61, 'wheel of fortune': 0.02, 'scrubland': 100.0, 'mind twist': 0.02, 'shivan dragon': 0.16, 'mahamoti djinn': 0.09, 'mana vault': 82.89, 'gauntlet of might': 399.17, 'bazaar of baghdad': 971.31, 'wrath of god': 5.23, 'juzám djinn': 869.67, "nevinyrral's disk": 0.25, 'forcefield': 217.23, 'swords to plowshares': 1.79, 'sol ring': 1.84, "mishra's workshop": 832.38, 'library of alexandria': 804.35, 'balance': 3.01, 'timber wolves': 0.33, 'braingeyser': 7.59, 'howling mine': 5.87, 'icy manipulator': 0.1, 'hypnotic specter': 1.61, 'lord of atlantis': 24.31, 'cyclopean tomb': 76.7, 'lich': 89.35, 'earthquake': 0.88, 'jayemdae tome': 0.08, 'stasis': 0.22, 'fastbond': 11.25, 'savannah lions': 0.24, 'copy artifact': 26.74, 'winter orb': 14.32, 'counterspell': 1.43, 'royal assassin': 0.98, 'disrupting scepter': 0.24, 'armageddon': 8.43, 'mutavault': 8.31, 'granite gargoyle': 2.11, 'ankh of mishra': 1.69, 'dwarven warriors': 0.11, 'chains of mephistopheles': 473.62, 'black knight': 0.15, 'candelabra of tawnos': 465.13, 'moat': 463.44, 'the abyss': 461.64, 'fork': 15.28, 'crusade': 0.5, 'word of command': 126.93, 'demonic attorney': 1.29, 'lord of the pit': 0.18, 'animate dead': 4.55, 'force of nature': 0.15, 'shatter': 0.01, 'sacrifice': 0.18, 'sedge troll': 3.62, 'meekstone': 6.27, 'white knight': 0.13, 'pirate ship': 0.29, 'kudzu': 1.01, 'drop of honey': 375.47, 'onulet': 0.25, 'berserk': 31.29, 'mana flare': 1.91, 'raging river': 177.48, 'city of brass': 26.53, 'goblin king': 13.13, 'water elemental': 0.08, 'elvish archers': 0.33, 'natural selection': 250.5, 'nether void': 357.53, 'mana short': 2.91, 'disenchant': 0.05, 'uthden troll': 0.14, 'imperial seal': 348.06, 'blaze of glory': 38.36, 'bad moon': 3.27, 'darkpact': 0.88, 'dark ritual': 0.59, 'rock hydra': 2.31, 'black vise': 0.02, 'personal incarnation': 0.24, 'two-headed giant of foriys': 31.12, 'wall of ice': 0.32, 'invoke prejudice': 317.82, 'mana crypt': 159.47, 'serendib efreet': 0.09, 'lightning bolt': 2.47, 'control magic': 0.84, 'channel': 0.5, 'illusionary mask': 143.01, 'fire elemental': 0.01, 'terror': 0.1, "will-o'-the-wisp": 0.32, 'sengir vampire': 0.07, "gaea's cradle": 1110.45, 'guardian beast': 278.35, 'warp artifact': 0.26, "gaea's liege": 0.23, 'purelace': 0.21, 'zombie master': 3.01, 'mox opal': 51.12, 'northern paladin': 0.75, 'regrowth': 0.48, 'eureka': 262.58, 'demonic hordes': 0.02, 'liliana of the veil': 67.17, 'smoke': 1.71, 'diamond valley': 251.59, "mons's goblin raiders": 0.67, 'bog wraith': 0.04, 'verduran enchantress': 3.79, 'the hive': 0.25, 'roc of kher ridges': 1.17, 'contract from below': 2.07, 'dragon whelp': 0.17, 'city in a bottle': 241.7, 'mox diamond': 210.55, 'giant growth': 0.05, 'wild growth': 0.33, 'shahrazad': 522.08, 'power surge': 0.98, 'force of will': 106.09, 'farmstead': 0.25, 'animate artifact': 0.09, 'juggernaut': 0.01, 'righteousness': 0.04, 'volcanic eruption': 0.25, 'jade monolith': 0.26, 'veteran bodyguard': 0.02, 'psionic blast': 6.51, 'mesa pegasus': 0.04, "mishra's factory": 0.06, 'island sanctuary': 0.02, 'nether shadow': 0.02, 'magical hack': 0.43, 'deathlace': 0.22, 'blue elemental blast': 0.24, 'kormus bell': 0.45, 'tranquility': 0.04, 'howl from beyond': 0.04, 'flight': 0.05, 'plague rats': 0.22, 'earthbind': 0.07, 'unholy strength': 0.13, 'holy armor': 0.07, 'guardian angel': 0.02, 'giant spider': 0.01, 'spell blast': 0.02, 'psychic venom': 0.04, 'unsummon': 0.07, 'sleight of mind': 0.22, 'copper tablet': 8.41, 'obsianus golem': 0.08, 'conservator': 0.13, 'blue ward': 0.11, 'burrowing': 0.13, 'lifelace': 0.15, 'thoughtlace': 0.2, 'ice storm': 25.14, 'clockwork beast': 0.18, 'chaoslace': 0.23, 'helm of chatzuk': 0.31, 'living lands': 0.18, 'cavern of souls': 84.83, 'drain power': 0.62, 'web': 0.18, 'aspect of wolf': 0.47, 'snapcaster mage': 50.27, 'teferi, hero of dominaria': 25.05, "all hallow's eve": 173.96, 'liliana, the last hope': 17.33, 'clone': 0.28, "lion's eye diamond": 170.16, 'dingus egg': 0.35, 'blessing': 0.07, 'sunglasses of urza': 0.34, 'capture of jingzhou': 164.33, 'paralyze': 0.06, 'cockatrice': 0.26, 'jace, the mind sculptor': 55.42, 'mirror universe': 161.65, 'jihad': 159.68, 'dwarven demolition team': 0.16, 'chalice of the void': 70.41, 'fog': 0.25, 'fungusaur': 0.27, 'sword of feast and famine': 63.19, 'living artifact': 0.26, 'samite healer': 0.14, 'chandra, torch of defiance': 6.27, 'ali from cairo': 149.38, 'manabarbs': 0.66, 'lotus petal': 4.34, 'karn liberated': 26.21, 'arcbound ravager': 20.0, 'tarmogoyf': 18.8, 'reverse damage': 0.34, 'doran, the siege tower': 4.57, 'erhnam djinn': 0.19, 'goblin balloon brigade': 0.05, 'basalt monolith': 2.57, 'ensnaring bridge': 20.58, 'resurrection': 0.14, 'transmute artifact': 131.72, 'circle of protection: blue': 0.1, 'orcish artillery': 0.15, 'ugin, the spirit dragon': 21.53, 'mana drain': 44.99, 'gwendlyn di corci': 125.83, 'drudge skeletons': 0.25, 'elvish champion': 31.42, 'power artifact': 120.65, 'reconstruction': 0.07, 'craw wurm': 0.07, 'angus mackenzie': 119.67, 'tahngarth, talruum hero': 1.5, 'earth elemental': 0.01, 'old man of the sea': 118.93, 'gloom': 0.14, 'engineered explosives': 16.42, 'sinkhole': 5.23, 'city of traitors': 116.14, 'living plane': 114.76, 'library of leng': 0.02, 'soul net': 0.14, 'crucible of worlds': 38.13, 'chrome mox': 64.25, 'gilded drake': 294.42, "jace, vryn's prodigy": 10.89, 'jace, telepath unbound': 10.89, 'blood moon': 15.88, 'jade statue': 0.24, 'hurricane': 0.51, 'thoughtseize': 12.23, 'liliana of the dark realms': 18.15, 'grim monolith': 336.54, 'thunder spirit': 106.66, 'sword of fire and ice': 51.69, 'noble hierarch': 14.1, 'llanowar elves': 0.86, 'animate wall': 0.21, 'ravages of war': 104.07, 'scroll rack': 16.2, 'grim tutor': 15.87, 'concordant crossroads': 20.05, 'aether vial': 30.62, 'gray ogre': 0.07, 'wurmcoil engine': 22.28, 'karn, scion of urza': 7.61, 'the scarab god': 39.18, 'cursed land': 0.19, 'tsunami': 0.14, 'staff of domination': 2.87, 'land equilibrium': 95.07, 'sylvan library': 42.88, 'chandra, pyromaster': 1.25, 'allosaurus shepherd': 62.34, 'orcish oriflamme': 0.03, 'pyramids': 219.83, 'sword of war and peace': 14.47, 'steel overseer': 0.99, 'keldon warlord': 0.02, 'damnation': 26.37, 'hazezon tamar': 84.31, 'king suleiman': 211.87, 'solemn simulacrum': 1.2, 'dark depths': 15.69, 'sword of light and shadow': 22.9, "serra's sanctum": 290.34, 'ancient tomb': 51.41, 'tamiyo, the moon sage': 13.78, 'hangarback walker': 4.79, 'daze': 0.93, 'zodiac dragon': 80.76, 'nissa, vital force': 6.88, 'lightning greaves': 6.94, 'cryptic command': 17.81, 'sliver queen': 76.5, 'wanderlust': 0.09, 'argivian archaeologist': 75.86, 'ertai, the corrupted': 5.21, 'ajani, caller of the pride': 4.41, 'omniscience': 13.01, 'ifh-bíff efreet': 75.0, 'liliana, untouched by death': 11.04, 'nicol bolas, dragon-god': 7.54, 'skyship weatherlight': 2.55, 'jace, memory adept': 7.47, 'ornithopter': 0.39, 'oblivion stone': 2.85, 'through the breach': 1.85, 'vampiric tutor': 47.43, 'glasses of urza': 0.04, 'elspeth, knight-errant': 13.46, 'in the eye of chaos': 72.6, 'eternal witness': 2.86, 'phantasmal forces': 0.1, 'survival of the fittest': 71.42, 'lure': 0.09, 'living wall': 0.22, 'imperial recruiter': 6.83, 'bitterblossom': 44.34, 'domri, chaos bringer': 1.34, 'serendib djinn': 70.54, 'leovold, emissary of trest': 4.01, 'sphere of resistance': 11.07, 'xiahou dun, the one-eyed': 68.9, 'chromatic lantern': 9.03, 'life from the loam': 13.91, 'steal artifact': 0.18, 'cleanse': 67.17, 'trinisphere': 17.03, "painter's servant": 53.25, 'dack fayden': 20.38, 'pithing needle': 0.84, 'thicket basilisk': 0.08, 'liliana, defiant necromancer': 18.97, 'karakas': 32.56, 'liliana, heretical healer': 18.97, 'platinum angel': 8.86, 'elephant graveyard': 64.24, 'rings of brighthearth': 3.43, 'emrakul, the aeons torn': 44.18, 'nicol bolas, god-pharaoh': 9.01, 'paradox engine': 4.29, "siren's call": 0.11, 'strip mine': 6.35, "ring of ma'rûf": 60.17, 'field of dreams': 204.78, 'wall of brambles': 0.19, "tawnos's coffin": 59.24, 'ley druid': 0.18, "liliana, death's majesty": 1.76, 'wall of water': 0.11, 'earthcraft': 179.26, 'celestial colonnade': 3.47, 'surrender your thoughts': 10.32, 'titania': 149.99, 'cloudstone curio': 50.81, 'wall of swords': 0.09, 'command tower': 0.36, 'air elemental': 0.03, 'urborg, tomb of yawgmoth': 26.44, 'island of wak-wak': 56.75, 'celestial prism': 0.11, 'falling star': 218.95, 'underworld dreams': 0.41, 'sword of body and mind': 13.76, 'rasputin dreamweaver': 55.25, 'wall of stone': 0.3, 'three visits': 5.45, 'the locust god': 3.05, 'misty rainforest': 26.76, 'flashfires': 0.23, 'gideon of the trials': 3.46, 'army of allah': 40.5, 'lady sun': 139.99, 'karma': 0.16, 'diabolic edict': 0.07, 'grindstone': 11.08, 'wrenn and six': 105.92, 'riding the dilu horse': 52.53, 'hazoret the fervent': 1.39, 'liliana vess': 3.71, 'triskelion': 1.42, 'extraplanar lens': 37.41, 'gideon, ally of zendikar': 4.36, 'recall': 0.21, 'groundbreaker': 1.33, "hurkyl's recall": 4.05, 'instill energy': 0.22, 'mikaeus, the unhallowed': 50.3, 'scalding tarn': 31.51, 'wooden sphere': 0.09, 'nicol bolas': 1.63, 'castle': 0.26, 'time spiral': 176.44, 'consecrated sphinx': 33.65, 'nissa, vastwood seer': 10.25, 'nissa, sage animist': 10.25, 'serra avenger': 0.35, 'hellfire': 47.41, 'reanimate': 9.54, 'pact of negation': 10.61, 'garruk, caller of beasts': 8.98, 'wall of air': 0.29, 'kozilek, butcher of truth': 61.93, 'vraska, golgari queen': 2.75, 'iron star': 0.1, 'maelstrom pulse': 1.7, 'spell pierce': 0.25, 'goblin settler': 46.35, 'tetsuo umezawa': 46.24, "yawgmoth's will": 46.16, 'simulacrum': 0.15, 'adun oakenshield': 45.97, 'stifle': 7.39, 'khabál ghoul': 45.83, 'merfolk of the pearl trident': 0.03, 'phantom monster': 0.02, 'consecrate land': 0.35, 'ma chao, western warrior': 292.0, 'sorin markov': 11.83, 'scryb sprites': 0.02, 'lady zhurong, warrior queen': 328.02, 'willow satyr': 44.52, 'enlightened tutor': 42.74, 'sorceress queen': 1.19, 'camouflage': 6.91, 'counterbalance': 13.56, 'nettling imp': 0.39, 'stone giant': 0.05, 'vengevine': 9.99, 'cabal coffers': 18.29, 'divine intervention': 42.88, 'singing tree': 42.72, 'karn, silver golem': 6.3, 'nissa, voice of zendikar': 2.03, 'nissa, worldwaker': 4.35, 'land tax': 31.85, 'verdant catacombs': 22.65, 'noxious gearhulk': 1.01, "uro, titan of nature's wrath": 10.71, 'containment priest': 0.28, 'zhang he, wei general': 179.99, 'ajani, mentor of heroes': 10.64, 'tolarian academy': 41.58, 'search for azcanta': 4.88, 'azcanta, the sunken ruin': 4.88, 'ivory cup': 0.1, 'fireball': 0.2, 'jace beleren': 1.42, "warrior's oath": 389.99, 'static orb': 23.45, 'defense grid': 22.39, 'creeping tar pit': 3.6, 'deathgrip': 0.07, 'feedback': 0.14, 'fulminator mage': 1.42, 'sylvan tutor': 39.8, 'planar bridge': 6.89, 'greed': 0.12, 'kaya, orzhov usurper': 3.15, 'rolling earthquake': 2.47, 'intuition': 39.58, 'torrential gearhulk': 4.9, 'sculpting steel': 0.76, 'chandra, roaring flame': 2.75, 'chandra, fire of kaladesh': 2.75, 'gauntlet of power': 6.44, 'garruk, apex predator': 12.85, 'su-chi': 38.56, 'thrasios, triton hero': 38.45, 'imprison': 38.18, 'nissa, steward of elements': 1.2, "champion's helm": 28.68, 'ydwen efreet': 37.69, 'tezzeret, agent of bolas': 12.71, 'ulamog, the infinite gyre': 61.37, 'rhonas the indomitable': 7.66, 'throne of bone': 0.1, 'ajani steadfast': 6.26, 'ral, izzet viceroy': 0.89, 'sliver legion': 18.17, 'sigarda, host of herons': 16.9, 'vedalken shackles': 8.07, 'entomb': 27.02, 'pestilence': 0.33, 'conversion': 0.1, 'muxus, goblin grandee': 8.61, 'force of negation': 66.3, 'lifeforce': 0.02, "volrath's stronghold": 35.66, 'duplicant': 0.42, 'acid rain': 35.48, 'choke': 3.4, 'raging ravine': 2.04, 'tinybones, trinket thief': 15.9, 'academy rector': 107.17, 'red elemental blast': 4.65, "goryo's vengeance": 2.61, 'tezzeret the seeker': 17.22, 'temporal manipulation': 19.87, 'gaddock teeg': 4.91, 'combustible gearhulk': 0.93, 'mana leak': 0.24, 'abrupt decay': 4.8, 'scavenging ghoul': 0.02, 'kytheon, hero of akros': 3.31, 'gideon, battle-forged': 3.31, 'doomsday': 12.52, 'no mercy': 40.91, 'sword of the ages': 32.33, 'lightning dragon': 1.64, 'capsize': 0.57, "mind's eye": 7.47, 'metalworker': 160.42, 'craterhoof behemoth': 41.58, 'planar gate': 32.07, 'sundering titan': 0.81, 'evil presence': 0.06, 'nicol bolas, planeswalker': 5.34, 'gate to phyrexia': 31.16, "urza's tower": 1.04, 'rhystic study': 33.76, 'circle of protection: red': 0.33, 'nightmare moon': 30.92, 'princess luna': 30.92, 'gravity sphere': 237.95, 'wall of bone': 0.22, 'food chain': 51.64, 'dancing scimitar': 0.15, 'worship': 1.68, 'meng huo, barbarian king': 30.55, "sensei's divining top": 57.93, 'aluren': 30.34, 'rod of ruin': 0.02, 'thalia, guardian of thraben': 2.59, 'yavimaya hollow': 30.23, 'cruel tutor': 43.51, 'lady evangela': 29.92, 'god-eternal oketra': 6.2, 'kitchen finks': 0.7, 'tunnel': 0.09, 'replenish': 104.8, 'diabolic intent': 34.05, 'prodigal sorcerer': 0.12, 'bruvac the grandiloquent': 17.04, 'lifetap': 0.24, 'treva, the renewer': 0.65, 'twiddle': 0.34, 'wall of fire': 0.06, 'yuan shao, the indecisive': 35.0, 'doubling season': 74.08, 'balefire dragon': 27.0, 'green ward': 0.13, "sakashima's student": 55.48, 'tasigur, the golden fang': 0.25, 'princess twilight sparkle': 28.26, 'xun yu, wei advisor': 27.79, 'jace, cunning castaway': 1.69, 'avacyn, angel of hope': 41.09, 'will kenrith': 6.19, 'zhuge jin, wu strategist': 79.5, 'dark confidant': 31.23, 'rarity': 27.83, 'worldly tutor': 23.83, 'emrakul, the promised end': 35.44, "guan yu's 1,000-li march": 27.71, 'ulamog, the ceaseless hunger': 46.26, 'urza, lord high artificer': 40.1, 'chain lightning': 1.5, 'overwhelming forces': 27.49, 'burning of xinye': 1.07, "teferi's protection": 27.42, 'jace, the living guildpact': 0.89, "land's edge": 1.91, 'edgar markov': 27.01, 'kobold overlord': 26.97, 'tymna the weaver': 26.93, 'storm world': 26.85, 'gix': 114.0, 'fishliver oil': 0.1, 'niv-mizzet, the firemind': 0.5, 'red ward': 0.1, 'teferi, master of time': 9.47, 'exploration': 20.91, 'stone-throwing devils': 8.24, 'chandra, flamecaller': 0.52, 'dockside extortionist': 62.89, 'necropotence': 38.68, 'lance': 0.12, 'daretti, ingenious iconoclast': 18.8, 'loyal retainers': 21.53, 'verdurous gearhulk': 0.28, 'tainted pact': 11.27, 'polluted delta': 37.61, 'marsh flats': 17.88, 'lake of the dead': 25.67, 'god-eternal kefnet': 3.44, 'blightsteel colossus': 39.59, 'platinum emperion': 17.17, 'arid mesa': 17.67, 'mad auntie': 0.53, 'dong zhou, the tyrant': 25.04, 'seasoned pyromancer': 32.58, 'jace, unraveler of secrets': 3.94, 'super secret tech': 24.91, 'vindicate': 1.0, 'wolf pack': 24.82, 'duress': 0.03, 'dakkon blackblade': 0.33, 'oubliette': 0.89, 'aladdin': 0.3, 'austere command': 2.51, 'tetravus': 0.49, 'lord of extinction': 7.7, 'wasteland': 27.21, 'aggravated assault': 45.4, 'razorclaw bear': 47.38, 'caverns of despair': 96.77, 'sun ce, young conquerer': 23.8, 'opposition': 8.9, 'fierce guardianship': 42.88, 'the scorpion god': 2.6, 'yellow scarves general': 52.5, 'boil': 2.44, 'god-eternal rhonas': 6.84, 'master of the hunt': 124.99, 'zuo ci, the mocking sage': 165.73, 'stone rain': 0.09, 'bottle of suleiman': 0.02, 'crystal rod': 0.11, 'control of the court': 51.75, 'xantcha': 30.15, 'forbid': 0.67, 'killer bees': 0.18, 'phyrexian dreadnought': 115.16, 'mijae djinn': 0.02, 'zhang liao, hero of hefei': 65.7, 'prismatic vista': 26.69, 'white ward': 0.08, 'exquisite blood': 35.7, "aladdin's lamp": 0.22, 'time elemental': 0.25, 'zhou yu, chief commander': 199.99, 'maze of ith': 10.19, 'relentless assault': 1.21, 'attrition': 12.71, 'memory jar': 11.89, 'telekinesis': 21.95, 'mana matrix': 21.89, 'sindbad': 0.16, "hell's caretaker": 2.43, 'karlov of the ghost council': 13.98, 'voidslime': 8.15, 'aven mindcensor': 1.0, 'treachery': 75.59, 'rowan kenrith': 2.59, 'nicol bolas, the arisen': 27.98, 'nicol bolas, the ravager': 27.98, 'flooded strand': 33.29, 'reset': 21.19, 'horizon canopy': 22.39, 'repentant blacksmith': 0.06, 'bloodstained mire': 33.64, 'slaughter pact': 1.11, 'bloom tender': 35.06, 'wooded foothills': 35.5, 'taunting challenge': 59.58, 'null rod': 20.65, 'rishadan port': 17.34, 'avatar of woe': 2.48, 'command beacon': 4.23, 'shatterstorm': 1.34, 'disintegrate': 0.31, 'primordial hydra': 16.02, 'lu meng, wu general': 20.27, 'lu su, wu advisor': 99.71, 'training grounds': 30.98, 'phyrexian altar': 91.79, 'greater auramancy': 62.74, 'jaya ballard': 0.85, 'stirring wildwood': 0.57, 'zhang fei, fierce warrior': 19.99, 'kindred discovery': 22.7, 'winds of change': 5.02, 'selvala, heart of the wilds': 9.4, 'slashing tiger': 19.81, 'cataclysmic gearhulk': 0.26, 'palinchron': 19.72, 'lu bu, master-at-arms': 5.17, 'el-hajjâj': 0.3, 'desolation angel': 1.51, 'nahiri, the harbinger': 1.53, 'sliver queen, brood mother': 92.5, 'bontu the glorified': 2.61, 'preacher': 19.29, 'city of shadows': 19.23, "sol'kanar the swamp king": 0.26, 'humility': 19.2, 'spinal villain': 19.09, "mirari's wake": 4.2, 'stoneforge mystic': 42.31, 'pang tong, young phoenix""': 18.98, 'hua tuo, honored physician': 0.59, 'borrowing the east wind': 43.94, 'kefnet the mindful': 0.87, 'black ward': 0.12, 'mana confluence': 23.32, 'inkmoth nexus': 37.92, 'goblin lackey': 8.57, 'god-eternal bontu': 5.27, 'emiel the blessed': 12.03, "atraxa, praetors' voice": 24.46, 'marshaling the troops': 54.3, 'oketra the true': 3.27, 'sneak attack': 15.6, 'personal tutor': 18.27, 'zhao zilong, tiger general': 30.0, 'lavaclaw reaches': 2.24, 'disharmony': 17.97, 'diaochan, artful beauty': 83.5, 'rohgahh of kher keep': 17.85, 'breeding pool': 20.24, 'toxic deluge': 20.95, "al-abara's carpet": 17.47, 'kalitas, traitor of ghet': 14.02, 'helm of obedience': 17.26, 'oracle of mul daya': 17.46, 'halfdane': 17.22, "gaea's avenger": 17.2, "jandor's saddlebags": 0.51, 'invisibility': 0.07, 'devastation': 16.31, "kroxa, titan of death's hunger": 19.91, "auntie's hovel": 15.55, 'branching evolution': 9.88, 'thran quarry': 13.23, 'the great henge': 44.53, 'oko, thief of crowns': 11.07, 'fiendish duo': 16.66, 'vedalken orrery': 30.86, 'sun quan, lord of wu': 5.67, 'chromium': 0.42, 'academy ruins': 8.8, 'dryad arbor': 2.49, 'blackcleave cliffs': 30.15, 'nykthos, shrine to nyx': 22.83, 'kaalia of the vast': 17.99, 'nexus of fate': 16.41, 'huang zhong, shu general': 129.62, 'norwood priestess': 16.31, 'sunder': 10.72, 'monastery mentor': 12.64, 'taoist mystic': 28.82, 'vesuva': 9.16, 'contamination': 42.8, 'morphic pool': 31.16, 'spellseeker': 30.5, 'rise of the dark realms': 13.49, "ashnod's altar": 13.94, 'mystical tutor': 21.27, "aladdin's ring": 0.24, 'wyluli wolf': 0.4, 'mycosynth lattice': 33.81, 'mox amber': 30.34, 'shiv': 1.44, 'behold the power of destruction': 17.04, 'all in good time': 14.93, 'grave titan': 10.03, 'goblin wizard': 15.58, 'ragnar': 15.56, 'phyrexian obliterator': 23.21, 'sarkhan unbroken': 14.94, 'expropriate': 18.02, "mirri's guile": 36.1, 'hunting cheetah': 15.38, 'titania, protector of argoth': 1.24, 'blacker lotus': 35.06, 'gideon blackblade': 2.07, 'cursed totem': 0.34, 'primal vigor': 25.61, 'bramble sovereign': 18.85, 'bramblewood paragon': 1.57, 'pixie queen': 127.34, 'divert': 1.61, 'vorinclex, voice of hunger': 23.8, 'junún efreet': 0.16, "chandra, flame's catalyst": 15.07, 'linvala, keeper of silence': 13.91, 'tempest efreet': 0.29, 'cyclonic rift': 28.93, 'north star': 119.31, 'firebreathing': 0.04, 'rofellos, llanowar emissary': 14.68, 'threads of disloyalty': 1.37, 'windswept heath': 24.94, 'merchant ship': 89.48, 'sheoldred, whispering one': 10.89, 'zacama, primal calamity': 31.04, 'recurring nightmare': 14.5, 'geist of saint traft': 0.51, 'xira arien': 0.48, 'livonya silone': 14.39, 'cao ren, wei commander': 199.35, 'nebuchadnezzar': 0.41, 'frozen shade': 0.12, 'the wretched': 0.31, 'surgical extraction': 22.65, 'ghoulcaller gisa': 6.89, 'golgothian sylex': 50.14, 'questing beast': 7.39, 'ebony horse': 0.02, 'ring of immortals': 66.69, 'hallowed fountain': 8.05, 'thrumming stone': 48.42, 'boris devilboon': 13.92, 'maelstrom wanderer': 6.98, 'altar of the brood': 6.86, 'spirit link': 1.84, 'natural order': 14.99, 'island fish jasconius': 0.21, 'mana echoes': 16.23, 'piracy': 27.3, 'kindred dominance': 28.63, 'tawnos': 20.85, 'sandals of abdallah': 239.49, 'ball lightning': 0.73, 'jet medallion': 36.11, 'mind over matter': 48.06, 'captain sisay': 17.85, 'retrofitter foundry': 29.06, 'mana vortex': 13.47, 'petty theft': 11.64, 'brazen borrower': 11.64, 'guan yu, sainted warrior': 13.44, 'archangel of thune': 22.8, 'witch of the moors': 3.63, 'rukh egg': 0.42, 'elesh norn, grand cenobite': 16.34, 'firestorm phoenix': 13.27, 'itlimoc, cradle of the sun': 20.68, 'growing rites of itlimoc': 20.68, 'palladia-mors': 0.37, 'sakura-tribe elder': 1.18, "abu ja'far": 0.23, 'sliver overlord': 41.23, 'shanodin dryads': 0.19, 'the immortal sun': 23.83, 'neyith of the dire hunt': 2.05, 'ramses overdark': 13.01, 'show and tell': 17.16, 'zodiac horse': 46.26, 'typhoon': 40.61, 'elenda, the dusk rose': 24.32, 'sapphire medallion': 30.16, 'nova pentacle': 12.81, 'time warp': 8.83, 'vaevictis asmadi': 0.34, 'jacques le vert': 12.78, 'the chain veil': 14.12, 'ironclaw orcs': 0.04, 'sidar kondo': 17.99, 'pendelhaven': 3.02, 'arcades sabboth': 0.44, 'serra avatar': 0.5, 'phyrexian tower': 18.8, 'knowledge vault': 12.42, 'grove of the burnwillows': 5.48, 'straw soldiers': 11.24, 'vial smasher the fierce': 12.39, 'empty city ruse': 26.42, 'darksteel forge': 16.07, 'gemstone caverns': 25.59, 'tazeem': 7.63, 'pearled unicorn': 0.12, 'resplendent angel': 22.05, "jandor's ring": 0.5, 'blood crypt': 15.18, 'recruiter of the guard': 26.33, 'jeweled bird': 0.41, 'false orders': 2.64, 'tooth, claw, and tail': 24.95, "gaea's blessing": 0.29, 'winding canyons': 33.11, "kongming's contraptions": 58.79, 'desert twister': 0.09, 'parallel lives': 44.42, 'magus of the moon': 3.87, 'omnath, locus of mana': 5.68, 'kaya, ghost assassin': 4.24, 'polluted bonds': 31.4, 'quarum trench gnomes': 53.27, 'meren of clan nel toth': 0.46, 'karador, ghost chieftain': 4.27, 'skithiryx, the blight dragon': 14.09, 'kokusho, the evening star': 19.76, 'sanctum prelate': 12.12, 'yawgmoth, thran physician': 29.46, 'twilight prophet': 40.0, 'vendilion clique': 8.93, 'juxtapose': 0.22, 'divine transformation': 0.05, 'sliver hivelord': 14.55, 'batterskull': 8.33, 'dance, pathetic marionette': 7.36, 'revelation': 0.66, 'anvil of bogardan': 46.59, 'collected company': 16.62, "urza's miter": 11.31, 'ramos, dragon engine': 11.31, 'grave pact': 30.74, 'jovial evil': 64.74, 'watery grave': 11.61, "akroma's memorial": 9.83, 'xenagos, god of revels': 15.06, 'anointed procession': 36.57, 'fellwar stone': 2.64, 'eladamri, lord of leaves': 78.3, 'purphoros, god of the forge': 18.03, 'thassa, god of the sea': 10.79, 'mirri, weatherlight duelist': 11.1, "urza's incubator": 40.02, 'zodiac pig': 41.25, 'oboro, palace in the clouds': 85.48, 'bartel runeaxe': 11.02, 'circle of protection: black': 0.12, 'valakut, the molten pinnacle': 24.45, 'hill giant': 0.03, 'zodiac ox': 56.77, 'healing salve': 0.16, 'bribery': 28.62, 'grizzly bears': 0.13, 'terror of the peaks': 23.14, 'dragonlord dromoka': 29.37, 'skullclamp': 9.44, 'gosta dirk': 48.89, 'power sink': 0.02, 'forbidden orchard': 18.89, 'teferi, time raveler': 18.21, 'carpet of flowers': 21.34, 'ravos, soultender': 10.67, 'cloud key': 3.76, 'eightfold maze': 10.61, "summoner's pact": 3.49, 'deserted temple': 39.46, 'ophiomancer': 19.6, 'weakness': 0.02, 'scourge of the throne': 6.03, 'reflecting pool': 26.59, 'archfiend of despair': 37.07, "herald's horn": 7.82, 'ivory tower': 1.62, 'grand arbiter augustin iv': 20.6, 'sea of clouds': 15.93, 'sunken ruins': 16.77, 'luxury suite': 29.96, 'cursed scroll': 10.41, 'cyclone': 0.27, 'traverse the outlands': 10.11, 'steam vents': 14.41, 'argothian enchantress': 39.29, 'unmask': 14.25, 'true-name nemesis': 4.0, 'lotus vale': 40.46, 'tooth and nail': 24.87, 'mana reflection': 9.39, 'deflecting swat': 40.87, 'alms collector': 9.48, 'finale of devastation': 33.1, 'birthing pod': 14.79, 'strategic planning': 0.01, 'brimaz, king of oreskos': 15.35, 'arena of the ancients': 0.65, 'walking ballista': 14.66, 'heliod, sun-crowned': 19.09, 'dream halls': 10.08, 'squandered resources': 30.0, 'rubinia soulsinger': 0.46, 'atog': 0.29, 'gisela, the broken blade': 19.54, "alhammarret's archive": 6.04, 'lyna': 20.24, 'forethought amulet': 32.92, 'necromancy': 11.81, 'wood elemental': 9.89, 'my crushing masterstroke': 10.29, 'hatred': 50.73, 'ravaging horde': 19.6, 'flying carpet': 0.17, 'knight exemplar': 8.8, 'sea serpent': 0.04, 'goblin guide': 5.19, 'ironroot treefolk': 0.12, 'paradigm shift': 13.03, 'riku of two reflections': 6.53, 'boseiju, who shelters all': 33.17, 'scapeshift': 15.12, "umezawa's jitte": 27.21, 'tithe': 27.49, 'regeneration': 0.24, 'war mammoth': 0.02, 'stomping ground': 9.12, 'arachnogenesis': 30.55, 'brass man': 0.11, 'sorin, imperious bloodlord': 29.03, "assassin's trophy": 12.33, 'athreos, god of passage': 8.72, 'huntmaster of the fells': 21.66, 'ravager of the fells': 21.66, 'burgeoning': 25.77, 'jin-gitaxias, core augur': 17.79, 'death ward': 0.05, "urza's mine": 1.1, 'treasure map': 5.09, 'razaketh, the foulblooded': 23.99, 'treasure cove': 5.09, 'power leak': 0.06, 'song of the dryads': 10.25, 'sunbaked canyon': 19.45, 'griselbrand': 11.1, "patriarch's bidding": 1.63, 'immolating gyre': 0.51, 'forest bear': 36.69, 'elves of deep shadow': 1.83, 'stranglehold': 17.68, 'ashnod': 69.99, 'chandra, awakened inferno': 9.92, 'crovax': 10.97, 'urborg': 9.29, 'imperious perfect': 0.23, 'thought lash': 9.24, 'thawing glaciers': 9.23, 'last chance': 5.87, 'urza': 94.94, 'flawless maneuver': 11.94, 'balance of power': 0.25, 'winter blast': 0.11, 'infinite authority': 40.9, 'thunder dragon': 1.69, 'hydroid krasis': 9.65, 'liliana, dreadhorde general': 32.19, 'khalni hydra': 13.88, 'venser, the sojourner': 8.88, 'serra': 34.99, 'tuknir deathlock': 9.05, 'phantasmal terrain': 0.04, "alchor's tomb": 9.04, 'time stretch': 28.14, 'mu yanling': 8.99, 'deranged hermit': 8.97, 'kess, dissident mage': 2.39, "elspeth, sun's champion": 8.69, 'hermit druid': 8.92, 'all is dust': 7.99, 'eldrazi temple': 6.86, 'deadly rollick': 21.74, 'bronze horse': 0.19, 'bountiful promenade': 17.84, 'isochron scepter': 9.23, "angel's grace": 2.31, 'thassa, deep-dwelling': 11.92, 'empress galina': 19.83, 'animar, soul of elements': 7.74, 'pradesh gypsies': 0.08, 'mold demon': 45.05, 'stream of life': 0.26, 'serpent generator': 0.3, 'jump': 0.07, 'sliver hive': 14.11, 'overgrown tomb': 13.26, 'scorched ruins': 36.7, 'ur-drago': 43.9, 'aura shards': 11.61, 'life matrix': 110.97, 'ranger-captain of eos': 13.31, 'spiritual sanctuary': 42.48, 'thousand-year elixir': 4.63, 'rofellos': 20.99, 'test of endurance': 18.81, 'grand abolisher': 22.95, 'bloodforged battle-axe': 15.18, 'sen triplets': 3.99, 'chaos warp': 2.39, 'queen marchesa': 4.1, 'reverberation': 54.33, 'zurzoth, chaos rider': 0.44, 'it that betrays': 17.14, 'mesmeric orb': 10.29, 'amulet of vigor': 21.81, 'arena rector': 10.62, 'colossus of sardia': 0.22, 'relentless dead': 21.73, "urza's avenger": 0.45, 'primeval titan': 5.39, 'klothys, god of destiny': 7.03, 'fiery islet': 14.07, 'stonehoof chieftain': 13.79, 'ajani, strength of the pride': 11.93, 'bloodchief ascension': 25.57, 'repercussion': 24.78, 'mystic gate': 26.15, 'smothering tithe': 35.27, 'godless shrine': 12.26, 'michiko konda, truth seeker': 27.02, 'breya, etherium shaper': 5.63, 'pillage': 0.14, 'nicol bolas, the deceiver': 8.24, "ezuri's predation": 1.73, 'garruk wildspeaker': 3.52, 'sword of truth and justice': 20.5, 'bane of progress': 4.0, 'the rack': 5.34, 'ancient ziggurat': 4.38, 'carnage tyrant': 8.07, 'thorn of amethyst': 25.8, 'eye for an eye': 0.24, "kolaghan's command": 9.15, 'azusa, lost but seeking': 6.95, 'insectile aberration': 0.24, 'delver of secrets': 0.24, 'bloodghast': 12.24, 'kiki-jiki, mirror breaker': 8.79, 'starfield of nyx': 11.02, 'rapid fire': 24.55, 'master transmuter': 1.78, 'aurelia, the warleader': 18.39, 'sarkhan, dragonsoul': 8.03, "freyalise, llanowar's fury": 5.77, 'sakashima the impostor': 17.87, 'shallow grave': 27.98, 'angelic voices': 0.27, 'ad nauseam': 9.27, 'kalonian hydra': 14.03, 'coat of arms': 16.32, 'arboria': 7.88, 'scrying sheets': 14.23, 'iona, shield of emeria': 6.56, 'my undead horde awakens': 7.39, 'nyxbloom ancient': 16.45, 'lady caleria': 7.85, 'goblin lore': 0.53, 'hurloon minotaur': 0.02, 'pathbreaker ibex': 26.17, 'helix pinnacle': 8.46, 'yawgmoth demon': 0.24, 'sacred foundry': 18.14, 'life': 2.74, 'death': 2.74, 'heavy fog': 7.77, 'leyline of the void': 6.01, 'adanto, the first fort': 3.44, "legion's landing": 3.44, 'johan': 0.35, "yuriko, the tiger's shadow": 5.7, 'waste not': 13.21, "urza's power plant": 1.02, 'goblin recruiter': 5.54, 'hellkite tyrant': 6.31, 'eater of the dead': 7.64, 'lu xun, scholar general': 0.29, 'nurturing peatland': 10.23, 'eladamri': 10.36, 'splinter twin': 9.11, "green sun's zenith": 25.4, 'clockwork avian': 0.3, 'pillar of the paruns': 15.69, 'hexdrinker': 7.92, 'darkslick shores': 16.8, 'ayesha tanaka': 0.26, 'elder gargaroth': 12.65, 'stone catapult': 99.99, 'overburden': 10.74, 'erebos, god of the dead': 13.04, 'lord of lineage': 23.4, 'zuran orb': 0.08, 'bloodline keeper': 23.4, 'sorin, lord of innistrad': 6.07, 'eidolon of the great revel': 17.18, 'doubling cube': 27.69, 'lord of the undead': 22.16, 'magnetic mountain': 0.3, 'embercleave': 5.56, 'ali baba': 0.15, 'false mourning': 56.0, 'blood lust': 0.11, 'commandeer': 18.41, 'ob nixilis, the fallen': 12.77, 'gabriel angelfire': 0.24, 'lighthouse chronologist': 17.34, 'giant tortoise': 0.05, 'corrupt court official': 29.0, 'disrupt decorum': 2.42, 'zodiac tiger': 70.82, 'baneslayer angel': 2.01, 'decree of silence': 10.64, 'sulfurous springs': 19.22, 'mortal flesh is weak': 6.81, 'glimpse of nature': 25.6, 'divine visitation': 9.19, 'dust bowl': 16.11, 'spirebluff canal': 13.57, 'towering titan': 1.55, 'auriok champion': 17.11, 'phyrexian arena': 15.9, 'kozilek, the great distortion': 15.67, 'fyndhorn elves': 0.58, 'archangel of tithes': 11.13, 'wound reflection': 7.03, 'kismet': 0.27, 'avenger of zendikar': 6.08, 'may civilization collapse': 5.95, 'holy strength': 0.06, 'season of the witch': 49.44, 'stangg': 0.11, 'stone calendar': 7.15, 'inniaz, the gale force': 0.14, 'cosmic horror': 0.3, 'sylvan safekeeper': 14.57, 'oasis': 0.11, 'swarmyard': 5.77, 'cascade bluffs': 8.28, 'stolen grain': 7.08, 'prismatic omen': 19.82, 'elven riders': 0.08, 'serum visions': 0.83, 'scathe zombies': 0.04, 'ajani, wise counselor': 7.05, 'tarnished citadel': 26.12, 'trained cheetah': 23.26, 'elder spawn': 31.81, 'carrion ants': 0.11, 'vampire nocturnus': 10.61, 'phenax, god of deception': 7.79, 'mycosynth golem': 18.84, 'the first sliver': 13.95, 'cao cao, lord of wei': 59.2, 'scarecrone': 0.79, 'powerleech': 26.13, 'flying men': 2.45, 'narset transcendent': 7.3, 'grenzo, havoc raiser': 24.49, 'sterling grove': 1.79, 'korvold, fae-cursed king': 8.81, 'blessed sanctuary': 0.62, 'contagion engine': 9.25, 'relic barrier': 0.2, "mishra's war machine": 0.18, 'polyraptor': 15.13, 'lotus cobra': 2.56, 'temple garden': 9.74, 'twilight mire': 11.47, 'warren instigator': 5.09, 'patron wizard': 9.17, 'privileged position': 21.48, 'mazirek, kraul death priest': 4.69, 'spell queller': 3.56, 'sima yi, wei field marshal': 49.99, 'triassic egg': 0.2, "teferi's puzzle box": 7.06, 'demonic consultation': 6.79, 'glimpse the unthinkable': 8.05, 'gauntlets of chaos': 0.21, 'thought-knot seer': 3.67, 'godsend': 10.82, 'homeward path': 12.81, 'faerie artisans': 12.13, 'axelrod gunnarson': 0.2, 'emeria, the sky ruin': 11.32, 'city of solitude': 27.53, 'supreme verdict': 7.86, 'ruby medallion': 27.01, 'my wish is your command': 3.97, 'fetid heath': 8.91, 'reforge the soul': 10.82, 'kira, great glass-spinner': 10.14, 'archive trap': 22.22, 'fiery confluence': 1.77, "minamo, school at water's edge": 16.45, 'lightning phoenix': 0.18, 'nirkana revenant': 5.27, 'kamahl, fist of krosa': 8.32, 'courser of kruphix': 3.17, 'my genius knows no bounds': 8.28, 'whirling dervish': 0.25, 'exhaustion': 0.61, 'nether traitor': 2.32, 'crimson manticore': 0.21, 'serra ascendant': 23.82, 'karmic justice': 11.62, 'nylea, god of the hunt': 6.13, 'war elephant': 0.08, 'sarkhan, fireblood': 8.32, 'azure drake': 0.02, 'defense of the heart': 17.23, 'ink-eyes, servant of oni': 17.93, "tormod's crypt": 0.39, 'nesting dragon': 12.9, 'ephara, god of the polis': 4.71, 'tolaria west': 2.09, 'ward of bones': 14.71, "man-o'-war": 0.09, 'earthshaker giant': 6.4, 'calculating lich': 6.4, "death's shadow": 3.92, 'bastion protector': 2.17, 'the mimeoplasm': 2.36, 'as foretold': 7.03, 'morophon, the boundless': 21.91, 'horn of deafening': 0.15, 'intruder alarm': 8.99, 'oona, queen of the fae': 0.5, 'kindred summons': 2.95, 'back to basics': 11.54, 'ice-fang coatl': 3.49, 'twinblade paladin': 2.63, 'arcum dagsson': 4.18, 'vigor': 8.85, 'unbound flourishing': 6.01, 'blood knight': 0.25, 'iroas, god of victory': 10.99, 'selfless spirit': 10.8, 'vexing shusher': 4.56, 'seachrome coast': 11.29, 'lifeblood hydra': 7.86, 'blade of selves': 18.74, "conqueror's flail": 20.32, 'lifeline': 33.54, 'ajani goldmane': 5.12, 'waterlogged grove': 6.45, 'muldrotha, the gravetide': 5.86, 'field of the dead': 15.24, 'primal beyond': 13.76, 'dragonlord silumgar': 9.98, 'lifeblood': 36.8, 'najeela, the blade-blossom': 9.37, 'rith, the awakener': 0.63, 'echo of eons': 10.73, 'kongming, sleeping dragon""': 0.11, 'deathbringer liege': 0.47, "hero's downfall": 0.28, 'balan, wandering knight': 8.09, 'liliana, the necromancer': 6.08, 'kei takahashi': 0.08, 'darksteel plate': 13.72, 'hall of the bandit lord': 23.54, 'dire undercurrents': 11.86, 'pendrell mists': 16.7, 'vivien, arkbow ranger': 1.88, 'worldspine wurm': 6.78, 'dance of the dead': 6.03, 'necroskitter': 8.53, 'copperline gorge': 8.88, 'cuombajj witches': 0.06, 'firestorm': 22.91, 'skullbriar, the walking grave': 5.66, 'progenitus': 10.71, 'liliana, waker of the dead': 3.89, 'fire-lit thicket': 6.1, 'blooming marsh': 5.79, 'collective brutality': 3.61, 'spire garden': 18.58, 'grasp of fate': 6.14, 'rankle, master of pranks': 3.66, 'tezzeret, master of the bridge': 5.95, 'voice of resurgence': 3.01, 'lich lord of unx': 20.87, 'grim flayer': 3.36, 'gamble': 16.93, 'dragon broodmother': 9.85, 'opalescence': 39.4, 'savor the moment': 19.93, 'liliana, death wielder': 5.9, 'barbarian general': 20.95, 'lord of the void': 12.87, 'thought vessel': 4.27, 'dragonlord atarka': 6.99, 'creature bond': 0.08, 'flusterstorm': 23.32, 'rhys the redeemed': 3.41, 'manamorphose': 3.69, 'energy flux': 0.15, 'dictate of erebos': 14.05, 'temporal mastery': 7.41, 'eye of ugin': 10.68, 'wood elves': 1.25, 'hammer of nazahn': 14.06, 'sidisi, undead vizier': 11.93, 'sentinel': 0.23, 'citanul druid': 5.79, 'cover of darkness': 39.73, 'insurrection': 13.06, 'keranos, god of storms': 4.33, "conjurer's closet": 5.48, 'corsair captain': 0.48, 'awoken horror': 7.96, 'thing in the ice': 7.96, 'balthor the defiled': 9.28, 'mana web': 19.09, 'raise dead': 0.11, 'goblin rabblemaster': 2.93, 'petra sphinx': 0.22, "council's judgment": 2.05, 'ulvenwald hydra': 2.4, 'seedborn muse': 8.77, 'bonescythe sliver': 6.75, 'galerider sliver': 8.85, 'kird ape': 0.14, 'glacial chasm': 2.28, 'elder land wurm': 0.22, 'illusions of grandeur': 5.69, 'botanical sanctum': 5.71, 'hall of gemstone': 22.18, 'neheb, the eternal': 19.58, 'peacekeeper': 28.04, 'mogis, god of slaughter': 9.62, 'sethron, hurloon general': 0.23, 'crypt ghast': 9.84, 'cataclysm': 3.44, 'metallic mimic': 8.68, "mishra's bauble": 9.37, 'akron legionnaire': 0.21, 'righteous fury': 4.79, 'corpse dance': 5.62, 'city of ass': 16.54, 'morphling': 5.61, 'gemstone mine': 7.17, 'koth of the hammer': 4.57, 'desert': 0.14, 'higure, the still wind': 9.92, 'swan song': 13.0, 'crawlspace': 14.4, 'massacre wurm': 4.92, 'robber of the rich': 1.84, 'wei night raiders': 5.52, 'highcliff felidar': 5.51, 'terminus': 1.53, 'dryad of the ilysian grove': 13.84, 'flooded grove': 6.9, "k'rrik, son of yawgmoth": 6.36, 'equilibrium': 8.56, 'sword of sinew and steel': 10.42, 'toothy, imaginary friend': 8.91, 'psionic entity': 0.17, 'panharmonicon': 8.15, 'karn, the great creator': 9.4, 'adarkar wastes': 18.55, 'sylvan caryatid': 4.81, 'asceticism': 13.65, 'serra the benevolent': 9.56, 'tireless tracker': 5.25, 'worldgorger dragon': 14.91, 'reparations': 5.03, 'millstone': 0.08, "cathars' crusade": 5.73, 'braid of fire': 11.7, 'spires of orazca': 3.07, 'thaumatic compass': 3.07, 'tezzeret, artifice master': 7.42, 'godsire': 7.51, 'synapse sliver': 26.4, 'drain life': 0.19, 'stonehewer giant': 4.26, 'meddling mage': 1.39, 'chance encounter': 0.13, 'soul-scar mage': 0.83, 'voodoo doll': 0.16, 'living end': 5.62, 'forced fruition': 10.57, 'whip of erebos': 6.54, 'triumph of the hordes': 5.11, 'pearl medallion': 14.53, 'painful quandary': 13.58, 'kruphix, god of horizons': 4.66, 'torment of hailfire': 16.52, 'hellkite overlord': 6.38, 'legion loyalist': 7.38, 'ajani, inspiring leader': 5.31, 'bronze tablet': 0.25, 'jalum tome': 0.01, 'hammerheim': 5.29, 'phantasmal image': 3.95, 'awakening zone': 3.2, 'puresteel paladin': 6.12, 'arcades, the strategist': 2.66, 'fear': 0.14, 'lyra dawnbringer': 10.38, 'talas warrior': 9.75, 'insidious dreams': 12.31, 'maelstrom nexus': 1.74, 'steely resolve': 21.47, 'retribution of the meek': 12.09, 'chord of calling': 6.42, 'glen elendra archmage': 8.76, 'phyrexian devourer': 5.22, 'karrthus, tyrant of jund': 3.88, 'scion of oona': 8.88, 'wayward swordtooth': 10.85, "geralf's messenger": 13.03, 'endless ranks of the dead': 2.33, 'sorin, vampire lord': 5.19, 'deadeye navigator': 8.46, 'drowned catacomb': 7.67, 'cleansing': 17.43, 'shapeshifter': 0.07, 'wall of opposition': 0.13, 'venser, shaper savant': 2.48, 'obelisk of undoing': 0.16, 'gifts ungiven': 1.69, 'kjeldoran outpost': 5.13, 'reconnaissance': 10.02, 'storm seeker': 0.21, 'ajani, valiant protector': 5.1, 'nissa revane': 11.21, 'path to exile': 4.12, "shizo, death's storehouse": 34.11, 'cruel bargain': 5.07, 'mishra': 16.0, 'tamiyo, field researcher': 6.76, 'undiscovered paradise': 27.27, 'fauna shaman': 11.98, 'absorb': 0.9, "vanquisher's banner": 11.89, 'ertai, wizard adept': 21.06, 'silent clearing': 13.07, 'tempt with vengeance': 8.68, 'darkness': 22.99, 'patron of the vein': 2.24, 'drana, liberator of malakir': 5.71, 'cathedral of serra': 18.53, 'yarok, the desecrated': 11.37, 'zodiac rat': 24.66, 'primal amulet': 9.14, 'vraska, scheming gorgon': 4.95, 'primal wellspring': 9.14, 'selenia': 35.0, 'hinterland harbor': 6.74, 'gravecrawler': 15.04, 'vandalblast': 1.59, 'captivating vampire': 12.79, 'vindictive lich': 6.55, "estrid's invocation": 9.69, 'mox lotus': 19.39, 'rampaging brontodon': 3.32, 'vivien reid': 6.36, 'hardened scales': 8.99, 'furnace of rath': 7.15, 'gisela, blade of goldnight': 1.07, 'kalitas, bloodchief of ghet': 8.54, 'collective restraint': 11.14, 'dakmor sorceress': 4.46, 'razorverge thicket': 6.65, 'rot hulk': 4.87, 'elspeth tirel': 9.8, 'master of cruelties': 8.72, 'lotus bloom': 1.63, 'the royal scions': 1.31, 'ghalta, primal hunger': 2.77, 'fabled passage': 4.26, 'void winnower': 10.52, 'rebirth': 0.29, 'predatory nightstalker': 4.83, 'ashiok, nightmare weaver': 7.09, 'kor haven': 11.53, 'hunting grounds': 12.15, 'goblin sharpshooter': 11.73, 'avacyn, the purifier': 5.31, "curtains' call": 8.15, "nature's will": 30.48, 'teferi, mage of zhalfir': 2.47, 'archangel avacyn': 5.31, 'nim deathmantle': 10.01, 'fluctuator': 0.18, 'dragonlord kolaghan': 9.31, 'spellskite': 4.47, 'bitter ordeal': 17.45, 'wooded bastion': 6.44, 'tinker': 1.94, 'mizzix of the izmagnus': 5.38, 'crumbling ashes': 5.39, 'b.f.m.(v. 2)': 4.75, 'mikaeus, the lunarch': 0.95, 'dismiss': 0.18, 'door of destinies': 15.02, 'teleport': 0.23, 'words of wind': 5.33, 'kels, fight fixer': 0.88, 'propaganda': 3.02, 'force of vigor': 24.99, 'ohran frostfang': 9.38, 'rest in peace': 6.76, 'strategy, schmategy': 0.23, 'blasphemous act': 2.32, 'brimstone dragon': 0.15, 'ashiok, nightmare muse': 3.99, 'omnath, locus of rage': 1.94, 'liu bei, lord of shu': 4.7, 'sarkhan vol': 7.53, 'phelddagrif': 4.68, 'coral helm': 0.17, 'urabrask the hidden': 8.7, 'riptide laboratory': 0.28, 'kaervek the merciless': 0.78, 'shivan reef': 0.87, 'bruse tarl, boorish herder': 4.64, "ashnod's coupon": 8.51, 'sedge sliver': 0.71, 'throat slitter': 7.23, 'spike weaver': 5.44, 'mangara, the diplomat': 10.73, 'crested sunmare': 4.96, 'presence of the master': 0.3, 'fiery emancipation': 19.45, 'b.f.m.(v. 1)': 4.6, 'maelstrom archangel': 1.15, "ambition's cost": 0.2, 'krark-clan ironworks': 23.04, 'eldrazi monument': 9.51, 'hallowed spiritkeeper': 1.16, 'altar of dementia': 10.85, 'lone wolf': 0.16, 'arclight phoenix': 5.53, "orim's chant": 20.46, 'caged sun': 6.82, 'heroic intervention': 9.85, 'shaman of forgotten ways': 6.77, 'comeuppance': 11.14, 'coalition relic': 1.51, 'primeval bounty': 1.78, 'miren, the moaning well': 18.63, 'petrified field': 6.45, "black sun's zenith": 6.37, 'ghostway': 14.16, 'veil of summer': 7.32, 'a display of my dark power': 7.87, 'eldrazi conscription': 9.68, 'brushland': 15.99, "chandra, flame's fury": 4.51, 'fractured identity': 5.48, 'fracturing gust': 11.77, 'crystalline sliver': 3.32, 'gilt-leaf palace': 9.71, 'debt of loyalty': 20.67, 'council of advisors': 9.76, 'akroma, angel of wrath': 1.37, 'greater good': 1.83, 'rugged prairie': 5.37, 'primalcrux': 6.11, "descendants' path": 10.26, 'atzal, cave of eternity': 5.42, "gishath, sun's avatar": 18.79, 'journey to eternity': 5.42, 'black market': 5.18, 'unwinding clock': 9.48, 'baleful strix': 1.72, 'didgeridoo': 4.45, 'mystic remora': 4.44, 'ormos, archive keeper': 0.2, 'liliana, death mage': 4.43, "illusionist's bracers": 8.48, 'infernal tutor': 7.4, 'borrowing 100,000 arrows': 0.12, 'nalathni dragon': 4.43, 'glacial fortress': 3.54, 'solitary confinement': 0.26, 'great whale': 25.79, 'anguished unmaking': 8.07, "lim-dûl's vault": 8.38, 'snuff out': 10.07, 'noxious revival': 11.28, 'giver of runes': 5.68, 'parallax wave': 4.4, 'peach garden oath': 0.17, "pyromancer's goggles": 0.91, 'angelic guardian': 7.12, 'soldevi excavations': 4.37, 'sidar kondo of jamuraa': 4.37, 'phyrexian crusader': 20.85, 'aura thief': 13.04, 'mindslicer': 12.69, 'cloud dragon': 4.34, "sevinne's reclamation": 3.33, 'oppression': 28.26, 'goblin general': 4.15, 'mana severance': 6.18, 'chill': 0.29, 'teferi, timeless voyager': 4.3, 'rewind': 0.27, "naf's asp": 2.57, 'stormwing entity': 0.67, 'ethersworn canonist': 7.56, 'ixidor, reality sculptor': 3.32, 'sword of the animist': 5.32, 'lux cannon': 1.21, 'edric, spymaster of trest': 3.81, 'ancestral vision': 3.27, 'rite of replication': 2.12, 'wu spy': 17.99, 'krenko, mob boss': 5.49, 'westvale abbey': 7.85, 'ormendahl, profane prince': 7.85, 'exorcist': 4.25, 'shared animosity': 3.91, 'uril, the miststalker': 17.81, 'vivien of the arkbow': 4.24, 'chromatic orrery': 15.62, 'leyline of anticipation': 6.92, 'mirri': 9.59, 'constant mists': 7.44, 'perilous vault': 2.76, 'glimmervoid': 7.92, 'multani': 13.75, 'tree of perdition': 10.15, 'plague engineer': 1.37, 'garruk, savage herald': 4.19, 'pir, imaginative rascal': 11.22, 'into the earthen maw': 6.37, 'the very soil shall shake': 7.56, "mizzix's mastery": 6.56, 'vedalken archmage': 1.46, "adventurers' guildhouse": 18.8, 'underground river': 12.02, 'deathrite shaman': 8.17, 'regal behemoth': 14.01, 'mistbind clique': 5.95, 'decree of pain': 3.33, 'copy enchantment': 16.5, 'enchanted evening': 2.57, 'tainted isle': 1.82, 'endless horizons': 9.77, 'quicksilver amulet': 7.31, 'world breaker': 2.11, 'roil elemental': 9.94, 'fallen angel': 0.13, "mind's dilation": 8.08, "archmage's charm": 16.9, "frankenstein's monster": 24.75, 'blight': 0.19, "martyr's cry": 4.04, 'enter the infinite': 4.71, 'child of alara': 24.86, 'erratic portal': 4.04, 'glen elendra liege': 4.65, "day's undoing": 3.02, 'barrin, master wizard': 25.13, 'tana, the bloodsower': 4.02, 'shelldock isle': 9.24, 'grim haruspex': 1.02, 'fell the mighty': 1.0, 'karplusan forest': 6.85, 'huatli, dinosaur knight': 4.0, 'squirrel mob': 0.3, 'squee': 7.95, "praetor's grasp": 14.56, 'reki, the history of kamigawa': 7.35, 'darksteel colossus': 11.32, 'reyhan, last of the abzan': 3.77, 'taoist hermit': 33.69, 'basilisk collar': 2.08, 'cephalid constable': 6.48, "pemmin's aura": 9.47, 'rhox faithmender': 4.19, 'extirpate': 1.02, 'marrow-gnawer': 12.65, "sorrow's path": 3.95, 'ruination': 7.69, 'electrolyze': 0.17, 'weathered wayfarer': 10.87, 'cavalier of night': 3.02, 'heritage druid': 8.1, 'high market': 0.59, 'smokestack': 3.48, 'angrath, the flame-chained': 4.85, 'tainted aether': 9.65, 'renewing touch': 1.83, 'managorger hydra': 1.06, "nature's lore": 4.13, 'master of the wild hunt': 15.13, 'ramirez depietro': 3.9, 'realms uncharted': 4.23, 'sapling of colfenor': 0.25, 'fabricate': 8.42, 'sphinx of enlightenment': 3.88, 'terrain generator': 5.11, 'unholy grotto': 29.24, 'woodland bellower': 4.42, 'seshiro the anointed': 10.72, 'idyllic tutor': 5.08, "sphinx's revelation": 2.86, 'rafiq of the many': 17.18, 'deepglow skate': 3.12, 'vizier of the menagerie': 5.34, "demon of death's gate": 9.96, 'oath of nissa': 2.07, 'huatli, radiant champion': 6.39, 'cavalier of thorns': 1.4, 'bedlam reveler': 0.79, 'scavenging ooze': 0.56, 'garruk, unleashed': 0.76, 'gilded lotus': 3.8, 'cephalid coliseum': 7.7, "sage's knowledge": 12.6, 'protean hulk': 8.39, 'form of the dragon': 0.65, 'mystic confluence': 2.45, 'elvish spirit guide': 3.8, 'sword of kaldra': 17.16, 'syphon sliver': 9.51, 'cunning wish': 7.84, 'helm of the host': 15.79, 'draco': 3.25, 'teysa, orzhov scion': 5.18, 'spoils of victory': 2.76, 'desperate charge': 3.78, 'undead warchief': 18.38, 'thornbite staff': 13.63, 'mirror gallery': 32.33, 'thran dynamo': 4.52, 'jace, ingenious mind-mage': 3.76, 'goblin bomb': 14.32, 'temporal trespass': 9.01, 'empyrial armor': 0.11, 'baral, chief of compliance': 4.55, 'evacuation': 5.03, 'grinding station': 9.55, 'priest of titania': 8.42, 'goblin piledriver': 1.33, 'basri, devoted paladin': 3.72, 'aetherflux reservoir': 12.82, 'zaxara, the exemplary': 2.49, 'kydele, chosen of kruphix': 3.71, 'abeyance': 19.18, 'dance of many': 0.43, 'rekindling phoenix': 1.63, 'tombstone stairwell': 34.62, 'karametra, god of harvests': 2.45, 'arjun, the shifting flame': 2.39, "varchild's war-riders": 3.68, 'sorin, grim nemesis': 5.78, 'coercive portal': 3.68, 'vexing devil': 4.27, 'summer bloom': 2.49, 'memnarch': 11.34, 'embrace my diabolical vision': 7.39, 'stonecoil serpent': 0.82, 'eternal dragon': 0.1, 'prime speaker zegana': 4.45, 'ajani, adversary of tyrants': 3.92, 'goblin bombardment': 1.0, 'fire ambush': 3.65, 'thundermaw hellkite': 4.39, 'past in flames': 2.68, 'ludevic, necro-alchemist': 3.64, 'mastery of the unseen': 0.14, 'kumena, tyrant of orazca': 5.02, 'faerie conclave': 0.77, 'the gitrog monster': 4.69, 'orim': 13.99, 'shadowspear': 19.41, 'timber protector': 17.82, 'nameless race': 7.79, 'detonate': 0.09, 'beseech the queen': 5.47, 'utopia sprawl': 4.93, 'collector ouphe': 5.95, 'two-headed dragon': 0.92, 'ramunap excavator': 3.14, 'clifftop retreat': 5.87, 'angel of jubilation': 6.41, 'vault of the archangel': 5.75, 'knights of thorn': 3.61, 'cavalier of flame': 2.4, 'steel-plume marshal': 0.15, 'uktabi orangutan': 0.31, 'arixmethes, slumbering isle': 4.11, 'tangle wire': 17.27, 'vela the night-clad': 1.61, 'boon reflection': 3.69, 'the haunt of hightower': 3.59, 'cryptbreaker': 7.06, 'merciless eviction': 2.73, 'shimmer myr': 0.24, 'hero of bladehold': 7.41, 'scholar of the lost trove': 0.2, 'isolated chapel': 4.92, 'benalish hero': 0.02, 'sleight of hand': 0.86, 'teferi, temporal archmage': 2.9, 'jokulhaups': 2.6, 'master of the pearl trident': 2.94, 'crystal quarry': 11.0, 'tracker': 3.55, 'tezzeret, master of metal': 3.55, "benefactor's draught": 10.54, 'sunpetal grove': 4.6, 'saproling symbiosis': 16.73, "imp's mischief": 23.28, 'bird maiden': 0.1, "yawgmoth's bargain": 3.53, 'prized amalgam': 1.5, 'balefire liege': 4.64, 'damping field': 18.71, 'nissa, genesis mage': 3.52, 'erg raiders': 0.04, 'ghostly prison': 1.0, 'yavimaya coast': 0.5, 'path of ancestry': 0.24, 'wall of wood': 0.09, "alchemist's refuge": 4.42, 'dread summons': 0.49, 'mox tantalite': 5.75, 'needle specter': 4.74, 'false defeat': 3.5, 'skirge familiar': 0.02, 'koskun falls': 11.42, "trostani, selesnya's voice": 1.05, 'inspiring vantage': 8.49, 'pernicious deed': 6.32, 'subterranean tremors': 6.45, 'sepulchral primordial': 0.89, 'amrou kithkin': 0.08, 'luminarch ascension': 10.97, 'dirtcowl wurm': 0.74, 'ob nixilis, unshackled': 6.28, 'dig through time': 0.92, 'gift of estates': 0.98, 'grimgrin, corpse-born': 16.64, 'energy field': 2.7, 'preordain': 0.56, 'kinsbaile cavalier': 4.87, 'inquisition of kozilek': 2.89, 'cryptolith rite': 9.83, 'brood sliver': 15.79, 'i call on the ancient magics': 4.88, 'moggcatcher': 7.35, 'impervious greatwurm': 3.45, 'altar of bone': 9.87, 'eiganjo castle': 14.55, 'bounty hunter': 4.34, 'circle of protection: green': 0.18, 'avoid fate': 5.83, 'silas renn, seeker adept': 3.43, 'stream of acid': 3.76, 'tendershoot dryad': 9.93, 'nothing can stop me now': 3.03, 'haunting wind': 23.06, 'diregraf colossus': 1.26, 'chandra, bold pyromancer': 3.42, 'walker of secret ways': 3.76, 'heliod, god of the sun': 5.16, 'riding red hare': 11.97, 'saheeli rai': 3.38, 'coffin queen': 3.4, 'basri ket': 1.13, 'ajani vengeant': 2.46, 'torpor orb': 22.51, 'evil comes to fruition': 9.99, 'windseeker centaur': 3.38, 'ancestral knowledge': 6.36, 'endless atlas': 4.58, 'boggart harbinger': 2.38, 'oath of ghouls': 9.78, 'mindbreak trap': 18.5, 'angelic destiny': 4.13, 'sram, senior edificer': 0.23, 'vito, thorn of the dusk rose': 4.33, 'entreat the angels': 1.31, "mayael's aria": 12.63, 'clay statue': 0.03, 'beastmaster ascension': 8.91, 'phyrexian unlife': 5.21, "praetor's counsel": 2.93, 'olivia voldaren': 18.68, 'reiterate': 2.81, 'kobold drill sergeant': 3.31, 'cinder glade': 1.09, 'grim lavamancer': 0.51, "konda's banner": 10.3, 'angel of light': 3.3, 'allosaurus rider': 0.91, 'wirewood lodge': 9.24, 'thousand-year storm': 10.34, 'mind bomb': 0.18, 'desertion': 3.76, 'time sieve': 1.62, 'masterwork of ingenuity': 0.33, "steelshaper's gift": 3.27, 'treetop village': 0.24, 'brago, king eternal': 0.87, 'semblance anvil': 5.1, 'champion lancer': 3.26, 'secluded glen': 5.88, 'fist of suns': 10.33, 'restore balance': 0.63, "venser's journal": 1.88, 'garruk relentless': 5.21, 'garruk, the veil-cursed': 5.21, 'leyline of sanctity': 3.86, 'angrath, minotaur pirate': 3.21, "chainer's edict": 3.9, 'dragonskull summit': 5.51, 'knollspine dragon': 7.53, 'lotus field': 3.11, 'scarwood bandits': 3.19, 'arcane signet': 1.26, "sigarda's aid": 6.98, 'lost vale': 6.28, 'kessig wolf run': 3.93, 'tolaria': 11.8, 'dowsing dagger': 6.28, 'conspiracy': 4.02, 'goblin chieftain': 2.7, 'traverse the ulvenwald': 1.49, 'rainbow vale': 3.17, 'hanna': 15.99, 'heartstone': 3.83, 'broken dam': 15.4, 'phyrexian metamorph': 5.28, 'pack rat': 2.23, 'steam catapult': 3.16, 'cemetery reaper': 0.78, 'field marshal': 3.82, 'volcanic hammer': 0.11, 'exsanguinate': 7.92, 'joraga warcaller': 9.62, 'skycloud expanse': 0.19, 'richard garfield, ph.d.': 0.28, 'pyroclasm': 0.2, 'talisman of dominance': 5.12, 'rootbound crag': 4.13, 'fire dragon': 3.14, 'sphinx ambassador': 6.76, 'desert nomads': 17.74, "breathstealer's crypt": 10.36, 'arcane artisan': 0.35, 'dolmen gate': 9.53, 'mechanized production': 11.31, 'teferi, timebender': 3.12, 'know naught but fire': 3.47, "inventors' fair": 6.96, 'decree of annihilation': 3.23, 'admonition angel': 0.66, 'lurking predators': 8.07, 'adaptive automaton': 3.42, 'living death': 7.61, 'pongify': 2.78, 'meditate': 3.11, 'knight of the reliquary': 1.79, 'selfless squire': 0.43, "elspeth, sun's nemesis": 1.44, 'dragonlord ojutai': 3.51, 'magister sphinx': 3.92, 'ezuri, renegade leader': 2.44, 'awakening': 4.81, 'wall of light': 3.08, 'spawn of mayhem': 1.42, 'flagstones of trokair': 3.32, 'drogskol reaver': 19.32, 'rampaging ferocidon': 2.58, 'bear umbra': 13.22, 'utvara hellkite': 13.44, 'waves of aggression': 25.92, 'boros charm': 1.64, "chandra's ignition": 5.83, 'arc lightning': 0.06, 'rakalite': 0.16, 'spear of the general': 4.21, 'crackdown': 11.61, 'zendikar resurgent': 5.35, 'treasure nabber': 10.35, 'arena': 5.82, 'mycoloth': 3.18, 'agent of treachery': 7.65, 'elvish promenade': 0.96, 'inferno titan': 2.07, 'death baron': 1.8, 'cadaverous bloom': 11.66, "nissa, nature's artisan": 3.02, 'krav, the unredeemed': 5.32, 'femeref enchantress': 13.66, 'grave robbers': 11.44, 'guul draz assassin': 3.99, 'donate': 15.99, 'disallow': 4.81, 'johnny, combo player': 0.19, 'thrun, the last troll': 4.04, 'gideon, martial paragon': 2.99, 'price of glory': 9.67, 'dreadbore': 2.79, "kozilek's return": 2.29, 'reincarnation': 0.35, "norn's annex": 4.73, 'emerald medallion': 10.52, 'blood artist': 3.34, 'kalastria highborn': 6.73, 'rakdos, lord of riots': 3.14, 'pyroblast': 5.44, 'reality smasher': 2.24, 'quirion ranger': 0.38, 'ineffable blessing': 1.09, 'phyrexian reclamation': 4.13, 'sygg, river cutthroat': 0.39, "liliana's caress": 4.62, 'elemental mastery': 5.08, 'heartwood storyteller': 0.58, 'skyline despot': 0.64, 'reverberate': 3.14, 'fractured powerstone': 0.99, 'oversold cemetery': 17.3, 'fling': 0.05, 'omnath, locus of the roil': 8.52, 'kobold taskmaster': 0.09, "rishkar's expertise": 3.82, "hall of heliod's generosity": 7.05, "volrath's shapeshifter": 2.91, 'worms of the earth': 13.92, 'fire covenant': 2.91, 'aura of silence': 4.88, 'manabond': 2.9, 'underrealm lich': 4.9, "yuan shao's infantry": 8.97, 'dark sphere': 4.43, 'blinkmoth nexus': 2.16, "titania's song": 0.28, 'final fortune': 20.15, 'karmic guide': 0.14, 'graven cairns': 9.81, 'wall of kelp': 2.86, 'visara the dreadful': 0.95, 'student of warfare': 3.17, 'blind obedience': 5.65, 'archangel': 0.12, 'ox of agonas': 2.8, 'touch of darkness': 4.54, 'combat celebrant': 10.85, 'thada adel, acquisitor': 7.53, 'woodland cemetery': 5.37, 'mindslaver': 4.59, 'o-kagachi, vengeful kami': 2.84, 'aetherize': 0.87, 'chulane, teller of tales': 4.24, 'wheel and deal': 11.15, "jester's cap": 4.49, 'ancient craving': 0.14, "eladamri's call": 6.93, 'jedit ojanen': 2.82, 'reaper king': 4.1, 'guardian project': 13.02, 'obelisk of urd': 3.7, 'reap': 2.44, 'shield sphere': 2.8, 'canopy vista': 0.61, 'erayo, soratami ascendant': 10.27, 'gleeful sabotage': 1.53, 'armageddon clock': 0.28, 'unstable mutation': 0.1, 'jack-in-the-mox': 0.5, 'walk the aeons': 1.7, 'catastrophe': 5.27, 'talisman of progress': 2.78, 'lurker': 9.22, "feldon's cane": 0.75, 'piety': 0.06, 'xenagos, the reveler': 4.06, "vivien, nature's avenger": 2.77, 'rune-scarred demon': 4.51, 'vish kal, blood arbiter': 0.8, 'nissa, who shakes the world': 4.7, "atarka's command": 2.15, 'domri rade': 2.2, 'damia, sage of stone': 0.7, 'prophet of kruphix': 0.82, 'zombie apocalypse': 0.75, 'sage of hours': 3.04, 'who/what/when/where/why': 2.75, 'concealed courtyard': 2.21, 'eldritch evolution': 5.9, 'boneyard scourge': 5.07, 'woodland mystic': 3.96, 'blatant thievery': 3.84, 'creakwood liege': 11.02, 'dragonstorm': 4.6, 'world shaper': 5.37, 'vernal bloom': 7.85, 'brightling': 1.24, 'prairie stream': 0.28, 'hungry lynx': 6.08, 'maralen of the mornsong': 20.97, 'tree of redemption': 4.1, 'enduring ideal': 7.46, 'sulfur falls': 4.43, 'cavalier of gales': 2.05, "azor's gateway": 3.78, 'multani, maro-sorcerer': 14.37, 'sanctum of the sun': 3.78, 'apprentice wizard': 0.13, "selvala's stampede": 10.92, 'moorish cavalry': 0.18, "windgrace's judgment": 2.41, 'mightstone': 2.68, 'remand': 3.25, 'leviathan': 0.25, 'coastal wizard': 4.7, 'the fate of the flammable': 18.04, 'wheel of sun and moon': 30.02, 'elvish piper': 6.86, 'approach my molten realm': 5.49, 'masticore': 1.39, 'notorious throng': 0.39, 'river bear': 3.46, 'arlinn, embraced by the moon': 12.42, 'arlinn kord': 12.42, 'weakstone': 2.66, 'settle the wreckage': 3.37, 'chainer, dementia master': 9.28, 'misdirection': 2.3, 'etali, primal storm': 0.45, 'kor spiritdancer': 2.9, 'manascape refractor': 1.28, 'wormwood treefolk': 2.64, 'circle of protection: white': 0.15, 'sylvan paradise': 12.76, 'bladewing the risen': 1.03, 'inferno': 0.29, 'inexorable tide': 6.43, 'temple of aclazotz': 0.45, 'dakmor ghoul': 1.34, "arguel's blood fast": 0.45, 'the lady of the mountain': 2.63, 'kuldotha forgemaster': 3.93, 'powder keg': 16.43, 'glorybringer': 1.06, 'remembrance': 4.45, 'doom whisperer': 6.88, 'sea drake': 0.03, 'patron of the orochi': 7.96, 'well of lost dreams': 1.86, 'starke': 4.99, 'volrath': 17.99, 'retract': 5.89, "thassa's oracle": 7.84, 'umbral mantle': 10.04, 'hokori, dust drinker': 8.21, 'sun titan': 0.48, "quest for ula's temple": 14.33, 'rain of daggers': 2.59, 'sunken hollow': 0.63, 'necrotic sliver': 0.18, 'greater realm of preservation': 0.16, 'counterintelligence': 11.94, 'infernal medusa': 17.49, 'wheel of fate': 2.15, 'squee, goblin nabob': 0.29, 'smoldering marsh': 0.86, 'dark petition': 3.08, 'shriekmaw': 0.25, 'somberwald sage': 0.62, 'zirilan of the claw': 22.35, 'mogg infestation': 2.57, 'kresh the bloodbraided': 6.01, 'everythingamajig': 2.32, 'slumbering dragon': 2.83, 'cytoplast manipulator': 5.42, 'vraska the unseen': 0.61, 'stigma lasher': 3.55, 'prossh, skyraider of kher': 2.21, 'harbinger of night': 4.16, 'gorilla shaman': 0.06, 'seasons past': 2.81, 'sorin, solemn visitor': 4.39, 'ghostfire blade': 0.39, 'seahunter': 8.05, 'ilharg, the raze-boar': 5.44, "stitcher's supplier": 3.22, 'sanctum of eternity': 1.95, 'transcendent master': 4.03, 'ebon dragon': 2.0, 'bearscape': 4.8, 'spectral cloak': 6.36, 'sower of discord': 5.56, 'cocoon': 0.09, 'sanity grinding': 11.2, 'master of etherium': 0.92, 'genesis wave': 8.59, 'chancellor of the annex': 2.67, 'sword of the meek': 2.19, 'coastal piracy': 4.28, 'pharika, god of affliction': 2.48, 'lure of prey': 8.67, 'niall silvain': 8.39, 'steelbane hydra': 8.25, "kraum, ludevic's opus": 2.51, 'protean hydra': 4.66, 'master of waves': 2.1, 'curse of opulence': 12.24, 'lightning crafter': 3.66, 'visions of beyond': 8.0, 'statecraft': 3.35, 'storage matrix': 3.54, 'sunforger': 0.32, 'mount keralia': 1.05, 'sarkhan the mad': 2.58, 'pyrohemia': 8.34, 'hedron fields of agadeem': 1.69, 'oath of druids': 2.97, 'dromar, the banisher': 3.73, 'second chance': 5.89, 'kiora, the crashing wave': 2.45, 'hidden path': 35.96, 'bonus round': 5.27, 'daybreak coronet': 4.96, 'barrin': 16.99, 'greven il-vec': 4.61, 'chasm skulker': 4.2, 'stuffy doll': 2.0, 'vona, butcher of magan': 5.59, 'alela, artful provocateur': 2.91, 'garruk, cursed huntsman': 3.59, 'chain of vapor': 8.82, 'yahenni, undying partisan': 8.52, 'hostage taker': 0.44, 'prime speaker vannifar': 2.87, 'gilded goose': 2.03, 'gush': 1.66, 'reality shift': 1.23, 'woodfall primus': 2.9, 'verge rangers': 0.51, 'mausoleum wanderer': 2.39, "thespian's stage": 0.63, 'jasmine boreal': 0.3, 'hedron crab': 6.29, 'atla palani, nest tender': 2.44, 'fireblast': 2.01, 'saffi eriksdotter': 0.9, 'evil eye of orms-by-gore': 0.26, 'trench gorger': 3.52, 'crypt of agadeem': 5.17, 'font of mythos': 5.21, 'pulmonic sliver': 0.84, 'shadowborn apostle': 4.58, 'garruk, primal hunter': 1.08, 'authority of the consuls': 6.88, 'cunning giant': 2.88, 'gilt-leaf archdruid': 10.5, 'viscera seer': 0.27, 'seeds of innocence': 11.34, 'bubble matrix': 11.41, 'goblin spymaster': 7.26, 'hydra broodmaster': 0.29, 'estrid, the masked': 2.41, 'brand': 4.85, 'gyre sage': 0.68, 'kaysa': 2.41, 'very cryptic command': 3.45, 'shepherd of rot': 4.76, 'boundless realms': 3.02, 'sunastian falconer': 2.39, 'llanowar wastes': 0.6, 'consuming aberration': 0.59, 'mystic forge': 5.85, 'niv-mizzet reborn': 1.77, 'chromatic star': 0.44, 'dread': 9.73, 'jeskai infiltrator': 0.13, 'temur sabertooth': 3.64, 'wildcall': 0.11, 'temple of mystery': 0.45, 'rotting regisaur': 1.69, 'savage beating': 48.77, 'whiptongue hydra': 5.57, 'sigil tracer': 8.96, 'matter reshaper': 1.61, 'bridge from below': 1.28, 'malignus': 3.76, "enchantress's presence": 0.66, 'chandra ablaze': 6.46, 'merchant scroll': 5.98, 'wake the dead': 4.82, 'silence': 4.51, 'booster tutor': 0.23, 'dragonmaster outcast': 0.48, 'sharuum the hegemon': 0.42, 'twincast': 7.75, 'retether': 7.14, 'nylea, keen-eyed': 3.86, 'horned sliver': 2.32, 'secure the wastes': 4.32, 'crop rotation': 1.05, 'shapesharer': 10.67, 'serenity': 1.55, 'arcane lighthouse': 5.55, 'reshape': 2.24, 'shalai, voice of plenty': 5.23, 'castle garenbrig': 5.16, 'safe haven': 0.47, 'blast zone': 2.85, 'akroma, angel of fury': 1.02, 'mana breach': 2.46, 'stormbreath dragon': 1.89, 'sphere of safety': 4.36, 'darkest hour': 4.51, 'chandra, heart of fire': 0.48, "calix, destiny's hand": 2.21, 'daretti, scrap savant': 0.81, 'mitotic slime': 3.96, 'ogre slumlord': 0.24, 'fatal push': 1.91, 'phyrexian revoker': 1.1, "urza's factory": 0.1, 'helm of possession': 6.45, 'apocalypse': 10.33, 'slate of ancestry': 4.79, 'apex altisaur': 2.58, 'thirsting bloodlord': 3.57, 'dueling grounds': 9.25, 'akiri, line-slinger': 2.28, 'drench the soil in their blood': 3.66, 'your inescapable doom': 0.51, 'imprison this insolent wretch': 1.82, 'i bask in your silent awe': 4.06, 'choice of damnations': 12.58, 'spidersilk armor': 4.26, "perhaps you've met my cohort": 2.05, "puppet's verdict": 3.92, 'jenara, asura of war': 3.35, 'flash': 0.38, 'pride of the clouds': 4.37, 'temporal aperture': 13.81, 'wanderwine prophets': 5.51, 'bad river': 2.26, 'cavalier of dawn': 2.68, 'attunement': 5.0, 'mercenary knight': 3.07, 'taigam, ojutai master': 5.86, 'xantcha, sleeper agent': 14.44, 'pale bears': 2.62, 'urza, academy headmaster': 4.48, 'spirit of the night': 12.7, 'poison arrow': 17.49, 'psychotrope thallid': 4.56, 'zodiac dog': 19.21, 'haakon, stromgald scourge': 2.6, 'etched champion': 4.93, 'demonic torment': 2.25, "drafna's restoration": 3.5, 'radiant, archangel': 2.24, 'choked estuary': 0.51, 'thalakos deceiver': 3.39, 'xenic poltergeist': 0.25, 'utopia mycon': 0.34, 'act of authority': 2.2, 'storm cauldron': 3.75, 'godo, bandit warlord': 2.44, 'sarcomancy': 2.24, 'conspicuous snoop': 1.85, 'darksteel mutation': 0.6, 'fire diamond': 0.24, 'relic of progenitus': 5.45, 'mother of runes': 6.03, 'stony silence': 5.43, 'ironscale hydra': 0.85, 'noxious ghoul': 10.95, 'expedition map': 1.62, 'umbra mystic': 5.52, 'workhorse': 2.19, 'cabal ritual': 0.89, 'mossfire valley': 0.25, 'dragonspeaker shaman': 0.9, 'floral spuzzem': 5.79, 'eldrazi displacer': 3.61, 'mirage mirror': 6.05, 'mikokoro, center of the sea': 2.22, 'rapid hybridization': 2.57, 'erebos, bleak-hearted': 2.22, 'elvish clancaller': 2.0, 'keldon firebombers': 2.87, 'domineering will': 1.28, 'jace, architect of thought': 0.48, 'nova chaser': 3.05, 'princess lucrezia': 2.19, 'isamaru, hound of konda': 0.52, 'bone dancer': 5.95, 'bone miser': 2.99, 'ashen rider': 0.31, 'shield of kaldra': 12.03, 'dusk urchins': 4.83, 'master biomancer': 0.79, 'carnival of souls': 16.05, 'dark prophecy': 2.84, 'marble titan': 2.49, 'witch hunter': 0.24, 'ghazbán ogre': 0.09, 'psychic allergy': 8.12, 'distant melody': 0.16, 'once upon a time': 1.18, 'jeering instigator': 0.15, 'kindred charge': 5.48, 'ponder': 2.38, 'soothsaying': 2.91, 'sublime archangel': 1.61, 'fetid pools': 4.27, "gaea's touch": 2.16, 'mathas, fiend seeker': 2.16, "grafdigger's cage": 1.84, 'street wraith': 2.02, 'elvish harbinger': 14.35, 'magma sliver': 18.78, 'ashling, the extinguisher': 4.09, 'inverter of truth': 0.55, 'crown of doom': 4.83, 'mu yanling, sky dancer': 2.19, 'rabid wombat': 0.05, 'dimir signet': 4.81, 'divinity of pride': 3.93, 'winged temple of orazca': 3.87, "hadana's climb": 3.87, 'quietus spike': 4.06, 'unholy citadel': 9.58, 'kindred boon': 3.63, 'proteus staff': 9.36, 'slippery bogbonder': 1.68, 'karn': 10.99, 'political trickery': 6.65, 'goblin goliath': 2.11, 'sai, master thopterist': 4.37, 'thunderbreak regent': 0.25, 'delay': 1.35, 'tezzeret, cruel machinist': 2.11, 'urborg justice': 9.03, "king's assassin": 3.79, 'plunge into darkness': 4.52, 'eternal flame': 12.48, 'terramorphic expanse': 0.24, 'thalia, heretic cathar': 5.27, 'chandra, pyrogenius': 2.1, 'avatar of growth': 2.1, 'famine': 0.17, 'martyrs of korlis': 2.09, 'thunderfoot baloth': 3.53, 'detention sphere': 0.74, 'beguiler of wills': 3.04, 'myojin of seeing winds': 4.05, 'zodiac rooster': 18.53, 'soulfire grand master': 1.95, "maze's end": 1.99, 'derevi, empyrial tactician': 1.29, 'chandra, the firebrand': 1.75, 'kargan dragonlord': 1.24, 'chaosphere': 6.43, 'drake haven': 0.11, 'primordial mist': 1.23, 'herald of war': 0.36, 'pavel maliki': 2.07, 'hive mind': 5.77, 'elvish archdruid': 1.15, 'castle ardenvale': 2.78, 'talisman of indulgence': 5.41, 'skyshroud poacher': 12.09, "teferi's realm": 4.7, 'hornet queen': 0.58, 'root maze': 8.47, 'whispersilk cloak': 3.46, 'darksteel ingot': 0.48, 'torsten von ursus': 2.05, 'hymn to tourach': 1.14, 'solemnity': 3.08, 'angelic field marshal': 5.95, 'dauthi slayer': 0.2, 'jace, arcane strategist': 2.04, 'restoration angel': 0.95, 'stillmoon cavalier': 4.51, 'knight of the white orchid': 0.38, 'denizen of the deep': 0.22, 'wasitora, nekoru queen': 6.34, 'history of benalia': 1.23, 'golos, tireless pilgrim': 1.49, 'wave of reckoning': 5.11, 'marchesa, the black rose': 6.33, 'coastal breach': 5.44, 'camel': 13.38, "duelist's heritage": 0.42, 'demigod of revenge': 1.51, 'geth, lord of the vault': 0.64, 'ripjaw raptor': 2.2, 'phage the untouchable': 5.22, 'crystalline crawler': 8.02, 'liege of the tangle': 0.78, 'bedlam': 6.21, 'immaculate magistrate': 0.41, 'recycle': 2.02, 'withengar unbound': 4.95, 'spirit mantle': 0.3, 'elbrus, the binding blade': 4.95, 'risen executioner': 4.19, 'voracious hydra': 2.24, 'alliance of arms': 4.81, 'ob nixilis reignited': 0.68, 'primal clay': 0.05, 'shinka, the bloodsoaked keep': 32.85, 'cursed rack': 0.11, "legion's initiative": 2.97, 'ancient den': 0.5, 'spreading plague': 6.74, 'ritual of the machine': 2.0, 'catalyst stone': 8.7, 'selenia, dark angel': 2.0, 'murderous rider': 1.74, 'swift end': 1.74, 'ruric thar, the unbowed': 0.54, 'lazav, dimir mastermind': 0.84, 'tectonic break': 4.01, 'hasran ogress': 0.03, 'jiang yanggu': 1.99, 'freed from the real': 3.62, 'pouncing jaguar': 0.12, 'thrilling encore': 4.47, 'hurr jackal': 0.23, 'steel leaf champion': 1.33, 'wargate': 3.43, 'lady orca': 0.24, 'jace, wielder of mysteries': 5.83, 'shadowblood ridge': 0.19, "ajani's welcome": 1.42, 'cultural exchange': 4.97, 'phyrexian tyranny': 2.97, 'elvish farmer': 1.96, 'splendid reclamation': 0.43, 'day of judgment': 2.82, 'havengul lich': 6.69, 'godhead of awe': 4.33, 'grafted exoskeleton': 1.96, 'anger of the gods': 0.82, 'temporal extortion': 12.31, 'coralhelm commander': 4.03, 'nezumi shortfang': 3.79, 'turnabout': 1.95, 'progenitor mimic': 2.58, 'darkwater catacombs': 0.2, 'burnished hart': 0.23, 'helm of awakening': 3.94, 'fraying sanity': 6.36, 'knight of autumn': 0.52, "wayfarer's bauble": 2.67, 'stormsurge kraken': 9.7, 'coldsteel heart': 4.69, "warrior's stand": 21.82, 'zo-zu the punisher': 4.61, 'knowledge exploitation': 13.44, 'mountain yeti': 0.06, 'chandra nalaar': 1.0, "myojin of night's reach": 8.97, 'riven turnbull': 1.93, 'kederekt parasite': 7.44, 'mana maze': 4.29, 'gibbering descent': 7.43, "gideon's company": 0.7, 'dragonlair spider': 2.14, 'dandân': 0.34, 'windborn muse': 0.41, "teferi's isle": 10.98, 'izzet charm': 0.38, 'mind funeral': 2.32, 'lesser werewolf': 1.92, 'march of the machines': 0.96, 'daxos the returned': 1.94, "multani, yavimaya's avatar": 1.39, 'skred': 0.73, 'dreadhorde arcanist': 1.49, 'muzzio, visionary architect': 1.91, 'whirlpool warrior': 2.28, 'purphoros, bronze-blooded': 2.61, "urza's filter": 5.39, 'loyal sentry': 0.11, 'oblivion sower': 3.86, 'dismember': 2.37, 'corpse harvester': 3.41, 'angel of fury': 1.9, 'zegana, utopian speaker': 0.4, 'seedtime': 9.36, 'lord magnus': 8.56, 'athreos, shroud-veiled': 3.25, 'boartusk liege': 9.43, 'ethereal forager': 0.47, 'fable of wolf and owl': 6.61, 'kukemssa pirates': 4.25, 'necrotic ooze': 5.39, 'bedevil': 1.84, 'beast within': 0.91, 'bloodbraid elf': 2.51, 'rise of the hobgoblins': 3.48, 'tempt with discovery': 1.17, "champion's victory": 13.14, 'chameleon colossus': 0.2, 'seraph of the scales': 2.16, 'amnesia': 1.87, 'gisa and geralf': 0.48, 'black mana battery': 0.58, 'exhume': 1.1, 'magus of the moat': 5.14, 'standstill': 8.94, 'rocket launcher': 0.02, 'mirrorpool': 2.11, 'ranger of eos': 3.81, 'rune-tail, kitsune ascendant': 4.16, 'helm of kaldra': 5.59, 'fervor': 4.28, 'orcish lumberjack': 0.19, 'murkfiend liege': 0.53, 'rain of gore': 8.48, 'untamed wilds': 0.17, 'kasimir the lone wolf': 5.41, 'blasting station': 8.29, 'nezahal, primal tide': 1.27, 'shattering spree': 6.05, 'world at war': 11.35, "smuggler's copter": 1.96, 'carrion': 7.22, 'ishkanah, grafwidow': 0.79, 'jerrard of the closed fist': 1.83, 'terravore': 2.75, 'mountain stronghold': 9.72, 'discontinuity': 1.23, 'spawnsire of ulamog': 6.59, 'rally the troops': 19.99, 'viral drake': 1.72, 'dragon engine': 0.14, 'just fate': 1.82, 'sundial of the infinite': 4.37, "debtors' knell": 0.36, 'angel of the dire hour': 0.45, 'palace jailer': 0.91, 'paradise mantle': 7.13, 'lazav, the multifarious': 1.19, "krark's thumb": 13.58, 'wall of omens': 0.4, 'spellstutter sprite': 2.58, 'swiftfoot boots': 1.62, 'rockslide ambush': 1.81, 'flamekin harbinger': 11.41, 'clever impersonator': 2.36, 'reliquary tower': 2.85, 'griffin canyon': 13.25, 'kethis, the hidden hand': 2.39, 'cabal therapy': 0.82, 'prowling serpopard': 3.85, 'mirri, cat warrior': 0.93, 'caves of koilos': 0.76, 'simian spirit guide': 0.34, 'shu soldier-farmers': 1.79, 'elderscale wurm': 2.1, 'angelic chorus': 2.82, "lich's mirror": 3.32, 'hunted horror': 12.59, 'stroke of genius': 3.49, 'harsh justice': 1.78, 'grim feast': 8.81, 'imprisoned in the moon': 0.25, 'stolen strategy': 11.98, 'righteous war': 6.52, 'snow-covered island': 1.08, 'alert shu infantry': 17.99, 'mu yanling, celestial wind': 1.78, 'tariel, reckoner of souls': 5.02, 'rebuff the wicked': 1.38, 'oko, the trickster': 1.34, 'deity of scars': 2.54, "jace's archivist": 4.28, 'bloodmark mentor': 2.26, 'sky diamond': 0.17, 'sisay': 3.91, 'stronghold gambit': 0.71, 'your will is not your own': 2.24, 'mise': 0.24, 'overwhelming splendor': 6.21, 'elspeth conquers death': 0.23, 'plots that span centuries': 74.99, 'joraga treespeaker': 3.64, 'jeweled amulet': 1.76, 'mortivore': 2.15, 'volcanic dragon': 0.04, 'bonfire of the damned': 1.93, 'bringer of the blue dawn': 5.41, 'heartbeat of spring': 3.12, 'mystic denial': 37.89, 'path of discovery': 2.07, 'trickbind': 7.03, 'shadow of doubt': 4.24, 'charisma': 4.32, 'craw giant': 0.15, "hanna, ship's navigator": 1.63, "ashnod's transmogrant": 0.06, 'extract': 7.51, 'supreme phantom': 0.3, 'ichneumon druid': 7.49, 'silent arbiter': 2.34, "vance's blasting cannons": 0.47, 'spitfire bastion': 0.47, 'emry, lurker of the loch': 2.75, 'blaze': 0.17, 'rishadan brigand': 2.53, 'flamekin village': 2.25, 'trip wire': 1.74, 'red cliffs armada': 1.74, "liliana's specter": 0.29, 'kenrith, the returned king': 6.33, 'kiora, master of the depths': 2.48, 'deathcoil wurm': 1.73, 'lathliss, dragon queen': 3.29, 'elvish reclaimer': 4.06, "urza's bauble": 1.39, 'blowfly infestation': 3.05, 'primal surge': 5.36, 'curious obsession': 0.68, 'red mana battery': 0.36, 'fungal bloom': 1.72, 'boom': 0.72, "kykar, wind's fury": 3.78, 'murmuring bosk': 2.16, 'fire bowman': 13.97, 'bust': 0.72, 'keiga, the tide star': 5.02, 'phyrexian purge': 4.36, 'goblin welder': 9.55, 'words of waste': 11.03, 'price of progress': 1.79, 'graveborn muse': 6.7, 'legion warboss': 2.29, 'kobolds of kher keep': 1.71, 'mephidross vampire': 6.7, 'horn of greed': 8.66, 'furyborn hellkite': 2.68, 'inundate': 8.41, 'tree of tales': 3.33, 'timestream navigator': 5.41, 'infernal tribute': 8.98, 'oath of lieges': 9.39, 'myr turbine': 2.77, 'abomination': 0.14, 'biogenic ooze': 3.72, 'recurring insight': 2.73, 'glissa, the traitor': 4.53, 'living wish': 0.98, 'breaching leviathan': 6.96, 'gideon, champion of justice': 0.65, 'goblin commando': 0.02, 'zur the enchanter': 3.85, 'strionic resonator': 5.7, 'ethersworn adjudicator': 2.36, 'polukranos, unchained': 1.19, 'mind grind': 4.11, 'plague of vermin': 8.12, "martyr's bond": 0.88, 'psychic purge': 1.68, 'sylvan basilisk': 0.23, 'sylvan yeti': 0.66, 'priest of forgotten gods': 3.35, 'nemesis of reason': 5.46, 'ashenmoor liege': 5.56, 'psychic vortex': 5.18, 'sudden substitution': 0.39, 'collective voyage': 5.86, 'tuvasa the sunlit': 1.67, 'ugin, the ineffable': 2.35, 'empowered autogenerator': 0.43, 'reaper from the abyss': 2.06, 'stairs to infinity': 12.3, 'moonveil dragon': 2.6, 'lodestone bauble': 1.66, 'olivia, mobilized for war': 2.59, 'skull of orm': 2.2, 'nesting grounds': 0.68, 'greater gargadon': 0.24, 'primal command': 1.26, 'eerie interlude': 1.58, 'leonin arbiter': 2.7, 'skittering skirge': 0.14, 'angel of invention': 3.87, 'angel of mercy': 0.07, 'tibalt, the fiend-blooded': 1.29, 'korlash, heir to blackblade': 5.28, 'pox': 1.61, 'aurelia, exemplar of justice': 2.12, 'buried alive': 6.83, 'nimbus maze': 0.65, 'riptide entrancer': 1.38, 'darksteel reactor': 7.7, 'knight of the ebon legion': 1.93, 'frenetic efreet': 25.71, 'okina, temple to the grandfathers': 6.77, 'prismatic geoscope': 0.66, "jester's mask": 1.64, 'krosan grip': 0.49, 'wanderwine hub': 8.57, 'castle locthwain': 3.87, 'sire of stagnation': 7.67, 'astral cornucopia': 2.08, 'magnetic theft': 4.68, 'vampiric spirit': 0.27, 'barktooth warbeard': 1.63, 'port town': 0.22, 'flickering ward': 6.63, 'trapjaw tyrant': 6.26, 'elvish lyrist': 0.13, 'forsaken wastes': 7.34, 'silverback ape': 0.64, 'lord of tresserhorn': 1.62, 'sandstorm': 0.06, 'shrine of burning rage': 0.54, 'vengeful pharaoh': 1.78, 'heartless summoning': 2.86, 'pelt collector': 1.09, 'azorius signet': 0.37, 'samut, voice of dissent': 4.7, 'temple of enlightenment': 0.21, 'abbot of keral keep': 0.69, "eunuchs' intrigues": 47.37, 'faerie macabre': 1.16, 'beacon of tomorrows': 3.71, 'celestial mantle': 1.21, 'foreboding ruins': 0.49, 'shu general': 1.61, 'parallax tide': 2.28, 'rain of filth': 7.93, 'wilt-leaf liege': 2.17, "life's finale": 2.42, "gaea's herald": 4.16, 'veilstone amulet': 10.45, 'knucklebone witch': 1.73, 'natural balance': 5.57, 'cascading cataracts': 4.28, 'hidden horror': 0.11, 'norin the wary': 1.45, 'talas researcher': 1.6, 'burning wish': 0.61, "seafarer's quay": 11.32, 'melira, sylvok outcast': 3.95, 'cream of the crop': 6.46, "nature's cloak": 6.81, 'howlpack alpha': 8.53, 'siren stormtamer': 0.37, 'bojuka bog': 1.0, 'diffusion sliver': 1.98, "pir's whim": 3.38, 'golgari grave-troll': 3.85, 'concerted effort': 6.51, 'quest for the nihil stone': 2.8, 'wall of shards': 2.13, 'dissipation field': 2.34, 'mayor of avabruck': 8.53, 'goblin chirurgeon': 0.21, 'genju of the realm': 6.61, 'anger': 2.27, 'genesis': 0.47, 'rag man': 0.82, 'grothama, all-devouring': 5.1, "blue sun's zenith": 2.55, 'champion of the parish': 2.56, 'cryptic gateway': 10.74, 'pattern of rebirth': 5.07, 'phantom warrior': 0.78, 'tangle': 1.57, 'demonic pact': 2.11, 'infernal spawn of evil': 0.13, 'jhoira, weatherlight captain': 1.84, 'revenant': 0.03, 'armory automaton': 4.1, 'stitch in time': 8.7, 'azor, the lawbringer': 2.21, 'kiora bests the sea god': 4.22, 'stinkweed imp': 1.54, 'searing blaze': 1.4, 'battering ram': 0.12, 'toxin sliver': 4.69, 'anafenza, the foremost': 1.32, 'victimize': 0.34, 'wall of wonder': 0.17, 'militant angel': 1.56, 'stitcher geralf': 0.29, 'feed the machine': 2.09, 'kaseto, orochi archmage': 0.41, 'terror of mount velus': 0.47, 'beast whisperer': 2.38, 'lava spike': 3.74, 'deadly tempest': 0.23, 'verdant confluence': 1.89, "granny's payback": 0.34, 'deploy the gatewatch': 0.94, 'decimate': 4.06, 'return of the nightstalkers': 0.54, 'hibernation sliver': 0.98, 'ral zarek': 0.87, "myojin of life's web": 2.81, 'monastery swiftspear': 1.56, 'magus of the coffers': 6.36, 'gate to the aether': 1.85, 'gifted aetherborn': 0.89, 'bösium strip': 5.26, 'merrow commerce': 5.36, 'nemata, grove guardian': 6.02, 'scalelord reckoner': 12.94, 'tainted peak': 0.31, 'leonin abunas': 1.27, 'márton stromgald': 1.53, 'wall of nets': 3.17, 'dauntless dourbark': 3.28, 'grimoire of the dead': 0.5, 'blue mana battery': 0.31, 'nyx lotus': 3.74, 'corrupt eunuchs': 1.52, 'temple of deceit': 0.51, 'idol of oblivion': 1.42, 'force spike': 0.27, 'vampiric dragon': 0.3, 'shauku, endbringer': 4.5, 'scavenger grounds': 0.79, 'ensoul artifact': 0.38, 'fact or fiction': 0.25, 'marit lage': 1.51, 'magus of the will': 0.29, 'stunt double': 3.81, 'tishana, voice of thunder': 3.71, 'canyon slough': 3.45, 'noetic scales': 7.29, 'plow under': 2.18, 'frost titan': 0.64, 'brisela, voice of nightmares': 0.68, 'bruna, the fading light': 2.51, 'an-zerrin ruins': 1.51, 'rooftop storm': 1.82, 'life chisel': 1.5, 'sadistic hypnotist': 1.48, 'grasslands': 0.17, 'sudden spoiling': 1.61, 'meishin, the mind cage': 3.4, 'game trail': 1.38, 'spark double': 8.42, 'wall of putrid flesh': 4.43, 'baron sengir': 1.49, 'xyris, the writhing storm': 0.98, 'mana clash': 0.63, 'thriving isle': 0.21, 'mudslide': 1.49, 'flesh carver': 0.86, 'beacon of immortality': 2.68, 'battlefield forge': 1.15, 'seize the day': 9.75, 'huatli, warrior poet': 4.12, 'dungrove elder': 0.99, 'temple of malady': 0.43, 'mirrorwing dragon': 3.27, 'shimmer': 7.04, 'impulse': 0.42, 'steal enchantment': 2.04, 'defiler of souls': 2.25, 'three dreams': 2.07, "belbe's portal": 3.33, 'frozen aether': 1.43, 'brain freeze': 1.48, 'ghastlord of fugue': 5.31, 'coiling oracle': 0.14, 'harabaz druid': 1.86, 'gerrard': 3.99, "ashnod's battle gear": 0.12, 'laboratory maniac': 3.87, 'hunding gjornersen': 1.47, 'sivitri scarzam': 0.09, 'seismic assault': 0.46, "pariah's shield": 11.57, 'scheming symmetry': 5.03, 'words of wilding': 3.84, 'scourge of nel toth': 1.23, 'spell snare': 0.47, 'regal force': 2.03, 'the magic mirror': 2.84, 'gutterbones': 0.89, 'ogre arsonist': 0.44, 'throne of the god-pharaoh': 4.21, 'argothian pixies': 0.1, 'parallel evolution': 16.63, 'toshiro umezawa': 12.21, 'tower of the magistrate': 6.1, 'false prophet': 0.81, 'temple of malice': 0.32, 'tidings': 0.2, "kataki, war's wage": 8.44, 'isperia, supreme judge': 0.26, 'feldon of the third path': 0.51, 'infernal darkness': 1.46, 'dread cacodemon': 2.73, 'everflowing chalice': 1.0, 'temple of epiphany': 0.46, 'overbeing of myth': 3.67, 'silhouette': 8.33, 'riddlekeeper': 3.53, 'wrexial, the risen deep': 8.77, 'feral shadow': 0.1, 'whir of invention': 2.35, 'tidespout tyrant': 4.35, 'circle of despair': 3.5, 'dream trawler': 0.19, 'divergent transformations': 3.6, 'zodiac goat': 12.34, 'tradewind rider': 1.44, 'equipoise': 5.84, 'chainer, nightmare adept': 0.15, 'lightning helix': 0.94, 'proclamation of rebirth': 1.42, 'polar kraken': 1.44, 'crosis, the purger': 2.08, 'venom sliver': 2.55, 'alluring scent': 0.7, 'harsh mercy': 3.14, 'ring of three wishes': 3.05, 'boomerang': 0.07, 'ancient stone idol': 4.61, 'ancestor dragon': 1.82, 'cauldron of souls': 2.91, 'true conviction': 2.68, 'new blood': 9.53, 'dream coat': 8.05, 'wild slash': 0.24, 'yet another aether vortex': 0.1, 'haven of the spirit dragon': 0.95, 'bloodspore thrinax': 0.47, 'shielded by faith': 2.1, 'green mana battery': 0.31, 'scattered groves': 3.49, 'ivory guardians': 0.07, 'abrade': 0.09, 'yosei, the morning star': 3.4, 'flameshadow conjuring': 2.91, "gustha's scepter": 1.42, 'pools of becoming': 2.65, 'rancor': 0.95, 'essence sliver': 10.46, 'deadbridge chant': 0.52, 'ramunap ruins': 0.26, 'circle of protection: artifacts': 0.16, 'surgespanner': 4.77, 'fountain watch': 10.38, 'ukkima, stalking shadow': 1.29, 'indomitable ancients': 5.04, "thalia's lieutenant": 3.35, 'winged sliver': 0.35, 'dream chisel': 1.69, 'exalted angel': 5.52, 'angelic overseer': 1.63, 'predator ooze': 0.67, "telim'tor's edict": 4.44, 'homing sliver': 0.21, 'keen sense': 0.35, 'dragon arch': 6.18, 'izoni, thousand-eyed': 1.03, 'temple of plenty': 0.52, 'ruhan of the fomori': 7.48, 'hydra omnivore': 3.05, 'underworld breach': 5.67, 'march of the multitudes': 1.7, 'notion thief': 2.35, 'descent of the dragons': 3.32, 'seek': 3.01, 'power matrix': 9.41, 'blade of the bloodchief': 4.47, 'exquisite firecraft': 0.5, 'fortified area': 0.09, 'hide': 3.01, 'aeolipile': 1.39, 'dominating licid': 6.59, 'trade routes': 6.27, 'alabaster dragon': 0.65, 'maraxus': 5.99, 'netherborn altar': 0.24, 'wall of tombstones': 6.34, 'ib halfheart, goblin tactician': 3.77, 'damping sphere': 1.5, 'utter end': 0.32, 'worst fears': 1.81, 'sungrass prairie': 0.13, 'edge of autumn': 0.26, 'forked lightning': 1.38, "narset's reversal": 5.92, 'sower of temptation': 3.11, "teeka's dragon": 7.54, 'mindwrack liege': 3.2, 'final strike': 1.7, 'fatespinner': 4.05, 'unmake': 0.73, 'corrosive mentor': 2.38, 'polukranos, world eater': 1.64, 'open the vaults': 2.68, 'syr gwyn, hero of ashvale': 1.39, 'champion of lambholt': 0.59, "heaven's gate": 10.7, "liliana's reaver": 0.72, 'deputy of detention': 0.56, 'serpent assassin': 2.08, 'dulcet sirens': 0.76, 'hand of the praetors': 4.78, 'chancellor of the tangle': 1.06, 'only blood ends your nightmares': 1.69, 'river of tears': 4.55, 'diluvian primordial': 0.57, 'gavony township': 4.03, 'bonesplitter': 0.03, 'dread reaper': 0.69, 'beasts of bogardan': 0.12, 'crux of fate': 1.82, 'backfire': 0.18, 'sublime epiphany': 2.79, 'sheltered thicket': 3.0, 'buried ruin': 0.68, 'dovin, architect of law': 1.35, 'fierce empath': 0.18, 'tear': 2.54, 'unclaimed territory': 0.36, 'windbrisk heights': 0.34, 'wear': 2.54, 'temporary truce': 10.05, 'impact tremors': 2.97, 'well of knowledge': 10.88, 'muddle the mixture': 6.04, 'ignite the cloneforge!': 2.06, 'tolsimir wolfblood': 2.85, 'grand coliseum': 3.72, 'kulrath knight': 0.99, 'takklemaggot': 0.07, 'vraska, relic seeker': 3.24, 'mindmoil': 2.9, 'traumatize': 4.09, 'metamorphosis': 0.1, 'phyrexian soulgorger': 3.01, "wakening sun's avatar": 6.77, 'borborygmos enraged': 0.85, 'visions': 0.14, 'ayara, first of locthwain': 3.9, 'remove enchantments': 2.28, 'fortified village': 0.31, 'look skyward and despair': 1.39, 'bogardan hellkite': 0.27, 'ghave, guru of spores': 4.45, 'vault of whispers': 3.86, 'dovescape': 2.7, 'goblin warrens': 0.65, 'reveillark': 0.59, 'wort, boggart auntie': 5.72, 'zodiac rabbit': 12.88, 'persistent nightmare': 2.57, 'catacomb dragon': 5.81, 'elvish vanguard': 0.27, 'backdraft': 6.08, 'runehorn hellkite': 4.12, 'leonin warleader': 4.09, 'startled awake': 2.57, 'flood plain': 0.09, 'cabal stronghold': 4.83, 'heart of yavimaya': 1.32, 'momir vig, simic visionary': 3.71, 'do or die': 5.05, 'return to the ranks': 1.4, 'endless cockroaches': 0.95, 'mutagenic growth': 1.38, 'angel of serenity': 0.5, 'conch horn': 4.9, 'sedris, the traitor king': 19.42, 'unfulfilled desires': 3.72, 'revel in riches': 11.35, 'heat stroke': 4.75, 'necrogen mists': 10.77, 'stunning reversal': 2.17, 'rowan, fearless sparkmage': 1.07, 'cheatyface': 0.38, 'bloodcurdling scream': 0.68, 'stonehorn dignitary': 0.44, "dragon's hoard": 0.49, 'herald of leshrac': 2.15, 'aerathi berserker': 6.02, 'fiendslayer paladin': 1.44, 'beast of burden': 0.37, 'midnight banshee': 1.76, 'time reversal': 2.79, 'argothian elder': 3.78, 'dire fleet daredevil': 0.54, 'scourglass': 6.64, 'eternal dominion': 2.94, 'invisible stalker': 0.32, 'char': 0.31, 'squirrel farm': 0.37, 'finale of promise': 2.31, 'devoted druid': 1.72, 'fleecemane lion': 0.15, 'dosan the falling leaf': 10.45, 'metallurgic summonings': 0.72, 'planar portal': 3.45, 'spiritmonger': 0.18, 'seizan, perverter of truth': 6.7, 'anya, merciless angel': 1.08, "mishra's helix": 1.63, 'leonin shikari': 4.49, 'game of chaos': 5.99, 'cast through time': 3.02, 'windfall': 3.26, 'anowon, the ruin sage': 0.4, 'every last vestige shall rot': 1.42, "general's kabuto": 7.05, 'prized unicorn': 2.66, 'karplusan minotaur': 7.35, "tivadar's crusade": 1.28, "kodama's reach": 1.91, 'avatar of the resolute': 1.36, "sea kings' blessing": 7.99, 'panoptic mirror': 3.66, 'rhys the exiled': 0.28, 'high tide': 0.58, 'white mana battery': 0.38, 'ajani unyielding': 0.9, 'nut collector': 53.57, 'bog witch': 2.71, 'firespout': 0.64, 'explosion': 2.28, 'undermine': 0.84, 'soul of new phyrexia': 2.13, 'gideon jura': 0.94, 'thriving moor': 0.24, 'horizon boughs': 4.54, 'fury of the horde': 7.28, 'obliterate': 4.56, "vraska's contempt": 1.34, 'mist-cloaked herald': 0.94, 'abyssal horror': 0.21, 'reya dawnbringer': 2.25, 'expansion': 2.28, 'tranquil grove': 2.7, 'brainstorm': 0.55, 'malicious affliction': 2.07, 'aura mutation': 2.2, 'deathrender': 3.65, 'dread wanderer': 1.04, 'porphyry nodes': 0.19, 'sakura-tribe scout': 2.56, 'kederekt leviathan': 3.91, 'scourge of valkas': 0.38, 'shard phoenix': 0.2, 'giant badger': 0.07, 'skarrgan hellkite': 0.54, 'decimator of the provinces': 1.61, "tawnos's wand": 0.16, 'brudiclad, telchor engineer': 2.18, 'merfolk assassin': 0.21, 'finale of revelation': 4.26, 'tolarian entrancer': 4.51, 'oversoul of dusk': 1.68, 'wicked pact': 1.25, 'liquimetal coating': 1.41, "chandra's incinerator": 0.5, 'prince of thralls': 5.8, 'elephant grass': 2.53, 'mirran crusader': 1.22, 'kazuul, tyrant of the cliffs': 3.53, 'angelic arbiter': 1.2, 'spoils of evil': 7.94, 'knacksaw clique': 3.66, 'goblin offensive': 4.19, "cartographer's hawk": 0.27, 'scion of darkness': 4.96, 'novablast wurm': 2.64, 'gideon, the oathsworn': 1.23, 'thriving grove': 0.23, 'render silent': 2.17, 'creeping mold': 0.05, "bolas's citadel": 5.77, 'burning inquiry': 3.9, 'aurification': 3.73, 'thing from the deep': 1.23, 'spellshock': 1.23, "sphinx's tutelage": 1.95, 'thornling': 2.3, "conqueror's galleon": 0.65, 'mass hysteria': 8.92, 'intervention pact': 3.25, "conqueror's foothold": 0.65, 'devoted caretaker': 7.1, 'archetype of endurance': 1.9, 'conquer': 0.09, "angel of glory's rise": 0.3, 'jarad, golgari lich lord': 2.39, 'manaweft sliver': 2.88, 'charcoal diamond': 0.21, 'sands of time': 4.99, 'sustaining spirit': 1.22, 'obzedat, ghost council': 1.36, "eladamri's vineyard": 6.59, 'whirlwind': 0.45, 'soldevi digger': 1.22, 'territorial hellkite': 2.22, 'timmy, power gamer': 0.17, 'wei assassins': 16.42, 'dystopia': 1.21, 'cinder storm': 0.05, "night's whisper": 1.29, 'impulsive maneuvers': 3.93, 'vicious shadows': 3.15, 'beacon of unrest': 0.26, 'storm crow': 0.21, 'jhoira of the ghitu': 0.34, 'grand architect': 1.15, 'prosperity': 1.87, 'mental misstep': 4.98, 'balduvian trading post': 1.21, "aurelia's fury": 1.21, 'killing wave': 2.13, 'honor of the pure': 1.31, 'wall of denial': 1.96, 'spelljack': 3.49, 'stupor': 0.36, 'primordial ooze': 0.14, 'great wall': 3.5, 'merrow reejerey': 4.63, 'glorious anthem': 0.22, 'winds of abandon': 3.29, 'day of destiny': 6.93, 'goreclaw, terror of qal sisma': 4.62, 'rishadan footpad': 0.49, "bontu's monument": 6.04, 'sphinx of the steel wind': 0.93, 'brine hag': 7.47, 'hex parasite': 4.2, 'arcanis the omnipotent': 1.38, 'mobilize': 12.39, 'heart sliver': 0.95, 'sensation gorger': 4.34, 'tainted remedy': 4.61, 'psychic transfer': 0.46, 'glittering wish': 0.18, 'vault of catlacan': 5.54, 'copper gnomes': 2.39, 'memory plunder': 3.81, 'frilled sandwalla': 0.58, 'dawn of hope': 2.86, 'storm the vault': 5.54, "rakdos's return": 1.03, 'thriving heath': 0.2, 'polymorph': 2.07, 'leaf-crowned elder': 3.84, 'goblin engineer': 2.95, 'empyrial archangel': 2.75, 'voidmage prodigy': 2.27, 'experiment one': 0.49, 'licia, sanguine tribune': 1.18, 'finale of glory': 2.2, 'tezzeret the schemer': 0.94, 'siege-gang commander': 0.98, 'pawn of ulamog': 3.29, 'hyperion blacksmith': 4.82, 'varchild, betrayer of kjeldor': 5.09, 'star of extinction': 2.59, 'thriving bluff': 0.24, 'lotus blossom': 6.67, 'lightmine field': 1.98, "bontu's last reckoning": 1.65, 'ikra shidiqi, the usurper': 0.87, 'gatekeeper of malakir': 0.9, 'earwig squad': 1.37, 'mutilate': 1.57, 'aegis of the gods': 1.95, 'crystal shard': 1.26, 'tendo ice bridge': 4.22, 'setessan champion': 1.69, "moment's peace": 1.35, 'eternity vessel': 7.76, 'shimmer dragon': 5.07, 'molten psyche': 3.85, 'mine layer': 7.12, 'arcane denial': 0.79, 'form of the squirrel': 8.66, "druids' repository": 2.35, 'deprive': 0.77, 'quillspike': 1.62, 'army of the damned': 0.71, 'deathless angel': 2.21, 'dominus of fealty': 1.13, "dromoka's command": 1.04, 'phyrexian negator': 0.39, 'enter the dungeon': 0.14, 'wu longbowman': 1.15, 'thundering wurm': 0.91, 'part water': 6.91, 'vraska, regal gorgon': 1.14, 'bazaar of wonders': 5.25, 'crackleburr': 1.43, 'ritual of subdual': 1.14, 'grave betrayal': 2.42, 'goblin war cry': 2.67, 'cultivate': 0.44, 'pitiless plunderer': 12.03, 'disrupting shoal': 0.66, 'bringer of the black dawn': 2.12, 'marisi, breaker of the coil': 1.14, 'elsha of the infinite': 1.14, 'muscle sliver': 0.74, 'wayward soul': 0.05, 'isle of vesuva': 2.91, 'glacial crevasses': 1.13, 'soulless one': 3.11, 'gift of immortality': 3.49, 'inspired sphinx': 0.45, 'roon of the hidden realm': 2.53, 'keening stone': 2.61, 'righteous avengers': 1.13, 'figure of destiny': 0.72, 'tombstalker': 0.12, 'marath, will of the wild': 0.81, 'spiritual guardian': 1.13, "tawnos's weaponry": 0.06, 'thraximundar': 0.86, 'inner sanctum': 3.56, 'fire tempest': 0.66, 'charging rhino': 0.02, 'river merfolk': 1.12, 'sunhome, fortress of the legion': 0.13, 'sanguine bond': 2.51, 'ishai, ojutai dragonspeaker': 0.88, 'dakmor lancer': 0.22, 'plague wind': 2.65, 'entreat the dead': 0.67, 'overtaker': 0.38, 'leveler': 1.51, 'ravenous chupacabra': 0.79, 'rootwater thief': 4.26, 'evolutionary leap': 0.7, 'silent-blade oni': 5.07, 'preeminent captain': 0.31, 'necropolis regent': 0.29, 'death cloud': 9.82, 'crimson wisps': 3.35, 'goblin grenade': 0.98, 'experiment kraj': 3.01, 'volrath, the shapestealer': 1.11, 'skirk fire marshal': 2.95, 'ral, caller of storms': 1.11, 'mirror mirror': 1.2, "knights' charge": 0.65, 'krosa': 2.43, 'knight of meadowgrain': 0.62, 'virulent sliver': 0.29, 'dispatch': 2.14, 'siege rhino': 0.56, 'lodestone golem': 1.33, 'patron of the moon': 3.03, 'new frontiers': 6.89, 'casualties of war': 0.93, 'thromok the insatiable': 1.79, 'bow of nylea': 3.8, 'avatar of hope': 0.3, 'cardboard carapace': 1.75, 'silhana ledgewalker': 1.85, 'warstorm surge': 0.42, 'gratuitous violence': 0.59, 'mirari': 0.64, 'brilliant plan': 0.09, 'serum powder': 0.6, 'shared triumph': 3.6, 'myr superion': 1.8, 'ghost quarter': 1.45, 'steel of the godhead': 3.13, 'roalesk, apex hybrid': 1.85, 'rising waters': 2.43, 'doomed necromancer': 0.15, 'essence warden': 4.98, 'goldmeadow': 3.24, 'goblin matron': 0.62, 'return to dust': 0.1, 'oracle of nectars': 1.63, 'part the waterveil': 2.31, 'heat shimmer': 2.17, 'bazaar trader': 2.79, "barl's cage": 0.2, 'tainted wood': 1.05, 'undead alchemist': 0.28, 'tidal barracuda': 1.0, 'kambal, consul of allocation': 2.91, 'seething song': 0.82, 'skybreen': 1.74, 'mowu': 1.09, 'bloodsoaked champion': 1.07, 'liege of the hollows': 14.02, 'myojin of cleansing fire': 3.75, 'gut shot': 1.19, 'rotlung reanimator': 6.63, 'which of you burns brightest?': 2.19, 'rattlechains': 0.21, 'crevasse': 3.6, 'ratchet bomb': 0.9, 'obscuring haze': 1.18, 'blinding light': 0.19, 'cemetery puca': 3.24, 'frost giant': 1.08, 'wirewood symbiote': 3.43, 'whisperwood elemental': 0.77, 'celestial dawn': 1.05, 'sidisi, brood tyrant': 1.8, 'pull from tomorrow': 3.87, "puca's mischief": 2.29, 'dovin baan': 0.97, 'chromanticore': 1.29, 'cathedral of war': 1.35, 'sphinx sovereign': 1.62, 'timely reinforcements': 0.57, 'disentomb': 1.56, 'thief of sanity': 1.68, 'icon of ancestry': 3.7, 'falkenrath aristocrat': 0.53, 'runed halo': 0.15, 'samut, the tested': 0.97, 'mistcutter hydra': 1.36, 'heedless one': 2.06, 'nether spirit': 0.08, 'martial coup': 0.24, 'that which was taken': 11.77, 'angel of finality': 0.13, 'ambush commander': 0.68, 'declaration in stone': 0.41, 'horror of horrors': 0.12, "lifecrafter's bestiary": 0.59, 'cleansing meditation': 1.66, 'cold storage': 0.88, 'crumble': 0.09, 'batwing brume': 2.44, 'grim poppet': 2.73, 'shatter the sky': 0.24, 'gravespawn sovereign': 0.3, 'preemptive strike': 4.5, 'kher keep': 0.9, 'avatar of slaughter': 2.91, 'sanctum seeker': 0.55, 'scroll of fate': 0.27, 'spearbreaker behemoth': 2.31, 'jadelight ranger': 0.38, 'whiptail wurm': 0.32, 'kaalia, zenith seeker': 4.34, 'primal rage': 3.59, 'reassembling skeleton': 0.23, 'undergrowth champion': 2.79, 'sewer nemesis': 0.96, 'blast from the past': 0.1, 'cunning advisor': 14.18, 'rakdos the defiler': 1.79, 'mischievous quanar': 1.15, 'bristling boar': 0.01, 'imperial outrider': 0.75, 'vivien, champion of the wilds': 2.31, 'sage of fables': 1.84, 'journey to nowhere': 1.01, 'psionic sliver': 3.02, 'relic bind': 0.2, 'perimeter captain': 0.96, 'postmortem lunge': 0.48, "paupers' cage": 2.39, 'bow of the hunter': 1.21, 'monstrous hound': 0.23, 'exotic orchard': 0.25, 'hanweir battlements': 3.12, 'jugan, the rising star': 0.91, 'legacy weapon': 4.85, 'standard bearer': 0.41, 'homura, human ascendant': 3.49, 'untaidake, the cloud keeper': 2.56, 'tor wauki': 0.06, 'time distortion': 1.59, 'unbreakable formation': 0.38, 'ruthless ripper': 0.1, 'possessed portal': 3.62, 'bloodgift demon': 1.46, 'izzet steam maze': 1.6, 'hammer of bogardan': 0.3, 'rite of the raging storm': 5.03, 'blood clock': 2.67, 'o-naginata': 0.31, 'wretched confluence': 1.44, 'sandsteppe citadel': 0.69, 'great defender': 3.98, 'twinning staff': 2.83, 'trostani discordant': 1.15, 'release the dogs': 0.14, "slayers' stronghold": 0.22, "thieves' auction": 3.89, 'taurean mauler': 0.33, 'skullwinder': 0.43, 'mulldrifter': 0.25, 'soul of the harvest': 1.0, 'harmonic sliver': 0.68, 'dwarven song': 5.22, 'light from within': 1.78, 'keep watch': 1.75, 'time stop': 5.52, 'jagged-scar archers': 0.1, 'autochthon wurm': 2.27, 'primordial sage': 0.34, 'the cheese stands alone': 3.55, 'bogstomper': 0.46, 'crush of tentacles': 1.92, 'surrak dragonclaw': 3.63, 'glistening oil': 2.59, 'umbilicus': 3.7, 'zealous conscripts': 1.85, 'submerge': 7.12, 'order of whiteclay': 1.93, 'mosswort bridge': 0.32, 'wall of junk': 1.61, 'thopter foundry': 0.22, 'citanul flute': 3.13, "magewright's stone": 7.42, 'elemental bond': 2.68, "oona's prowler": 2.53, 'takara': 9.0, 'long-term plans': 4.57, 'ancient stirrings': 0.3, 'languish': 0.42, 'radjan spirit': 0.07, 'crovax the cursed': 1.02, 'covetous dragon': 7.29, "soul's attendant": 3.42, 'not of this world': 2.73, 'pride of lions': 0.25, 'go for the throat': 0.8, 'diabolic revelation': 1.56, 'magma giant': 0.14, 'iron maiden': 4.05, 'armadillo cloak': 0.5, 'risk factor': 1.42, 'shield of the oversoul': 5.58, 'sir shandlar of eberyn': 1.01, 'balduvian rage': 0.17, 'wall of blossoms': 0.24, 'dovin, grand arbiter': 0.43, 'kathril, aspect warper': 0.65, 'rout': 0.44, 'nacatl war-pride': 3.15, 'forgotten ancient': 1.17, 'well of ideas': 1.16, 'darien, king of kjeldor': 7.35, 'muraganda petroglyphs': 0.42, 'aethersnatch': 1.6, 'hour of promise': 1.06, 'bruna, light of alabaster': 1.19, 'bloodlord of vaasgoth': 0.59, 'mana-charged dragon': 1.48, 'myriad landscape': 0.24, 'everlasting torment': 2.03, 'sword of dungeons & dragons': 2.62, 'minamo': 2.44, 'boompile': 1.39, 'spire of industry': 2.77, 'draining whelk': 0.4, 'darigaaz, the igniter': 0.55, 'forsaken city': 2.1, 'mirror entity': 0.44, 'devout invocation': 1.56, 'tome of legends': 4.68, 'segovian leviathan': 0.15, 'vilis, broker of blood': 4.33, 'tectonic edge': 1.06, 'deus of calamity': 0.74, 'rubblebelt recluse': 0.78, 'mage slayer': 9.21, "karn's bastion": 5.15, 'tortured existence': 1.06, 'sunscape familiar': 1.31, 'chronatog': 3.82, 'nimble birdsticker': 0.48, 'incongruity': 0.1, "kaya's guile": 3.26, 'mistblade shinobi': 1.18, 'sphinx of the final word': 1.25, "gerrard's wisdom": 0.22, 'incubation': 0.1, 'null chamber': 2.33, 'incubation druid': 1.3, 'tajuru preserver': 3.4, 'unsettled mariner': 3.11, 'maga, traitor to mortals': 3.8, 'gravitational shift': 3.57, 'chromatic sphere': 0.8, 'nomad mythmaker': 3.29, 'illicit auction': 2.22, 'shrieking specter': 0.87, "yeva, nature's herald": 2.87, 'magus of the wheel': 0.66, 'upheaval': 0.08, 'overseer of the damned': 0.32, 'needle drop': 0.99, 'righteous confluence': 1.31, 'heavenly blademaster': 3.82, 'quest for renewal': 4.88, 'ulrich of the krallenhorde': 7.49, 'wall of roots': 0.35, 'fiery gambit': 2.88, 'crimson kobolds': 0.98, 'spider umbra': 0.31, 'cromat': 3.61, 'sudden shock': 0.05, 'tunnel vision': 3.65, 'cazur, ruthless stalker': 0.7, 'cleansing nova': 0.37, 'phyrexian scriptures': 3.52, 'ulrich, uncontested alpha': 7.49, 'the maelstrom': 1.81, 'life and limb': 0.51, 'charming prince': 2.1, "commander's sphere": 0.23, 'twilight drover': 0.31, 'imperial edict': 3.14, 'abundance': 3.35, 'darkheart sliver': 0.3, 'holy light': 0.97, 'gilder bairn': 1.25, 'three wishes': 3.38, 'clone legion': 3.1, 'puppeteer clique': 3.59, 'voldaren pariah': 2.37, 'hydroblast': 0.6, 'wastes': 2.24, 'planar birth': 3.53, 'savra, queen of the golgari': 4.16, 'mark of asylum': 1.62, 'shivan gorge': 4.17, 'varina, lich queen': 0.97, 'pathrazer of ulamog': 4.03, 'goblin war strike': 0.84, 'abolisher of bloodlines': 2.37, 'soltari champion': 0.97, 'celestial kirin': 0.85, 'goblin ringleader': 0.32, 'hulking ogre': 0.26, 'snow-covered forest': 0.93, 'coretapper': 0.19, 'generous patron': 2.71, 'psychic corrosion': 2.42, 'dwarven recruiter': 3.06, 'niv-mizzet, parun': 3.53, 'owl familiar': 0.32, 'mul daya channelers': 1.18, 'cauldron familiar': 0.62, 'shadowborn demon': 1.1, 'treefolk harbinger': 1.47, 'snapping drake': 0.39, 'hellspark elemental': 0.32, 'leyline of punishment': 2.55, 'meteor crater': 4.83, 'rage reflection': 0.82, 'chaotic aether': 1.67, 'afiya grove': 3.13, 'joiner adept': 4.35, 'purgatory': 4.16, 'drowned secrets': 1.08, 'gruul spellbreaker': 0.44, 'wake of destruction': 3.5, 'sea of sand': 1.61, 'spelltithe enforcer': 1.97, 'aphetto alchemist': 4.18, 'momentous fall': 0.44, 'lightning axe': 0.09, 'undertow': 4.24, 'fountain of youth': 0.23, 'ancestral memories': 0.16, 'cloud pirates': 2.41, 'serra aviary': 0.95, 'temple of silence': 0.59, 'marble priest': 3.12, 'cindervines': 1.21, 'hour of reckoning': 0.26, 'hissing quagmire': 1.06, 'djinn of the lamp': 0.54, 'sokenzan': 1.65, "tsabo's web": 4.18, 'lightning skelemental': 0.85, 'mirror-sigil sergeant': 2.16, 'blistering firecat': 2.0, 'grafted wargear': 0.12, 'glimmervoid basin': 2.37, 'phyrexian hydra': 1.74, 'archetype of courage': 1.09, 'guttural response': 0.93, 'brindle shoat': 0.09, 'heartseeker': 3.23, 'domri, city smasher': 0.94, 'argothian wurm': 4.72, 'stromgald crusader': 0.75, 'abyssal persecutor': 0.7, 'radiate': 4.16, "scout's warning": 4.77, 'oakenform': 0.55, 'sorin, vengeful bloodlord': 1.5, 'immortal phoenix': 0.85, 'pulverize': 0.71, 'iridescent angel': 1.53, 'fields of summer': 1.75, 'shardless agent': 0.26, 'endless wurm': 0.71, 'predict': 0.26, 'treasonous ogre': 5.5, "life's legacy": 3.06, 'apocalypse hydra': 0.34, 'preyseizer dragon': 0.52, 'uncage the menagerie': 0.9, 'mirrored depths': 3.34, 'arcane laboratory': 2.4, 'anje falkenrath': 0.93, 'obstinate baloth': 0.47, 'gleemax': 4.12, 'guiding spirit': 3.65, "sarkhan's unsealing": 0.45, 'helldozer': 1.63, 'halls of mist': 4.36, 'armada wurm': 0.83, 'avatar of discord': 0.33, 'phyrexian swarmlord': 5.56, 'curse of the cabal': 6.73, 'terminate': 0.8, 'tobias andrion': 0.1, 'mist dragon': 5.32, "soul's majesty": 3.27, 'deathpact angel': 0.75, 'blood sun': 1.25, 'the pieces are coming together': 0.7, 'increasing ambition': 1.03, 'species specialist': 4.29, 'grand ossuary': 1.56, 'vorapede': 0.35, 'orzhov pontiff': 0.67, 'hogaak, arisen necropolis': 0.83, 'wellwisher': 2.18, 'rakdos guildmage': 0.18, 'firesong and sunspeaker': 0.92, 'possibility storm': 0.83, 'felidar umbra': 1.44, "akroma's vengeance": 0.26, 'eloren wilds': 1.83, 'commander greven il-vec': 0.92, "jeleva, nephalia's scourge": 1.21, 'zuberi, golden feather': 4.33, 'captive audience': 4.76, 'meloku the clouded mirror': 0.15, 'soul snuffers': 0.91, 'quick sliver': 0.44, 'bant panorama': 0.33, "militia's pride": 1.44, 'early harvest': 2.81, 'spike feeder': 0.31, 'quagmire': 3.73, 'dawnstrider': 2.05, "polymorphist's jest": 2.44, 'sydri, galvanic genius': 0.86, 'ryusei, the falling star': 1.67, 'artifact mutation': 0.33, 'skullcrack': 2.75, 'great furnace': 0.62, 'exile': 0.63, 'anaba spirit crafter': 0.91, "war's toll": 3.55, 'wildfire': 0.37, 'snake basket': 1.71, 'otaria': 1.59, 'yisan, the wanderer bard': 1.67, 'tember city': 2.92, 'fatestitcher': 2.97, 'reef worm': 0.37, 'thorn of the black rose': 0.13, 'pygmy hippo': 4.06, 'sheltered valley': 3.96, 'flooded shoreline': 4.87, "dack's duplicate": 0.9, 'skeleton ship': 0.9, 'river delta': 1.91, 'circular logic': 0.26, 'wash out': 1.3, 'underworld sentinel': 0.21, 'zedruu the greathearted': 1.18, 'paradox haze': 10.22, 'golgari thug': 0.68, 'spectral guardian': 2.53, 'vorel of the hull clade': 2.09, 'bargain': 0.84, "kaya's wrath": 1.1, 'crescendo of war': 0.9, 'phantom nishoba': 1.03, 'shambling vent': 1.54, 'final judgment': 3.4, 'alpine moon': 8.59, 'pandemonium': 0.82, 'holy day': 0.46, 'citanul hierophants': 3.93, 'oran-rief, the vastwood': 0.57, 'dragon whisperer': 0.88, 'loxodon gatekeeper': 4.01, 'seed the land': 4.05, 'gavi, nest warden': 0.54, 'bloodsworn steward': 0.25, 'vaevictis asmadi, the dire': 2.6, 'sarkhan, the dragonspeaker': 0.94, 'starfield mystic': 2.24, 'grixis': 1.72, 'cloud of faeries': 0.89, 'pramikon, sky rampart': 0.89, 'the fourth sphere': 2.16, 'seat of the synod': 2.52, 'blinding angel': 2.75, 'mistveil plains': 1.81, "mangara's tome": 6.64, 'assemble the legion': 2.39, "sekki, seasons' guide": 3.67, 'basandra, battle seraph': 2.05, 'pact of the titan': 0.26, 'veteran cavalier': 0.09, 'jeska, warrior adept': 2.93, 'i know all, i see all': 0.88, 'maddening imp': 1.92, 'dense foliage': 0.88, 'mogg raider': 0.28, 'omen of fire': 5.61, 'soraya the falconer': 2.68, 'throne of geth': 0.27, 'avaricious dragon': 2.02, 'furystoke giant': 3.73, 'aetherworks marvel': 1.36, 'opal archangel': 5.56, 'gempalm incinerator': 1.04, 'electrodominance': 2.19, 'walking dead': 2.25, "anje's ravager": 0.27, 'scourge of kher ridges': 2.73, 'devastation tide': 2.02, 'phyrexian marauder': 3.84, 'kinsbaile borderguard': 1.3, 'tahngarth': 4.32, 'bident of thassa': 3.79, 'wall of reverence': 1.8, 'phyrexian portal': 0.87, 'raving dead': 1.42, 'circle of protection: art': 0.12, "artificer's intuition": 2.21, 'geier reach sanitarium': 0.95, 'hornet nest': 0.69, 'kabira evangel': 0.48, 'elkin lair': 3.45, "mirrodin's core": 0.25, 'magmatic force': 0.41, 'deflecting palm': 0.77, 'shimian night stalker': 0.12, 'throne of the high city': 3.53, 'harmony of nature': 6.71, 'lin sivvi, defiant hero': 3.31, "mastermind's acquisition": 0.84, 'hand of justice': 0.86, 'hull breach': 1.29, 'pyretic ritual': 3.65, 'sage of lat-nam': 0.1, 'prison term': 1.08, 'drown in the loch': 1.87, 'orochi colony': 1.51, 'the aether flues': 2.15, 'rites of flourishing': 0.64, 'mossbridge troll': 4.01, 'increasing confusion': 1.43, 'zodiac snake': 6.64, 'mindcrank': 5.77, 'flaring pain': 0.54, 'undercity reaches': 1.83, 'goblin chainwhirler': 0.34, "pain's reward": 2.54, 'ashiok, dream render': 1.36, 'lynx': 0.56, 'misthollow griffin': 0.98, 'blade splicer': 0.66, 'winds of rath': 0.11, "in garruk's wake": 0.76, 'rampant growth': 0.59, "magistrate's scepter": 0.4, 'ogre battledriver': 0.62, 'infernal spawn of infernal spawn of evil': 0.14, 'last one standing': 3.79, 'glory of warfare': 1.5, 'bronze bombshell': 2.66, 'armored pegasus': 0.04, 'river kelpie': 0.19, 'marble diamond': 0.19, 'hanweir, the writhing township': 0.85, 'sadistic sacrament': 1.84, 'impending disaster': 1.21, 'myr matrix': 4.47, 'scythe of the wretched': 6.22, 'scrap trawler': 0.48, 'hanweir garrison': 2.28, "raven's run": 2.16, 'argentum armor': 0.3, "aminatou's augury": 2.5, 'conflux': 2.86, 'felidar sovereign': 2.21, 'stern marshal': 0.61, 'tendrils of agony': 0.85, 'mina and denn, wildborn': 0.6, 'ashiok, sculptor of fears': 2.09, 'loxodon warhammer': 0.28, 'puppet master': 0.09, 'deadfall': 5.06, 'mayael the anima': 1.55, 'archangel of strife': 0.81, 'anafenza, kin-tree spirit': 1.88, 'priest of yawgmoth': 1.93, 'drove of elves': 0.91, 'mirrorworks': 1.36, 'turri island': 1.78, 'vhati il-dal': 0.42, "shapers' sanctuary": 0.9, 'torrent of lava': 1.39, 'dualcaster mage': 0.2, 'boreas charger': 0.21, 'unnatural selection': 5.28, 'corrosion': 2.59, 'choose your champion': 2.44, 'kilnmouth dragon': 0.7, 'sinew sliver': 0.21, 'asmira, holy avenger': 3.17, 'the hippodrome': 1.75, 'angel of grace': 0.83, 'ash barrens': 0.5, 'panglacial wurm': 1.95, 'electric eel': 1.65, 'trash for treasure': 0.35, "mind's desire": 0.2, 'open the armory': 0.83, 'indomitable creativity': 5.46, 'krovikan horror': 0.84, 'resolute archangel': 1.19, 'fault line': 5.26, 'treetop defense': 0.53, 'tempered steel': 4.48, "archon of sun's grace": 0.33, 'from the ashes': 0.77, 'baron von count': 1.32, 'might sliver': 0.25, 'herald of anguish': 1.72, 'intrepid hero': 0.65, 'ratcatcher': 1.91, 'orcish cannonade': 0.01, 'krallenhorde howler': 3.16, 'archfiend of depravity': 3.81, 'aetherspouts': 0.23, 'dismantling wave': 0.48, 'sakiko, mother of summer': 3.51, 'utopia tree': 2.37, "illusionist's gambit": 2.3, 'knight of new alara': 0.88, 'stronghold furnace': 2.45, 'entrapment maneuver': 1.5, 'road of return': 0.28, 'shu elite companions': 0.83, 'giant adephage': 0.86, 'duskwatch recruiter': 3.16, 'endrek sahr, master breeder': 2.45, 'cruel entertainment': 3.55, 'in the web of war': 2.15, 'snow-covered mountain': 0.62, 'boreal druid': 3.53, 'hooded hydra': 0.51, 'wellspring': 4.16, 'worn powerstone': 1.44, 'snap': 3.49, 'reverent mantra': 2.75, 'jazal goldmane': 2.25, 'mystical dispute': 0.83, 'mwonvuli acid-moss': 0.81, 'tainted field': 0.19, "sigarda, heron's grace": 0.44, 'yavimaya wurm': 0.04, 'gitaxian probe': 2.17, 'mountain valley': 2.34, 'aphetto runecaster': 0.49, 'siege mastodon': 0.41, 'regisaur alpha': 1.12, 'lorthos, the tidemaker': 2.72, 'domri, anarch of bolas': 1.29, 'kry shield': 3.27, 'rally the ancestors': 0.47, 'krosan verge': 0.24, 'eight-and-a-half-tails': 3.72, 'hellcarver demon': 0.93, 'stalwart shield-bearers': 0.66, 'indomitable archangel': 1.09, 'aether gale': 0.61, 'gravestorm': 2.29, 'spiteful prankster': 0.28, 'rampaging baloths': 0.22, 'grimoire thief': 1.75, 'lash of the tyrant': 9.24, 'capricious sorcerer': 1.16, 'deepchannel mentor': 5.5, 'chromium, the mutable': 0.77, 'gather the pack': 0.17, 'hateflayer': 1.83, 'herald of serra': 4.4, 'gemhide sliver': 0.39, 'scroll of avacyn': 0.13, 'garbage elemental': 0.35, 'nullhide ferox': 0.39, 'ravenous rats': 0.36, 'ohran viper': 0.79, 'arcbound overseer': 4.21, 'bonecrusher giant': 0.43, 'guiltfeeder': 1.15, 'culling the weak': 5.91, 'stomp': 0.43, 'necromantic selection': 0.24, "sunbird's invocation": 0.5, 'dragon tempest': 4.75, 'immerwolf': 4.06, 'icatian lieutenant': 0.81, 'dimir guildmage': 0.07, 'yellow scarves cavalry': 9.62, 'architects of will': 0.72, 'krond the dawn-clad': 0.95, 'jeskai ascendancy': 0.85, 'ertai': 13.11, 'kaho, minamo historian': 2.26, 'shrieking affliction': 0.64, 'farseek': 1.82, 'sanctum of serra': 2.36, 'hero of oxid ridge': 0.93, 'dramatic entrance': 1.44, 'sweltering suns': 0.37, 'burn at the stake': 0.92, 'willow priestess': 0.8, 'wilderness reclamation': 2.25, 'feral hydra': 0.25, 'arcane sanctum': 0.65, 'primeval protector': 3.57, 'gorgon flail': 1.54, 'disciple of bolas': 0.31, 'deathmist raptor': 0.31, 'narset, enlightened master': 1.34, 'dwarven weaponsmith': 0.17, 'mystic decree': 0.8, 'nightveil specter': 0.73, 'nightmare shepherd': 0.63, 'verix bladewing': 1.08, 'exquisite archangel': 2.64, 'ashen powder': 0.93, 'dauntless escort': 2.19, 'faithless looting': 0.47, 'zetalpa, primal dawn': 0.21, 'call to the grave': 1.59, 'vastwood hydra': 0.45, 'silent specter': 0.53, 'taniwha': 4.02, 'chicken à la king': 0.14, 'custodi lich': 3.51, 'burning sands': 2.17, 'plea for power': 0.79, 'one with nothing': 1.71, 'beacon of creation': 24.0, 'orzhova': 1.72, 'cradle of vitality': 0.47, 'wild pair': 2.55, 'flourishing defenses': 0.92, 'bloodtracker': 0.22, 'ichorclaw myr': 0.81, 'circu, dimir lobotomist': 1.6, 'memnite': 0.65, 'dimir doppelganger': 1.09, 'siege behemoth': 1.8, 'dread return': 0.41, 'acidic soil': 2.97, 'the circle of loyalty': 0.62, 'reckless one': 2.37, 'mind stone': 0.71, 'planar collapse': 1.81, 'skeletal snake': 0.2, 'duskmantle guildmage': 0.91, "rune-tail's essence": 4.16, 'devastating summons': 0.28, 'prophetic flamespeaker': 0.74, 'rashmi, eternities crafter': 0.55, 'ichor rats': 0.96, 'persecute': 0.37, 'unearth': 0.29, 'lieutenant kirtar': 1.82, "hanna's custody": 3.28, 'myth unbound': 1.95, 'chief engineer': 0.77, 'dwarven thaumaturgist': 5.62, 'legion lieutenant': 1.84, 'thragtusk': 0.27, 'radiant destiny': 1.72, 'warrior angel': 0.4, 'glaring spotlight': 1.09, 'mazemind tome': 0.57, 'telemin performance': 1.21, 'memory erosion': 2.52, 'nazahn, revered bladesmith': 0.77, 'young pyromancer': 0.44, 'burning cinder fury of crimson chaos fire': 0.7, 'mask of memory': 0.41, 'hollow one': 1.11, 'voltaic key': 1.45, 'paradoxical outcome': 0.48, 'pariah': 1.95, 'dead of winter': 0.77, 'overmaster': 11.35, 'rite of passage': 4.06, 'isolated watchtower': 1.5, 'the eon fog': 1.55, 'creeping corrosion': 0.41, 'feeding grounds': 1.82, 'squirrel wrangler': 8.62, 'sprouting phytohydra': 4.41, 'interplanar tunnel': 1.38, 'congregation at dawn': 5.24, 'dread charge': 0.78, "virtue's ruin": 1.06, 'wild defiance': 0.48, 'winter sky': 1.82, 'marhault elsdragon': 0.08, 'acorn catapult': 12.17, 'savageborn hydra': 0.3, 'tidehollow sculler': 0.59, 'braids, conjurer adept': 1.29, 'ghost town': 3.14, 'necropolis': 3.27, "faith's reward": 2.38, 'blighted agent': 0.89, 'grasp of darkness': 0.01, 'phyrexian processor': 3.37, 'worldfire': 7.16, 'filth': 3.42, 'leyline of lifeforce': 3.3, 'teysa karlov': 3.2, 'naar isle': 1.78, 'drakuseth, maw of flames': 3.91, 'medomai the ageless': 1.52, 'timberline ridge': 2.34, 'vines of vastwood': 1.19, 'angelic skirmisher': 1.62, 'the great forest': 1.7, "sarkhan's whelp": 1.48, 'simic charm': 0.1, 'crookshank kobolds': 0.76, 'wee dragonauts': 0.05, 'supply runners': 0.19, 'maraxus of keld': 4.51, 'sly spy': 1.1, 'walking archive': 3.01, 'thopter spy network': 1.61, 'serpent of yawning depths': 15.83, "liliana's mastery": 0.34, 'snow-covered swamp': 1.14, 'howling fury': 0.46, 'thrull champion': 0.76, 'zurgo bellstriker': 0.46, 'goblin bushwhacker': 0.65, 'flickerwisp': 0.12, 'staff of nin': 1.65, 'delraich': 0.73, 'autumn willow': 0.75, 'demonlord belzenlok': 1.69, 'spiritual asylum': 1.2, 'bear cub': 2.65, 'azorius guildmage': 0.23, 'desert drake': 0.23, 'finale of eternity': 1.72, 'slippery bogle': 1.42, 'supreme inquisitor': 0.94, 'scryb ranger': 0.31, 'incandescent soulstoke': 1.26, 'the dead shall serve': 0.7, 'merieke ri berit': 4.3, 'blackmail': 0.68, 'caller of the claw': 1.0, 'child of gaea': 0.43, 'ravenous slime': 2.61, "river's rebuke": 1.2, 'herald of secret streams': 3.13, 'sangromancer': 0.6, 'lethal vapors': 5.38, 'gray merchant of asphodel': 0.48, 'time bomb': 0.34, 'scion of the ur-dragon': 6.34, 'paladin en-vec': 0.41, 'broodstar': 0.58, 'boros reckoner': 0.64, "heliod's intervention": 2.82, 'mageta the lion': 2.16, 'lava tubes': 2.25, 'dust to dust': 0.51, 'okiba-gang shinobi': 1.46, 'cliffside market': 1.79, 'velis vel': 1.66, 'goblin instigator': 0.23, 'purity': 1.91, 'pillaging horde': 0.74, 'rakdos signet': 0.42, 'every hope shall vanish': 0.7, 'bant': 1.83, 'taunt': 0.96, 'krosan beast': 11.38, 'immersturm': 2.75, 'verdant embrace': 0.12, 'springjack pasture': 1.28, 'dream salvage': 1.02, 'sporogenesis': 2.07, 'infernal denizen': 1.62, 'hushbringer': 0.68, 'thistledown liege': 1.7, 'chancellor of the forge': 2.4, 'wake thrasher': 0.67, 'tayam, luminous enigma': 0.68, 'free-for-all': 1.24, 'pyromancer ascension': 0.31, 'dragon tyrant': 2.36, 'veteran explorer': 0.22, 'fury storm': 7.38, 'harvester of souls': 1.12, 'ulvenwald tracker': 2.39, 'mogg maniac': 0.73, 'goblin game': 0.85, 'chaotic goo': 3.44, 'bottomless pit': 2.72, 'icequake': 0.73, 'qasali slingers': 4.78, 'goblin mime': 0.12, 'palace siege': 1.42, 'panopticon': 1.94, 'incoming!': 1.26, 'eternal warrior': 0.12, 'kelsien, the plague': 0.78, 'i delight in your convulsions': 0.75, "summoner's egg": 3.43, 'eidolon of countless battles': 1.34, 'infernal contract': 0.33, 'nightstalker engine': 0.46, 'seton, krosan protector': 2.05, 'niv-mizzet, dracogenius': 0.65, 'runic armasaur': 3.49, 'castigate': 0.22, 'heart of kiran': 0.49, 'foil': 0.39, 'mutual epiphany': 1.68, 'shield wall': 0.1, 'galecaster colossus': 4.07, 'cordial vampire': 0.87, 'embargo': 1.41, 'confusion in the ranks': 4.2, 'true believer': 1.52, "tawnos, urza's apprentice": 0.72, 'pride sovereign': 2.53, 'hallowed burial': 1.17, 'tectonic instability': 6.02, 'bottomless vault': 1.42, 'kami of the crescent moon': 0.67, 'stalking leonin': 0.18, 'door to nothingness': 1.64, 'wu scout': 7.31, 'skaab ruinator': 1.22, 'shadowmage infiltrator': 0.27, 'night soil': 1.69, 'crystal vein': 2.17, 'sun droplet': 0.14, 'gelatinous genesis': 0.41, 'ascendant evincar': 0.92, 'increasing vengeance': 0.58, 'agyrem': 1.86, 'mirko vosk, mind drinker': 1.04, 'mission briefing': 0.85, 'champion of dusk': 0.32, 'morphic tide': 1.39, 'yixlid jailer': 0.1, 'rayne, academy chancellor': 2.65, 'tamiyo, collector of tales': 0.68, 'cursecatcher': 0.46, 'bull hippo': 0.19, 'spear of heliod': 0.98, 'sovereigns of lost alara': 0.85, 'etrata, the silencer': 0.4, 'the dark barony': 1.42, 'ral, storm conduit': 1.85, 'divine offering': 0.08, 'comet storm': 0.42, "opal-eye, konda's yojimbo": 6.11, 'reflector mage': 0.46, 'rift bolt': 0.35, 'feather, the redeemed': 0.69, 'esper panorama': 0.28, 'temple bell': 2.64, 'spellbreaker behemoth': 0.77, 'exalted dragon': 0.71, 'volcanic fallout': 0.04, 'rolling stones': 1.55, 'swirling sandstorm': 0.28, 'xenograft': 1.64, 'ancestral mask': 1.48, 'stubborn denial': 1.22, 'stromkirk captain': 0.21, 'llanowar': 2.67, 'seeker': 0.07, 'searing blood': 0.31, 'goblin flotilla': 1.95, 'docent of perfection': 4.14, 'citadel of pain': 2.88, 'fungus sliver': 0.51, 'behold the beyond': 1.01, 'ghoultree': 0.5, 'might of old krosa': 0.3, 'might of oaks': 0.26, 'aria of flame': 1.01, 'wall of spears': 0.09, 'uba mask': 17.6, 'lightning serpent': 1.28, 'orim, samite healer': 0.71, 'hypnox': 0.63, 'grozoth': 3.96, 'final iteration': 4.14, 'ventifact bottle': 1.41, 'darigaaz reincarnated': 1.36, 'kestia, the cultivator': 0.71, 'enduring renewal': 2.91, "nature's wrath": 0.7, 'aretopolis': 0.93, 'ice cauldron': 0.7, 'kagemaro, first to suffer': 2.08, 'murasa': 1.68, 'archon of justice': 0.18, 'wielding the green dragon': 6.82, 'qasali pridemage': 0.62, 'terror of kruin pass': 5.98, 'psychic network': 0.77, 'trail of the mage-rings': 1.12, 'steel hellkite': 0.71, 'obsidian fireheart': 1.07, 'kruin outlaw': 5.98, 'witchbane orb': 0.48, 'swans of bryn argoll': 0.78, 'skeleton archer': 0.02, "twilight's call": 0.88, 'shivan hellkite': 0.09, 'scattershot archer': 0.39, 'sasaya, orochi ascendant': 2.64, 'neko-te': 5.23, 'adarkar valkyrie': 0.82, 'stitch together': 2.46, 'orb of dreams': 6.48, 'canopy dragon': 2.93, 'generous gift': 2.51, 'sylvan offering': 3.1, 'spinerock knoll': 0.19, "winter's grasp": 0.27, "druid's call": 11.6, 'verdeloth the ancient': 1.86, 'banefire': 0.73, 'equinox': 4.2, 'katabatic winds': 2.64, 'once more with feeling': 0.77, 'natural spring': 0.01, 'jolrael, mwonvuli recluse': 0.35, "nature's chosen": 1.2, 'naya': 1.47, 'spontaneous generation': 2.44, 'curse of vengeance': 17.18, 'fiery fall': 0.03, 'lethe lake': 2.01, 'temple of abandon': 1.21, 'hypergenesis': 0.85, 'unstable obelisk': 0.12, 'soltari priest': 0.22, 'bind': 1.37, 'infernal kirin': 3.66, 'elven lyre': 0.69, 'immortal servitude': 0.4, 'cruel fate': 0.71, 'reins of power': 1.37, 'ayli, eternal pilgrim': 0.94, 'careful study': 1.5, 'land cap': 2.05, 'goblin warchief': 0.53, 'eye of singularity': 1.99, 'eye of ramos': 2.21, 'veldt': 1.73, 'tundra wolves': 0.06, 'spellbook': 1.27, 'bloodhill bastion': 1.75, "kiku, night's flower": 2.07, 'countersquall': 0.91, 'admiral beckett brass': 3.03, 'riddle of lightning': 0.01, 'prahv': 0.97, 'cruel reality': 7.28, 'anaba ancestor': 0.68, 'linvala, the preserver': 0.79, 'wandering fumarole': 1.0, 'root sliver': 4.59, 'letter bomb': 2.64, 'weaver of lightning': 0.07, 'hada freeblade': 0.28, 'hellrider': 0.4, "winter's chill": 2.22, 'pako, arcane retriever': 0.9, 'boggart shenanigans': 1.96, 'your fate is thrice sealed': 0.69, 'cauldron haze': 1.54, 'gravebind': 0.68, 'declaration of naught': 1.5, "jabari's influence": 3.04, 'sulfuric vortex': 1.27, 'masako the humorless': 6.31, 'sensei golden-tail': 1.9, 'tragic arrogance': 0.58, 'acquire': 3.32, 'zombify': 0.24, 'flameblast dragon': 0.4, 'elvish mystic': 0.52, "jarad's orders": 1.22, 'quirion druid': 4.86, 'wolfir silverheart': 0.86, 'llanowar reborn': 0.21, 'royal trooper': 0.03, 'torrent elemental': 0.46, 'disciple of the ring': 0.59, 'blazing archon': 2.26, 'greenwarden of murasa': 0.84, 'pili-pala': 2.08, 'lhurgoyf': 0.37, 'goblin trashmaster': 2.83, 'march of souls': 1.37, 'scrap mastery': 5.28, 'wildblood pack': 5.33, 'battle screech': 0.21, 'thantis, the warweaver': 0.67, 'always watching': 0.96, 'benevolent offering': 0.48, 'cast off': 0.26, 'leeching sliver': 2.06, 'energy vortex': 4.19, 'aegis of honor': 0.84, 'arrogant wurm': 0.67, 'ezuri, claw of progress': 8.49, 'tomb of the dusk rose': 0.94, 'death pits of rath': 0.43, 'padeem, consul of innovation': 1.5, 'farhaven elf': 0.15, 'voracious dragon': 0.71, 'explosive vegetation': 1.41, 'mwonvuli ooze': 2.25, 'woe strider': 1.66, 'volcanic offering': 2.12, 'uncle istvan': 0.26, 'hope of ghirapur': 2.12, 'realm-cloaked giant': 0.26, 'flame rift': 0.04, 'thundermare': 0.51, 'dakmor plague': 0.43, 'kamahl, pit fighter': 0.18, 'profane procession': 0.94, 'arch of orazca': 1.25, 'mentor of the meek': 0.25, 'caller of the hunt': 1.54, 'heirloom blade': 0.1, 'snow-covered plains': 0.25, 'drana, kalastria bloodchief': 0.48, 'instigator gang': 5.33, 'reality shaping': 1.63, 'soul echo': 3.42, 'chance for glory': 1.41, 'reality twist': 2.93, 'salvage': 7.66, 'chandra, acolyte of flame': 0.86, "geth's grimoire": 4.39, 'demon of dark schemes': 1.72, 'sultai emissary': 0.11, 'glen elendra': 1.24, 'bubbling muck': 2.7, 'blessed reversal': 0.27, 'the great aurora': 1.11, 'scab-clan berserker': 0.39, "oketra's monument": 1.98, 'lightning blow': 0.66, 'vernal equinox': 1.84, 'caldera lake': 0.66, 'relentless rats': 1.53, 'lash out': 0.14, 'renegade troops': 6.09, 'inkfathom infiltrator': 4.65, "misers' cage": 2.89, 'gavony': 1.62, "outlaws' merriment": 1.31, 'rite of flame': 2.02, 'seaside citadel': 1.15, 'countryside crusher': 0.83, 'sword of vengeance': 0.29, 'triangle of war': 0.66, "shirei, shizo's caretaker": 0.45, 'nature demands an offering': 0.78, 'rotting rats': 1.22, 'drogskol captain': 0.24, 'junk diver': 3.74, 'cloudshredder sliver': 2.27, 'sacred guide': 0.8, 'krallenhorde killer': 1.85, 'eidolon of rhetoric': 0.96, 'ever-watching threshold': 1.38, 'konda, lord of eiganjo': 5.06, 'slaughter the strong': 0.23, 'radha, heir to keld': 0.3, "r&d's secret lair": 4.06, 'wolfbitten captive': 1.85, 'victual sliver': 0.19, 'auspicious ancestor': 3.69, 'story circle': 1.03, 'nimble obstructionist': 0.19, 'fires of yavimaya': 0.56, 'avenging angel': 0.65, 'logic knot': 0.05, 'academy at tolaria west': 2.0, 'the cauldron of eternity': 0.87, 'palace sentinels': 0.03, 'order of the sacred torch': 0.35, 'orc general': 0.65, 'nin, the pain artist': 0.47, 'primeval force': 0.13, 'perilous forays': 3.36, 'spined wurm': 0.02, 'heartless hidetsugu': 3.81, 'adorned pouncer': 1.12, 'fecundity': 0.54, 'witchstalker': 0.41, 'rhythm of the wild': 4.9, 'sickening shoal': 2.25, 'quicksilver fountain': 2.66, 'thorncaster sliver': 1.89, 'artisan of kozilek': 1.05, 'dictate of kruphix': 2.11, "trailblazer's boots": 2.69, 'false cure': 2.68, 'faith healer': 2.17, 'chalice of life': 0.46, 'chalice of death': 0.46, 'akoum': 1.03, 'selesnya loft gardens': 1.28, 'sheltering ancient': 0.6, 'gerrard, weatherlight hero': 0.22, 'knight-captain of eos': 2.64, 'leeches': 0.65, 'unbreathing horde': 1.05, 'finest hour': 0.59, "legion's end": 0.25, 'unexpectedly absent': 0.17, 'unesh, criosphinx sovereign': 0.95, 'morality shift': 3.49, "talara's battalion": 0.17, 'molimo, maro-sorcerer': 0.07, 'dwarven hold': 1.2, 'geosurge': 0.35, 'mairsil, the pretender': 0.64, 'archfiend of ifnir': 1.85, 'benalish marshal': 0.69, 'merfolk trickster': 0.9, 'myr retriever': 0.43, 'yannik, scavenging sentinel': 0.46, 'mimic vat': 0.31, 'wand of ith': 2.11, 'castle vantress': 2.23, 'forbidden ritual': 3.13, 'deeproot elite': 0.9, 'yennett, cryptic sovereign': 0.64, 'forced march': 0.72, 'sire of insanity': 1.28, 'tithe taker': 0.93, 'ring of renewal': 0.64, 'spark fiend': 0.52, 'turntimber sower': 0.94, 'golden bear': 2.8, 'peregrine drake': 2.7, 'collective unconscious': 2.07, 'brutal hordechief': 0.87, 'quest for the goblin lord': 0.85, 'dawn of the dead': 3.43, 'helm of the gods': 1.5, "ertai's familiar": 2.15, 'desperate ritual': 1.67, 'proper burial': 1.71, "kaervek's spite": 2.33, 'prismatic strands': 0.25, 'dark salvation': 0.24, 'balduvian horde': 0.02, 'planar chaos': 1.81, 'sacred mesa': 0.3, 'rushwood elemental': 0.71, 'brand of ill omen': 2.02, 'light up the stage': 0.24, 'palladia-mors, the ruiner': 0.95, 'glistener elf': 0.95, 'goblin caves': 0.64, "oona's blackguard": 0.2, 'indestructibility': 1.34, 'faeburrow elder': 2.14, "soulcatchers' aerie": 0.76, 'opt': 0.1, "crosis's catacombs": 2.04, 'reflect damage': 7.21, 'surrak, the hunt caller': 0.36, 'mortal combat': 5.33, 'narset, parter of veils': 1.22, 'extinction': 0.76, 'acidic sliver': 0.29, 'undo': 0.37, 'aboroth': 3.32, "i'm rubber, you're glue": 0.73, 'halimar depths': 0.18, 'pristine angel': 0.29, 'minion reflector': 1.9, 'mystic speculation': 1.75, 'mine, mine, mine!': 1.02, 'avacyn, guardian angel': 0.69, 'raking canopy': 0.56, 'spatial merging': 1.44, "ugin's nexus": 1.67, 'warden of the first tree': 0.35, 'ravenous baboons': 0.48, 'surly badgersaur': 0.23, 'young wolf': 0.69, 'inkwell leviathan': 0.49, 'jund': 1.02, 'sawtusk demolisher': 0.29, 'saprazzan heir': 1.38, 'nourishing shoal': 0.22, 'sands of delirium': 0.7, 'lair of the ashen idol': 1.58, 'complicate': 1.82, 'gigantosaurus': 2.05, 'shadow rift': 0.63, 'llawan, cephalid empress': 2.13, 'ninja of the deep hours': 0.92, 'skyshroud forest': 0.63, 'subversion': 2.86, 'dauthi embrace': 3.08, 'captain of the watch': 0.51, 'thraben doomsayer': 0.2, 'shabraz, the skyshark': 0.69, 'thraben inspector': 0.25, 'astral slide': 0.63, 'varolz, the scar-striped': 0.45, 'preferred selection': 2.02, 'intellectual offering': 1.83, 'overwhelming stampede': 4.89, 'mirri the cursed': 0.34, 'false peace': 0.28, 'subterranean spirit': 2.86, 'return': 0.54, 'molten echoes': 0.44, 'mogg war marshal': 0.28, 'icatian skirmishers': 1.1, 'stronghold assassin': 0.32, 'lord of the unreal': 2.03, 'forked bolt': 0.35, 'ojutai exemplars': 0.37, 'hunted phantasm': 4.75, 'surgeon ~general~ commander': 0.62, 'requiem angel': 0.57, 'hour of devastation': 0.7, 'fyndhorn pollen': 0.62, 'harvest season': 1.89, 'shifting sliver': 4.13, 'genesis chamber': 0.92, 'epic experiment': 0.36, 'phytohydra': 2.51, 'never': 0.54, 'time of need': 1.87, 'hammer of purphoros': 1.21, 'lord of the accursed': 0.38, 'emeria angel': 0.65, 'planewide disaster': 1.01, 'grove of the dreampods': 1.49, 'footsteps of the goryo': 4.4, 'lantern of insight': 3.51, 'hellkite charger': 3.52, 'radha, heart of keld': 1.06, 'magus of the tabernacle': 1.5, 'stoneforge masterwork': 2.22, 'souls of the faultless': 0.46, 'musician': 0.62, 'quicken': 0.56, 'dwarven miner': 1.89, 'verdant force': 0.43, 'jolrael, empress of beasts': 1.08, "zzzyxas's abyss": 1.25, 'cave-in': 0.68, 'blessed alliance': 0.25, 'curse of bloodletting': 4.4, 'chronozoa': 2.07, 'reflecting mirror': 1.67, 'rocky tar pit': 0.73, 'bogardan phoenix': 1.92, 'quicksilver sea': 1.78, 'dire fleet ravager': 1.99, 'windbrisk raptor': 1.49, 'crimson hellkite': 0.49, 'earthlink': 0.61, 'truga jungle': 1.63, 'impact resonance': 0.81, 'evershrike': 1.02, 'words of worship': 0.99, 'etched monstrosity': 0.27, 'archmage ascension': 2.78, 'thought reflection': 0.91, 'jwari shapeshifter': 1.02, 'dream eater': 0.98, 'waiting in the weeds': 0.71, 'choking sands': 0.61, 'mindbender spores': 2.22, 'minds aglow': 3.41, 'volrath the fallen': 0.75, 'vivid marsh': 0.87, 'morinfen': 1.94, 'vine dryad': 0.43, 'weatherlight': 0.98, 'naru meha, master wizard': 0.71, 'lim-dûl the necromancer': 2.1, 'carnifex demon': 0.76, 'perplexing chimera': 1.0, 'bring to light': 1.32, 'planar void': 6.05, 'thorn elemental': 0.1, 'apprentice necromancer': 1.49, 'epic struggle': 9.32, 'eldrazi mimic': 0.55, 'spirit shield': 1.37, 'spoils of war': 3.61, 'starke of rath': 0.61, 'deathbellow war cry': 2.14, 'ashes to ashes': 0.21, 'swarm of rats': 1.71, 'greater morphling': 2.52, 'shizuko, caller of autumn': 4.93, 'sylvan messenger': 0.1, 'giant fan': 0.71, 'dwarven armorer': 2.0, 'pine barrens': 0.6, 'plague belcher': 7.18, 'goblin marshal': 0.86, 'angel of despair': 0.99, 'spitting slug': 0.1, 'prismatic lace': 2.18, 'kavu titan': 1.16, 'spitemare': 1.19, 'dr. julius jumblemorph': 0.48, 'quicksilver gargantuan': 0.93, 'rathi assassin': 0.24, 'cranial plating': 0.55, 'energy bolt': 3.38, 'return of the wildspeaker': 1.03, 'suppression field': 3.4, "victory's envoy": 0.19, 'loam lion': 0.49, 'mnemonic betrayal': 2.91, 'emberwilde djinn': 2.17, "nature's ruin": 0.6, 'whippoorwill': 1.3, 'bureaucracy': 0.77, 'profane command': 0.25, 'seraph': 0.51, 'funeral charm': 0.99, 'sanctum of ugin': 1.06, 'tidal control': 2.29, 'imperial hellkite': 0.42, 'hecatomb': 0.25, 'implements of sacrifice': 2.5, 'second sunrise': 5.93, 'harmonize': 0.25, 'scarecrow': 0.6, "hunter's insight": 0.23, 'thunderblust': 0.35, 'hyena umbra': 0.42, 'shaman of the great hunt': 0.83, 'curiosity': 0.37, 'nature shields its own': 0.85, 'fatal lore': 2.74, 'alpha status': 4.61, 'nephalia': 0.97, 'field of souls': 0.15, 'thran turbine': 2.24, 'stensia': 1.67, 'nostalgic dreams': 0.59, 'unified will': 0.19, 'risky move': 1.64, "hidetsugu's second rite": 0.89, 'aysen crusader': 0.59, 'arctic flats': 1.88, "geth's verdict": 0.3, 'minion of leshrac': 0.59, 'seraph of the sword': 0.52, 'mangara of corondor': 0.19, 'flamewake phoenix': 0.42, 'shining shoal': 1.16, 'heart of ramos': 3.05, 'furnace layer': 1.25, 'hakim, loreweaver': 2.92, 'see the unwritten': 0.88, 'sunscorch regent': 0.74, 'descent into madness': 0.57, 'archwing dragon': 0.39, 'stabwhisker the odious': 3.79, 'grenzo, dungeon warden': 0.44, 'primal order': 0.55, 'windriddle palaces': 1.33, 'song of the worldsoul': 0.78, 'tsabo tavoc': 2.91, 'boros signet': 0.36, 'spirit of the labyrinth': 3.72, 'dormant sliver': 0.32, 'dread of night': 0.27, 'aegis of the meek': 1.86, 'barbtooth wurm': 0.18, 'rotted ones, lay siege': 0.7, 'brilliant ultimatum': 1.05, 'kilnspire district': 1.09, 'terastodon': 0.24, 'shocker': 1.24, 'tinder wall': 0.16, 'astral arena': 1.29, 'torbran, thane of red fell': 0.68, 'mind unbound': 0.67, 'rare-b-gone': 1.59, 'rhox': 0.43, 'champion of wits': 0.1, 'vodalian knights': 0.58, 'voidmage apprentice': 1.43, 'edge of malacol': 0.99, 'takenuma': 1.88, 'barbarian ring': 1.01, 'truce': 0.65, 'detection tower': 1.21, 'nightfall predator': 3.27, 'nikara, lair scavenger': 0.64, "norn's dominion": 1.21, 'vampire nighthawk': 0.2, 'brightmare': 0.09, 'sisters of stone death': 1.14, 'sphinx summoner': 0.16, 'blazing specter': 0.35, 'rimescale dragon': 5.04, 'people of the woods': 1.75, 'phyrexian delver': 3.47, 'brallin, skyshark rider': 0.81, 'battletide alchemist': 3.98, 'skysovereign, consul flagship': 1.16, 'spitting earth': 0.1, "nahiri's wrath": 0.48, 'mystic snake': 1.1, 'viashivan dragon': 2.0, 'sidar jabari': 0.58, 'avalanche riders': 0.47, 'talon gates': 1.46, 'wave of terror': 4.95, 'delaying shield': 5.8, 'lifegift': 14.33, 'locust miser': 2.17, 'daybreak ranger': 3.27, 'lightning angel': 0.18, 'ionize': 0.46, 'lightning cloud': 2.51, 'grip of chaos': 2.47, 'whispering madness': 0.87, 'cruel ultimatum': 0.46, 'jaya ballard, task mage': 0.23, 'ground seal': 0.24, 'ichorid': 0.59, 'wu admiral': 4.22, 'leyline of abundance': 1.66, 'headless horseman': 3.93, 'curse of the swine': 0.27, "kinjalli's sunwing": 2.0, 'necro-impotence': 0.82, 'dakmor salvage': 0.75, 'rorix bladewing': 0.31, 'ebon praetor': 0.57, 'rysorian badger': 1.51, 'vengeance': 0.09, 'scorched earth': 0.53, 'nefarox, overlord of grixis': 0.52, 'crypt angel': 1.48, 'increasing savagery': 0.66, 'cairn wanderer': 0.17, 'rhystic tutor': 2.61, 'radiating lightning': 0.33, "pyromancer's swath": 0.6, 'kalemne, disciple of iroas': 0.18, 'unmoored ego': 0.25, "kari zev's expertise": 0.56, 'coral eel': 0.14, 'fate unraveler': 0.76, 'breaking point': 0.32, 'aether snap': 0.62, "fool's tome": 0.27, 'aether membrane': 0.63, 'angel of sanctions': 0.28, 'rakdos, the showstopper': 2.5, 'odric, lunarch marshal': 0.27, 'introductions are in order': 0.83, 'reveka, wizard savant': 0.57, 'nyxathid': 0.17, 'call to the kindred': 0.59, "dwynen's elite": 0.25, 'rat colony': 2.28, 'reverence': 4.08, 'thought erasure': 0.16, 'soul feast': 0.1, 'sphere of purity': 0.06, 'mobilization': 0.65, 'chancellor of the dross': 0.59, 'alaborn veteran': 0.81, 'balduvian hydra': 0.57, 'manipulate fate': 0.83, 'fireflux squad': 0.4, 'deathgreeter': 3.68, 'aysen highway': 1.84, 'gift of doom': 0.55, "ashnod's cylix": 0.57, 'auriok steelshaper': 1.81, 'sword of the paruns': 4.13, 'giant octopus': 0.18, 'sylvan primordial': 0.34, 'tainted specter': 3.71, 'tajic, blade of the legion': 0.59, 'decree of justice': 0.16, 'soul of theros': 0.44, 'groundswell': 0.59, 'gyrus, waker of corpses': 0.57, 'aku djinn': 4.38, 'luminous angel': 0.83, 'sharding sphinx': 0.23, "look at me, i'm the dci": 0.12, 'essence flux': 1.1, 'delusions of mediocrity': 0.5, 'kangee, aerie keeper': 3.09, 'hour of revelation': 0.48, 'book of rass': 0.25, 'deathreap ritual': 0.45, 'thran tome': 1.52, 'hollow trees': 1.05, 'faerie formation': 0.8, 'sleeper agent': 1.66, 'sudden demise': 0.32, 'brave the elements': 0.32, 'seeds of renewal': 1.43, 'elvish aberration': 0.01, 'synthetic destiny': 0.19, 'divine sacrament': 3.12, 'aven mimeomancer': 0.54, 'zombie infestation': 0.11, 'stunted growth': 0.56, 'enclave cryptologist': 0.3, 'cruel edict': 0.24, "sorin's vengeance": 0.8, 'incendiary command': 1.44, 'skirsdag high priest': 0.28, 'dragon breath': 0.18, 'roots of all evil': 0.6, 'barbary apes': 1.6, 'endless one': 1.06, 'spirit of resistance': 3.59, 'goblin tinkerer': 0.11, 'tower of coireall': 1.08, 'xantid swarm': 0.75, 'glory': 3.67, 'dimir machinations': 1.33, "raven's crime": 0.99, 'megrim': 0.38, "liliana's influence": 0.35, 'flanking troops': 6.31, 'malfegor': 0.51, 'butcher of malakir': 0.27, 'all shall smolder in my wake': 1.2, 'natural affinity': 0.52, 'nantuko monastery': 0.32, 'molten influence': 2.14, 'fire servant': 0.46, 'clot sliver': 0.21, 'lovisa coldeyes': 0.49, 'whim of volrath': 24.45, 'lullmage mentor': 2.62, 'plague myr': 0.56, 'massacre': 0.5, 'wall of dust': 0.15, 'ritual of soot': 0.49, "tenza, godo's maul": 1.96, "zendikar's roil": 0.49, 'mirror-mad phantasm': 0.91, 'desolate lighthouse': 0.25, 'goblin firestarter': 0.55, 'withering boon': 3.55, 'tolarian serpent': 2.94, "now i know my abc's": 2.58, 'temple of triumph': 0.44, 'spreading seas': 5.49, 'lightning storm': 0.34, 'vault skirge': 0.37, 'fevered convulsions': 0.55, 'moorland haunt': 0.18, 'ardent militia': 0.13, 'shivan wurm': 0.55, 'dark offering': 0.24, 'vinelasher kudzu': 0.25, 'alaborn zealot': 1.87, 'sentinel sliver': 1.04, 'selvala, explorer returned': 3.89, "curse of fool's wisdom": 3.45, 'endless whispers': 3.12, 'saproling burst': 0.55, 'need for speed': 1.01, 'sand silos': 0.76, 'sunscour': 1.01, 'mandate of peace': 0.12, 'goblin tutor': 0.2, 'balm of restoration': 1.4, 'telekinetic sliver': 2.02, "animist's awakening": 0.79, 'pygmy allosaurus': 0.55, 'pyrokinesis': 0.31, "tatsumasa, the dragon's fang": 3.42, 'animation module': 0.91, 'qasali ambusher': 0.69, 'jungle patrol': 3.96, 'dwarven pony': 1.41, 'rakdos charm': 0.18, 'zulaport cutthroat': 1.49, "teferi's imp": 1.78, 'purraj of urborg': 3.67, 'tuktuk the explorer': 0.24, 'ajani, the greathearted': 1.28, 'elspeth, undaunted hero': 0.52, 'knowledge pool': 0.64, 'rashida scalebane': 3.76, 'zurgo helmsmasher': 0.81, 'psychosis crawler': 0.66, 'drawn together': 0.4, 'falkenrath gorger': 0.18, "cho-manno's blessing": 0.24, 'archaeomender': 0.02, 'spell swindle': 3.17, 'darksteel juggernaut': 1.08, 'darksteel relic': 0.51, 'nath of the gilt-leaf': 3.43, 'tumble': 0.05, 'eater of days': 1.53, 'abyssal nocturnus': 1.25, 'sphinx mindbreaker': 1.52, 'chained to the rocks': 0.53, "urza's guilt": 0.55, 'shaman en-kor': 0.54, 'moonsilver spear': 0.15, 'dark impostor': 0.23, 'shifting ceratops': 0.26, 'harbinger of the tides': 0.53, 'mountain titan': 1.64, 'shrieking drake': 0.86, 'flash counter': 0.11, 'megantic sliver': 1.54, 'ghostly flicker': 0.49, 'kiln fiend': 0.12, 'hivis of the scale': 2.48, 'wu infantry': 6.02, 'wall of souls': 0.54, 'molten primordial': 0.78, 'hewed stone retainers': 0.07, 'primal growth': 1.55, 'phoebe, head of s.n.e.a.k.': 1.19, 'hedron archive': 0.25, 'heart of bogardan': 1.9, "taigam, sidisi's hand": 0.93, 'mesa enchantress': 1.85, 'master of the feast': 0.75, 'solidarity of heroes': 0.79, 'fighting chance': 1.79, 'firestorm hellkite': 2.49, 'spine of ish sah': 1.3, 'razia, boros archangel': 0.96, 'reprocess': 0.4, 'crime': 12.43, 'zhalfirin crusader': 0.54, 'fountain of renewal': 0.44, 'diplomatic immunity': 1.06, 'glowrider': 4.39, 'mantis rider': 0.89, 'body snatcher': 1.51, 'desecration demon': 0.64, 'marjhan': 0.54, "suleiman's legacy": 2.61, 'ransack': 0.29, 'otherworld atlas': 0.92, 'bone dragon': 0.67, 'bone mask': 1.69, 'ant queen': 1.61, 'silver knight': 0.49, 'night incarnate': 0.48, 'rough': 0.05, 'dread presence': 2.33, 'timberwatch elf': 0.26, 'wind sail': 0.19, 'trynn, champion of freedom': 0.78, 'nettle sentinel': 0.27, 'pentad prism': 0.23, 'vodalian war machine': 1.33, 'mana tithe': 0.12, 'zephid': 3.59, 'electrickery': 0.19, 'punishment': 12.43, 'crow of dark tidings': 0.01, 'ambassador laquatus': 1.24, 'rite of consumption': 0.77, 'galvanic blast': 0.33, 'firemane avenger': 0.26, 'eliminate': 0.05, 'skirk marauder': 0.19, 'distorting lens': 0.45, 'mirrormade': 3.03, 'assquatch': 2.09, 'voice of all': 0.25, 'spectral bears': 0.23, 'ashling the pilgrim': 2.68, 'the elderspell': 0.66, 'dash hopes': 0.6, 'great oak guardian': 0.2, 'armored galleon': 1.36, 'soldevi adnate': 0.46, 'war barge': 0.14, 'teysa, envoy of ghosts': 0.18, 'slagstorm': 0.46, 'wandering mage': 0.53, 'fire drake': 0.05, 'satyr firedancer': 0.43, 'leyline of the meek': 1.87, 'honor the fallen': 0.9, 'sea eagle': 0.24, 'ethereal armor': 0.25, 'leyline of vitality': 4.36, 'narwhal': 0.53, 'windreader sphinx': 0.24, 'icatian store': 0.7, 'sandwurm convergence': 2.18, 'canopy spider': 0.38, 'open the graves': 0.37, 'field of ruin': 0.18, 'transcendence': 2.35, 'royal decree': 0.53, 'wheel of torture': 2.4, 'lifebane zombie': 0.28, 'rock basilisk': 1.81, 'cloud cover': 2.51, 'wu light cavalry': 4.28, 'oblivion ring': 0.27, 'shamanic revelation': 0.43, 'pteramander': 0.15, 'diamond kaleidoscope': 5.1, 'commander eesha': 3.64, 'descend upon the sinful': 0.24, 'landfill': 0.41, "tourach's gate": 1.39, 'riftsweeper': 1.06, 'fathom mage': 0.08, 'avizoa': 1.02, 'relearn': 0.58, 'old fogey': 0.12, 'bomb squad': 3.3, 'karona, false god': 5.93, 'mercenaries': 1.78, 'breaking': 0.21, 'kessig': 0.88, 'browbeat': 0.37, 'fallen shinobi': 4.92, 'leyline of singularity': 1.6, 'coral merfolk': 0.34, "red sun's zenith": 0.55, 'jungle shrine': 0.25, 'paleoloth': 1.05, 'judith, the scourge diva': 0.6, 'avatar of me': 0.11, 'axis of mortality': 1.23, 'stromkirk noble': 0.64, 'spectra ward': 1.24, 'devastating dreams': 0.54, 'engineered plague': 0.33, 'moltensteel dragon': 0.85, 'blackblade reforged': 0.87, 'soul collector': 0.46, 'monkey cage': 1.36, 'barreling attack': 2.37, 'sentinel tower': 1.67, 'future sight': 0.24, "look at me, i'm r&d": 0.11, 'entering': 0.21, 'skull of ramos': 1.74, 'shu cavalry': 0.52, 'malakir bloodwitch': 0.16, 'hostile minotaur': 0.39, "necromancer's stockpile": 0.31, 'remorseful cleric': 0.17, 'numot, the devastator': 3.32, 'nullstone gargoyle': 1.44, 'into the wilds': 0.75, 'b-i-n-g-o': 0.12, 'righteous charge': 0.06, "night of souls' betrayal": 0.29, 'rude awakening': 1.18, 'nevermore': 0.73, "god-pharaoh's gift": 0.58, 'goldnight castigator': 0.53, 'foe-razer regent': 0.37, 'aether barrier': 2.19, 'woolly spider': 0.05, 'unstoppable ash': 1.63, 'ash zealot': 0.32, 'ulasht, the hate seed': 1.39, 'tatyova, benthic druid': 2.85, 'uktabi wildcats': 0.33, 'vivid creek': 0.31, 'aether gust': 0.27, 'victory chimes': 0.26, "thelon's curse": 2.15, 'amulet of unmaking': 2.19, 'arcane adaptation': 4.73, "zur's weirding": 0.94, 'stolen identity': 0.35, 'force of despair': 1.98, 'titan forge': 0.54, 'budoka gardener': 1.45, 'mongrel pack': 2.55, "gonti's aether heart": 0.8, 'kyren toy': 0.43, "teferi's response": 1.31, 'energy storm': 0.51, 'venerated loxodon': 0.23, 'artifact blast': 0.51, 'skyshroud war beast': 0.59, 'blood baron of vizkopa': 0.46, 'conflagrate': 0.05, 'grapeshot': 0.24, 'fraction jackson': 0.45, 'portent': 0.35, 'breath of life': 0.24, 'kunoros, hound of athreos': 0.35, 'wirewood channeler': 0.39, 'temple of the false god': 0.17, 'counterflux': 1.1, 'vampire of the dire moon': 2.13, 'talus paladin': 0.46, 'soldevi golem': 0.51, 'gadwick, the wizened': 0.47, 'the iron guardian stirs': 0.7, 'vapor snag': 0.31, 'black carriage': 1.94, 'bringer of the white dawn': 2.01, 'elder deep-fiend': 0.19, 'blazing shoal': 2.36, 'azami, lady of scrolls': 1.19, "necromancer's covenant": 0.89, 'goblin charbelcher': 1.23, 'diminishing returns': 0.48, 'signal pest': 0.71, 'colossal might': 0.31, 'esper charm': 0.71, 'tide of war': 1.91, 'benalish commander': 0.16, 'cold-eyed selkie': 0.1, "archangel's light": 0.55, 'dregs of sorrow': 0.29, 'howltooth hollow': 0.42, 'herald of the pantheon': 1.57, 'cryptoplasm': 1.1, 'goblin glider': 0.07, 'bottled cloister': 0.5, "nature's resurgence": 0.3, 'frontier siege': 0.47, 'spiteful visions': 1.99, 'magus of the future': 0.25, 'stonybrook banneret': 0.8, 'storm herd': 0.19, 'springleaf drum': 2.63, 'dimir cutpurse': 0.31, 'worldslayer': 2.13, 'horn of ramos': 0.45, 'dreadhorde butcher': 0.83, "ol' buzzbark": 0.63, 'curse of the fire penguin': 1.37, 'eye of the storm': 1.48, 'unspeakable symbol': 3.62, 'diabolic tutor': 2.13, 'iname as one': 1.56, 'heartmender': 0.75, "tezzeret's gambit": 0.31, 'head games': 3.09, 'razor pendulum': 2.31, 'realms befitting my majesty': 0.48, "wizard's retort": 0.24, 'onakke catacomb': 1.63, 'reckless rage': 0.29, 'ill-gotten gains': 0.36, 'mortician beetle': 0.25, 'stone haven pilgrim': 0.03, 'izzet signet': 0.75, 'crooked scales': 1.84, "saheeli's directive": 1.9, 'call of the herd': 0.09, 'stoic angel': 0.6, 'accumulated knowledge': 0.08, 'blizzard': 2.12, 'shaman of the pack': 0.26, 'argivian find': 1.26, 'desert sandstorm': 10.8, 'twinflame': 3.08, 'leadership vacuum': 0.02, 'thelonite monk': 2.24, 'silvar, devourer of the free': 0.49, 'goblin mountaineer': 0.09, 'silver seraph': 0.49, 'silverblade paladin': 0.6, 'necropede': 0.68, 'dreamborn muse': 3.0, 'scoria wurm': 0.33, 'the zephyr maze': 1.12, 'supreme exemplar': 0.43, 'floodwater dam': 0.5, 'cloak of the philosopher': 0.66, "ertai's meddling": 1.29, 'wei elite companions': 0.5, 'turbulent dreams': 1.13, 'clergy of the holy nimbus': 0.73, 'tainted strike': 1.04, 'gigantoplasm': 2.84, 'lotleth troll': 0.55, 'quarantine field': 0.46, 'plaguebearer': 1.04, 'dwarven sea clan': 1.44, 'jund panorama': 1.42, "khorvath's fury": 2.31, 'meddling kids': 1.27, 'scythe specter': 2.25, 'jhovall queen': 0.43, 'phyrexian gremlins': 3.9, 'shadow of the grave': 0.37, 'jalum grifter': 0.47, 'crusading knight': 1.14, 'endbringer': 0.79, 'null brooch': 2.36, 'reiver demon': 1.02, 'blood of the martyr': 0.14, 'spire golem': 0.43, 'spirit bonds': 0.45, 'wayward angel': 0.48, 'second harvest': 4.6, "archon of valor's reach": 0.14, 'noxious toad': 2.66, 'collective effort': 0.66, 'dredge the mire': 0.17, 'ogre enforcer': 1.08, 'needle spires': 0.3, 'call to arms': 0.49, 'nephalia drownyard': 0.84, 'ironclad krovod': 0.45, 'duergar hedge-mage': 2.66, 'skinshifter': 0.41, 'kookus': 1.58, 'rishkar, peema renegade': 0.85, 'the ultimate nightmare of wizards of the coast® customer service': 0.41, 'bladebrand': 0.01, 'kavu lair': 1.33, 'kjeldoran phalanx': 1.54, 'keeper of tresserhorn': 1.78, "winter's night": 0.49, 'kharasha foothills': 1.26, 'colossus of akros': 1.9, 'marauding raptor': 1.12, 'cycle of life': 1.3, 'palladium myr': 0.42, 'breaking wave': 0.91, 'pearl lake ancient': 0.57, 'hidden gibbons': 0.54, 'wall of stolen identity': 0.26, "tale's end": 1.71, 'axe of the warmonger': 0.47, 'gallowbraid': 1.98, 'debt to the deathless': 1.19, 'faces of the past': 1.2, "tyrant's familiar": 1.73, 'take vengeance': 0.48, 'bringer of the red dawn': 2.37, 'backlash': 0.91, 'molten rain': 0.41, 'darksteel citadel': 0.49, 'dawn': 0.52, 'minion of tevesh szat': 0.49, 'mesmeric trance': 0.49, 'midnight reaper': 0.48, 'dusk': 0.52, 'ow': 0.87, 'mirror sheen': 3.18, 'pull from eternity': 2.77, 'chlorophant': 0.64, "telim'tor": 4.92, 'honor-worn shaku': 2.47, 'backdraft hellkite': 0.26, 'gonti, lord of luxury': 0.24, 'master warcraft': 0.14, "delif's cube": 1.81, 'haunting echoes': 0.12, 'nadir kraken': 1.26, 'gnarlback rhino': 0.51, 'xanthic statue': 2.8, 'unexpected results': 0.43, 'hanweir militia captain': 1.19, 'memory': 1.6, 'mavren fein, dusk apostle': 4.11, 'sylvan scrying': 0.24, "teferi's ageless insight": 1.92, "teferi's moat": 0.9, 'conduit of ruin': 2.25, 'grasping scoundrel': 0.37, 'kuon, ogre ascendant': 1.5, 'land grant': 0.52, 'gravedigger': 0.05, 'avatar of might': 0.88, 'commit': 1.6, 'power without equal': 0.59, 'plasm capture': 0.8, 'mercy killing': 0.64, 'wild nacatl': 0.44, 'predatory sliver': 0.67, 'force of savagery': 2.48, 'twilight shepherd': 0.6, 'yotian soldier': 0.01, 'collective defiance': 0.71, 'my forces are innumerable': 0.83, 'incremental blight': 1.27, 'mirrorweave': 0.53, 'assault formation': 0.61, 'cerebral vortex': 0.55, 'blight mamba': 0.69, 'myth realized': 0.26, 'banshee': 0.11, 'westvale cult leader': 1.19, 'faerie noble': 0.48, 'shorecrasher elemental': 0.33, 'squirrel nest': 0.6, 'draconian cylix': 1.22, 'ghost-lit raider': 0.13, 'curse of disturbance': 4.03, 'myr galvanizer': 0.36, "tamiyo's journal": 1.93, 'vildin-pack alpha': 3.74, 'ward sliver': 1.8, 'splintering wind': 1.83, 'savage lands': 2.06, 'terminal moraine': 0.87, 'geode golem': 2.64, 'crenellated wall': 0.33, 'spark elemental': 0.43, 'geier reach bandit': 3.74, 'chain reaction': 0.41, 'ivory mask': 0.41, 'flow of maggots': 1.32, 'braids, cabal minion': 0.08, 'repay in kind': 1.61, 'rootwater shaman': 0.64, 'zodiac monkey': 0.1, 'irrigated farmland': 0.39, 'flamebreak': 1.15, 'driven': 0.45, 'sigil of the empty throne': 1.44, 'murderous redcap': 0.34, 'bloodline necromancer': 0.44, 'auratog': 0.42, 'sigil of distinction': 0.89, 'decree of savagery': 0.1, 'cloak and dagger': 2.61, 'library of lat-nam': 0.34, 'putrid imp': 0.38, 'my laughter echoes': 0.64, 'weaver of lies': 0.82, 'charging paladin': 0.03, 'goblin digging team': 0.07, 'quicksilver dragon': 0.48, 'sewers of estark': 0.47, "nature's revolt": 4.73, 'codex shredder': 0.21, 'goblin pyromancer': 0.29, 'despair': 0.45, 'arbor elf': 0.59, 'castle embereth': 0.34, 'quirion dryad': 0.05, 'necrologia': 0.35, 'drift of phantasms': 0.98, 'alexi, zephyr mage': 0.47, 'glare of subdual': 0.39, 'launch the fleet': 0.28, "treva's ruins": 2.02, 'ring of gix': 0.47, 'storm spirit': 0.47, 'doomsday specter': 0.66, 'read the runes': 1.41, 'warping wurm': 1.64, 'speaker of the heavens': 1.38, 'amoeboid changeling': 0.49, 'b.o.b. (bevy of beebles)': 0.49, 'tempt with immortality': 0.76, 'haunted crossroads': 2.98, 'raven guild master': 1.63, 'ravager wurm': 0.35, "hell's thunder": 0.28, 'frankie peanuts': 0.19, 'empty the pits': 0.67, 'dromoka, the eternal': 0.33, 'urborg stalker': 3.34, 'oyobi, who split the heavens': 0.25, 'world-bottling kit': 0.61, 'homarid shaman': 1.09, 'squall': 0.05, 'demon of loathing': 0.2, 'pashalik mons': 1.88, 'fungus elemental': 2.47, 'pedantic learning': 0.36, 'call of the wild': 0.34, 'tornado': 0.47, 'callous oppressor': 0.9, "nylea's colossus": 2.54, 'distorting wake': 0.37, 'formation': 1.29, 'nightmare unmaking': 0.53, 'overflowing insight': 0.91, 'merfolk sovereign': 0.48, 'ricochet trap': 0.43, 'fledgling dragon': 1.02, 'surging flame': 0.06, 'kashi-tribe elite': 0.59, 'greel, mind raker': 0.68, "jester's sombrero": 0.43, 'topsy turvy': 0.09, 'guardian of the guildpact': 0.74, 'yare': 1.84, 'haldan, avid arcanist': 0.5, 'magebane armor': 2.04, "evincar's justice": 0.66, 'magus of the vineyard': 3.24, 'tidal kraken': 1.13, 'flames of the blood hand': 0.3, 'lumbering falls': 0.14, 'makeshift mannequin': 0.34, 'chain stasis': 3.07, 'big game hunter': 0.09, 'fire': 0.25, 'celestial force': 0.98, 'viridian longbow': 0.15, "sephara, sky's blade": 3.0, 'ceremonious rejection': 0.16, 'akim, the soaring wind': 0.35, 'hystrodon': 1.12, 'portcullis': 2.6, 'cryptic trilobite': 0.15, 'fleshbag marauder': 0.08, 'spinneret sliver': 0.2, 'auriok salvagers': 0.18, 'ice': 0.25, 'immolation': 0.01, 'trading post': 0.58, 'creepy doll': 0.49, 'invasion plans': 1.79, 'full flowering': 0.2, 'soul warden': 1.07, 'brought back': 3.75, 'underworld connections': 0.21, 'yomiji, who bars the way': 2.17, 'rakka mar': 0.99, 'phyrexian walker': 1.58, 'undying evil': 0.61, 'gruul signet': 0.48, 'phyrexian colossus': 0.21, 'hapatra, vizier of poisons': 0.96, "wren's run vanquisher": 0.16, 'peek': 0.41, 'pointy finger of doom': 0.14, 'apex of power': 0.29, 'fiery justice': 0.15, 'catapult master': 0.45, 'rock lobster': 0.23, 'viashino heretic': 1.23, 'shriekhorn': 0.22, 'lightning-core excavator': 0.02, 'western paladin': 0.22, 'weird harvest': 3.57, 'pursuit of knowledge': 1.57, 'myr reservoir': 0.35, 'talrand, sky summoner': 0.19, 'celestial ancient': 0.58, 'fog bank': 0.32, 'pillar tombs of aku': 2.04, 'kjeldoran royal guard': 0.23, 'nightmare incursion': 1.04, "gideon's avenger": 0.52, 'norwood archers': 0.24, 'carrion feeder': 1.22, 'nimble mongoose': 0.02, 'body double': 1.08, 'nightmare lash': 3.51, 'vedalken aethermage': 0.63, 'forbidding watchtower': 0.3, 'goblin assault': 0.58, 'timmerian fiends': 2.08, 'dwarven bloodboiler': 6.34, 'mirror of the forebears': 1.3, 'pulsemage advocate': 1.4, 'mizzium mortars': 0.61, 'miss demeanor': 0.29, 'fevered visions': 1.09, 'ambiguity': 0.73, 'capital punishment': 1.75, 'nihil spellbomb': 0.44, 'ally encampment': 0.23, 'salt flats': 0.45, 'riptide replicator': 2.58, 'mystic might': 1.63, 'mystic barrier': 1.04, 'myr welder': 0.35, 'myr incubator': 0.71, 'oath of kaya': 0.27, 'oblation': 0.41, 'total war': 0.58, 'destructive revelry': 0.23, 'trailblazer': 1.79, 'burning-tree shaman': 0.5, 'reckless bushwhacker': 0.36, 'ravenous trap': 0.24, 'limited resources': 2.0, 'divining witch': 2.66, 'selesnya signet': 1.83, 'ivory gargoyle': 0.45, 'contagion clasp': 0.2, 'invigorate': 0.17, 'sylvia brightspear': 2.83, 'goblin artisans': 0.12, 'foundry inspector': 0.23, 'death or glory': 0.47, 'sparkmage apprentice': 0.09, 'kadena, slinking sorcerer': 0.45, 'grim return': 0.43, 'magister of worth': 0.19, 'gravewaker': 0.13, 'guardian seraph': 0.54, 'golgari charm': 1.06, 'water gun balloon game': 0.17, 'keeper of progenitus': 1.66, 'clearwater goblet': 0.51, 'serene heart': 0.21, "jace's sanctum": 0.66, 'intet, the dreamer': 1.23, 'inspiring statuary': 6.79, 'yorvo, lord of garenbrig': 0.24, 'innocent blood': 0.14, 'teneb, the harvester': 2.88, 'hidden retreat': 0.33, 'mind slash': 0.8, 'sawback manticore': 1.48, 'derelor': 0.16, 'hot springs': 2.21, 'silvos, rogue elemental': 0.44, 'index': 0.08, 'liability': 0.49, 'discordant spirit': 1.9, 'gelectrode': 0.34, 'memory crystal': 1.91, 'bringer of the green dawn': 1.62, 'kjeldoran knight': 1.7, 'argivian blacksmith': 0.44, 'guile': 0.69, 'guided passage': 1.42, 'keeper of keys': 3.12, 'riptide director': 1.35, 'starlit angel': 0.64, 'illusionary presence': 1.38, 'hidden predators': 0.29, 'from beyond': 0.75, 'unstable shapeshifter': 0.6, "gaea's anthem": 0.3, 'frost marsh': 4.49, 'spore frog': 0.25, "full moon's rise": 2.18, 'call the coppercoats': 2.6, 'spectral procession': 0.39, "storm's wrath": 0.44, 'council of the absolute': 0.32, 'sorcerous sight': 1.72, 'temporal adept': 0.58, 'perish': 0.22, "wren's run packmaster": 0.59, 'staying power': 0.15, 'magus of the candelabra': 2.43, 'warp world': 0.55, 'majestic myriarch': 0.37, 'sun sentinel': 0.27, "runechanter's pike": 0.45, 'uktabi kong': 1.52, 'edgewalker': 1.57, "berserkers' onslaught": 4.62, 'rage nimbus': 0.29, 'giltspire avenger': 0.96, 'atarka, world render': 0.25, 'chaos harlequin': 1.2, "geralf's masterpiece": 0.39, 'general jarkeld': 2.07, 'psychatog': 0.44, 'divine retribution': 0.96, 'mogg assassin': 1.5, 'master apothecary': 0.81, 'shared summons': 2.65, "ass whuppin'": 0.93, 'flood of tears': 0.31, 'raging goblin': 0.02, 'grandmother sengir': 0.44, 'coercion': 0.03, 'tempest djinn': 0.31, 'eidolon of blossoms': 1.17, 'deflection': 0.24, 'epicenter': 1.55, 'silklash spider': 0.37, 'plague spitter': 1.02, 'lightning reaver': 0.86, 'pyrrhic revival': 0.6, 'emeria shepherd': 0.5, 'tar pit warrior': 0.1, 'assault strobe': 0.36, 'genesis hydra': 0.42, 'starstorm': 0.35, 'peat bog': 0.79, 'fumigate': 1.79, 'reckless embermage': 0.19, 'divine presence': 1.95, 'general tazri': 0.42, 'gargos, vicious watcher': 0.6, 'reclamation sage': 0.25, "garruk's harbinger": 0.18, 'goblin festival': 0.57, 'treeshaker chimera': 0.16, 'pontiff of blight': 0.19, 'daring apprentice': 0.4, 'dictate of the twin gods': 1.79, 'storm entity': 0.02, 'augury adept': 0.26, 'avatar of fury': 0.28, 'rain of tears': 0.39, 'pentarch paladin': 1.08, 'poison-tip archer': 1.04, 'phyrexian scuta': 0.62, 'symbiotic wurm': 0.39, 'acidic dagger': 2.23, 'daru warchief': 0.77, 'aboshan, cephalid emperor': 0.98, 'doomgape': 0.29, 'mindwrack demon': 0.33, 'condescend': 0.31, 'viashino sandswimmer': 0.31, 'flooded woodlands': 0.97, 'mystifying maze': 0.97, "white sun's zenith": 0.14, 'krosan cloudscraper': 0.37, 'lingering souls': 0.32, 'skirk prospector': 0.26, 'riftstone portal': 1.0, 'aether flash': 0.85, 'carnophage': 0.43, 'kemba, kha regent': 0.29, 'do-it-yourself seraph': 0.89, 'welding jar': 1.13, 'aetherwind basker': 0.54, 'kalonian twingrove': 0.47, 'markov blademaster': 0.44, 'mirrodin besieged': 1.42, 'midsummer revel': 0.43, 'mask of riddles': 0.44, 'mondronen shaman': 2.14, 'chromatic armor': 1.8, 'war elemental': 1.17, 'destructive flow': 0.6, 'mortuary': 4.07, "dovin's veto": 2.57, 'krenko, tin street kingpin': 2.35, 'apocalypse chime': 2.24, "oathkeeper, takeno's daisho": 4.43, 'cackling counterpart': 1.13, "jace's projection": 0.88, 'energy tap': 0.34, 'order of succession': 0.4, 'hythonia the cruel': 0.38, 'boggart ram-gang': 0.26, 'ironhoof ox': 0.43, "tovolar's magehunter": 2.14, 'engulf the shore': 0.51, 'oath of teferi': 1.29, 'spoils of the vault': 0.44, 'barrin, tolarian archmage': 0.2, 'magnetic web': 0.47, 'voice of the woods': 0.17, 'indrik umbra': 0.57, 'chaos lord': 0.25, 'chandra, fire artisan': 0.52, 'horde of boggarts': 0.59, 'lys alana huntmaster': 0.19, 'pendant of prosperity': 0.2, 'abyssal gatekeeper': 0.92, 'watchwolf': 0.22, 'crumbling sanctuary': 1.19, 'fungal behemoth': 0.88, 'chained brute': 0.03, 'promise of bunrei': 0.1, 'fumiko the lowblood': 0.18, "dragon's claw": 0.27, 'marwyn, the nurturer': 0.99, 'deathbringer thoctar': 0.64, 'mire in misery': 0.18, 'gargantuan gorilla': 0.42, 'curse artifact': 1.47, 'ancient excavation': 1.36, 'dark suspicions': 0.37, 'dragon mage': 0.33, 'brushwagg': 4.52, 'followed footsteps': 3.16, 'diabolic vision': 0.36, 'grismold, the dreadsower': 0.15, 'dreadhorde invasion': 0.33, 'jinxed idol': 0.23, 'norwood riders': 0.59, "cosi's trickster": 0.43, 'hand of honor': 1.03, 'common courtesy': 0.09, 'unscythe, killer of kings': 1.51, 'lavinia of the tenth': 0.27, 'golgari signet': 1.45, 'willbreaker': 0.71, 'favored hoplite': 0.19, 'wirewood herald': 2.33, 'heart wolf': 1.96, 'plea for guidance': 0.66, 'lichenthrope': 1.99, 'narcomoeba': 0.28, 'whispering specter': 1.09, 'leering gargoyle': 1.26, 'grafted skullcap': 0.43, 'elixir of immortality': 0.7, 'essence of the wild': 0.67, 'sorcerous spyglass': 0.11, 'thwart': 1.36, 'the hunter': 0.39, 'soul foundry': 0.21, 'sylvan reclamation': 0.1, 'stoke the flames': 0.22, 'engulfing slagwurm': 0.8, 'benthic behemoth': 0.98, 'see the truth': 0.35, 'soul spike': 0.37, 'troll ascetic': 0.35, 'stronghold rats': 0.26, "assassin's blade": 0.32, 'temur battle rage': 0.04, 'raksha golden cub': 0.41, 'scepter of fugue': 0.43, 'silverclad ferocidons': 2.8, 'sin prodder': 0.33, 'thelonite hermit': 0.15, 'aven brigadier': 2.07, 'sworn defender': 1.71, 'thermokarst': 0.42, 'arcbound slith': 0.52, 'ardent plea': 6.02, 'sifter of skulls': 1.2, 'sylvan awakening': 1.0, 'thundering giant': 0.06, 'thunderkin awakener': 0.74, 'thief of blood': 0.68, 'tresserhorn sinks': 0.9, 'tariff': 0.41, 'spell burst': 0.12, "serra's blessing": 0.58, 'energy chamber': 0.79, 'baneful omen': 0.58, 'consuming vapors': 0.1, 'howl of the night pack': 0.16, 'ideas unbound': 1.24, 'kill switch': 0.72, "nissa's pilgrimage": 0.44, 'nyx-fleece ram': 0.41, 'imposing sovereign': 0.42, 'oath of ajani': 0.65, 'oath of lim-dûl': 0.41, 'sulfur elemental': 0.03, 'sublime exhalation': 0.89, 'distortion strike': 0.44, 'akoum firebird': 0.25, 'suture priest': 1.32, 'adamaro, first to desire': 0.74, 'tolarian winds': 0.62, 'drover of the mighty': 0.18, 'dragon roost': 0.94, 'hungering hydra': 0.76, 'mind spring': 0.27, 'rathi dragon': 0.26, 'mind whip': 0.44, 'wild research': 2.07, 'the mending of dominaria': 0.32, "hero's demise": 1.09, 'sanctuary blade': 0.14, 'ammit eternal': 0.28, 'rune of protection: lands': 0.36, 'vile consumption': 2.32, 'rogue skycaptain': 0.41, 'soul of shandalar': 0.36, 'remote isle': 0.11, 'wort, the raidmother': 0.13, 'harrow': 0.42, 'orcish librarian': 0.24, 'amulet of quoz': 1.67, 'fight to the death': 0.7, "urza's rage": 0.03, 'vexing sphinx': 0.66, 'dual casting': 0.41, 'helvault': 0.43, 'southern paladin': 0.48, 'demonic collusion': 2.84, 'stonewood invocation': 1.5, 'grixis panorama': 1.16, 'wild ricochet': 0.15, 'mystic enforcer': 0.2, 'cat warriors': 0.07, 'worm harvest': 0.32, 'anti-magic aura': 0.19, 'near-death experience': 0.43, 'feed the pack': 0.59, 'extinguish all hope': 0.3, "basri's aegis": 0.21, 'hivestone': 0.22, 'mortify': 0.26, 'renegade doppelganger': 0.29, 'solar tide': 0.87, 'regna, the redeemer': 1.98, 'patron of the kitsune': 3.6, 'skyshroud claim': 2.21, 'synod sanctum': 0.6, 'scytheclaw': 0.22, 'trusted pegasus': 0.16, 'goblin lyre': 0.32, 'bifurcate': 0.39, 'magus of the unseen': 0.3, 'serrated arrows': 0.58, 'arcbound reclaimer': 4.76, 'sea gate loremaster': 0.46, 'lord of shatterskull pass': 0.7, 'thoughtweft trio': 0.32, 'mammoth harness': 2.26, 'goblin cavaliers': 0.11, 'flicker': 1.6, 'benthic djinn': 2.38, 'whelming wave': 0.31, 'cinder pyromancer': 0.22, 'glissa sunseeker': 1.63, 'manifold insights': 0.56, 'glorious end': 1.03, 'tribal forcemage': 0.44, 'zelyon sword': 3.18, 'loyal apprentice': 0.29, 'genju of the spires': 0.1, "garruk's warsteed": 0.14, 'leechridden swamp': 2.9, 'sword of the chosen': 1.04, 'metalwork colossus': 0.98, 'brion stoutarm': 0.43, 'flayer of the hatebound': 0.2, 'dimir charm': 0.2, 'isareth the awakener': 0.25, 'cut': 0.61, "journeyer's kite": 0.73, 'oros, the avenger': 0.55, 'questing phelddagrif': 0.95, 'harmless offering': 0.66, 'mystic of the hidden way': 0.03, 'icatian javelineers': 0.1, "tajic, legion's edge": 0.77, 'isleback spawn': 1.33, "ludevic's abomination": 0.33, 'barbed sliver': 0.23, 'spit flame': 0.16, 'primal whisperer': 1.31, 'bishop of wings': 2.21, 'active volcano': 0.1, 'crypt rats': 0.24, 'elder druid': 0.4, 'titanic ultimatum': 2.39, 'resplendent mentor': 0.42, 'negate': 0.11, 'echoing decay': 0.31, "ludevic's test subject": 0.33, 'ribbons': 0.61, 'timesifter': 1.78, 'ghastly demise': 0.01, 'words of war': 0.45, 'carrionette': 0.61, 'return to battle': 4.53, 'stalking vengeance': 0.82, 'adriana, captain of the guard': 0.16, 'odric, master tactician': 0.19, 'arasta of the endless web': 0.81, 'edge of the divinity': 0.41, 'fasting': 0.75, 'jungle lion': 0.4, "familiar's ruse": 0.67, 'feast of blood': 0.39, 'kazandu blademaster': 0.21, 'blinking spirit': 0.26, 'copper-leaf angel': 0.63, 'dark tutelage': 0.74, 'minion of the wastes': 0.52, 'darkblast': 0.46, 'rageblood shaman': 0.18, 'zephyr falcon': 0.15, 'burning fields': 14.75, 'game plan': 1.06, 'bone shredder': 0.02, 'kentaro, the smiling cat': 2.63, 'champion of stray souls': 0.23, 'flame slash': 0.27, 'collective blessing': 0.8, 'kheru mind-eater': 0.82, "erebos's titan": 0.45, 'sea gate wreckage': 0.29, 'shu defender': 5.49, 'monastery siege': 0.87, 'savage summoning': 0.76, 'gold-forge garrison': 1.0, 'silver myr': 0.11, 'blistercoil weird': 0.2, 'mesmerizing benthid': 0.86, 'grand melee': 1.58, 'scissors lizard': 0.24, 'syncopate': 0.01, 'dwynen, gilt-leaf daen': 0.35, 'lashwrithe': 0.63, 'golden guardian': 1.0, 'enter the god-eternals': 0.32, 'sunbond': 0.53, 'scabland': 0.4, 'ebon stronghold': 0.17, 'sisters of the flame': 0.06, 'blasted landscape': 1.36, 'dokai, weaver of life': 1.45, 'juntu stakes': 0.5, 'ignite the future': 0.14, 'mercadian atlas': 0.48, 'blossoming defense': 0.4, 'forbidden crypt': 0.47, 'simic manipulator': 0.31, 'simic signet': 0.32, 'ring of kalonia': 0.52, 'silver wyvern': 0.39, 'merciless executioner': 1.32, 'lost in the woods': 0.13, 'bloodshot cyclops': 0.36, 'skullsnatcher': 1.19, "serra's liturgy": 0.42, 'creeping renaissance': 0.9, 'jareth, leonine titan': 0.48, 'willing': 0.34, "jace's phantasm": 0.32, 'living lightning': 0.06, 'thirst for knowledge': 0.08, 'violent outburst': 6.2, 'soul conduit': 0.43, 'shifting wall': 0.91, 'denying wind': 0.53, 'mouth of ronom': 3.07, 'beast walkers': 1.21, "judge's familiar": 0.25, 'aesthetic consultation': 0.42, 'weatherseed treefolk': 5.95, 'shattered angel': 1.77, 'insidious will': 0.65, 'vesuvan shapeshifter': 0.16, 'shrine of the forsaken gods': 0.24, 'dismiss into dream': 0.79, 'loaming shaman': 0.1, 'kazandu tuskcaller': 0.18, 'slobad, goblin tinkerer': 1.12, 'agadeem occultist': 0.36, 'mass calcify': 0.57, 'blood tribute': 2.74, 'smallpox': 0.32, 'putrefax': 0.57, 'enchanted being': 1.04, 'retaliator griffin': 0.29, 'sygg, river guide': 1.07, 'summon the pack': 0.48, 'brigid, hero of kinsbaile': 0.86, 'fangren firstborn': 1.6, 'boreal shelf': 0.9, 'feral throwback': 0.23, 'ready': 0.34, 'breath of fury': 4.57, 'boggart mob': 0.96, 'sporesower thallid': 0.15, 'absolute law': 0.36, 'dawnbreak reclaimer': 0.75, 'summoning station': 2.89, 'graypelt refuge': 0.23, "baki's curse": 1.36, 'ashen ghoul': 0.21, 'hero of iroas': 0.31, "ojutai's command": 0.31, 'greenweaver druid': 0.17, 'temur ascendancy': 1.56, 'stalking tiger': 0.07, 'rayami, first of the fallen': 0.39, 'angelic accord': 1.14, 'dark deal': 2.57, 'write into being': 0.05, 'elemental resonance': 2.36, 'strength of the tajuru': 0.17, 'zombie trailblazer': 1.01, 'deathcap cultivator': 0.26, "tsabo's decree": 0.87, 'stronghold overseer': 0.64, 'burning-tree emissary': 0.38, 'frontline medic': 0.19, 'trusty retriever': 0.1, 'talisman of impulse': 1.44, 'painful truths': 0.41, "geralf's mindcrusher": 0.28, 'stormbind': 0.2, 'yavimaya elder': 0.08, 'xathrid demon': 0.45, 'king macar, the gold-cursed': 0.4, 'ayumi, the last visitor': 0.87, 'skizzik': 0.08, 'willow elf': 0.14, 'knight of glory': 0.19, 'contagion': 0.32, "gaea's revenge": 0.27, 'reaper of sheoldred': 0.83, 'slith firewalker': 0.1, 'sultai ascendancy': 0.21, 'bone flute': 0.38, 'extractor demon': 0.17, 'den protector': 0.18, 'vivid grove': 0.27, 'deploy to the front': 0.86, 'perilous research': 0.34, 'mishra, artificer prodigy': 0.8, "vona's hunger": 3.48, 'simic ascendancy': 2.17, 'mindless automaton': 0.02, 'lodestone myr': 0.19, 'predator dragon': 0.69, 'thieving amalgam': 0.29, 'manriki-gusari': 1.81, 'echo mage': 0.44, 'tahngarth, first mate': 0.16, 'llanowar mentor': 0.06, 'atogatog': 1.46, 'zoologist': 0.52, 'thopter squadron': 0.38, 'bounteous kirin': 0.42, "gerrard's battle cry": 0.38, 'sengir autocrat': 0.5, 'lignify': 1.6, 'bellowing fiend': 0.18, 'aetherling': 0.22, 'duskmantle seer': 0.16, 'chaotic strike': 0.72, 'simic sky swallower': 0.08, 'booby trap': 0.47, 'pia and kiran nalaar': 0.23, 'wickerbough elder': 0.04, 'etherium sculptor': 0.44, 'chart a course': 0.29, 'sign in blood': 0.96, 'scute mob': 0.8, 'power conduit': 1.55, 'bomat courier': 0.22, 'tethered griffin': 0.48, 'fervent champion': 0.19, 'valorous stance': 0.05, 'victim of night': 0.46, 'vedalken humiliator': 0.41, 'indulgent aristocrat': 0.22, 'nezumi graverobber': 0.5, 'novijen, heart of progress': 0.1, 'boiling seas': 0.62, 'witherscale wurm': 0.4, "curse of death's hold": 0.55, 'arashin foremost': 0.24, 'frenetic sliver': 2.24, 'damnable pact': 0.15, 'jagged lightning': 0.1, 'frantic search': 1.86, 'aphetto dredging': 0.2, 'djinn illuminatus': 0.06, 'inspiring call': 0.25, 'the fallen': 0.08, 'hidden herd': 0.36, 'rosheen meanderer': 0.25, 'nightpack ambusher': 0.73, 'spawnwrithe': 0.35, 'spawning pit': 0.38, 'soulherder': 0.69, 'vantress gargoyle': 0.13, 'caribou range': 0.35, 'soltari guerrillas': 0.38, 'sidewinder sliver': 0.11, 'nantuko shade': 0.19, 'thelon of havenwood': 0.21, 'last laugh': 0.87, 'wall of caltrops': 1.44, 'naked singularity': 0.37, 'gather specimens': 0.69, 'intimidation bolt': 0.53, 'chittering rats': 0.47, 'feint': 1.35, 'leaden myr': 0.24, 'merfolk mistbinder': 0.28, 'octopus umbra': 1.78, 'nantuko shrine': 3.54, 'holistic wisdom': 2.9, "commander's insignia": 0.1, 'ancient ooze': 1.66, 'goblin snowman': 0.26, 'goblin sledder': 1.0, 'rainbow efreet': 3.42, 'stormbound geist': 0.17, 'tuktuk scrapper': 0.23, 'altered ego': 0.76, 'malice': 0.38, 'pyrotechnics': 0.05, 'prototype portal': 0.56, 'approach of the second sun': 1.1, 'ichor wellspring': 0.17, 'spite': 0.38, 'dune-brood nephilim': 1.17, 'deep-slumber titan': 0.27, 'gigantomancer': 0.39, 'thopter assembly': 0.44, 'shattering pulse': 0.22, "briber's purse": 0.1, 'rishadan pawnshop': 0.47, 'seal of fire': 0.91, 'seal of the guildpact': 1.33, "hibernation's end": 2.07, 'risen reef': 1.8, 'worldpurge': 0.72, "arcum's astrolabe": 0.11, 'cunning sparkmage': 0.17, 'predatory hunger': 0.23, 'cunning lethemancer': 3.19, 'frenzy sliver': 0.23, "horobi, death's wail": 4.74, 'warkite marauder': 1.4, 'nevermaker': 0.78, "death's presence": 0.2, 'rapid prototyper': 0.36, 'rowdy crew': 0.34, 'arcane melee': 0.31, 'somberwald stag': 0.06, 'guardian idol': 0.47, 'viridian zealot': 0.48, 'orgg': 0.12, "karn's touch": 0.29, 'blinkmoth urn': 3.13, 'trained jackal': 7.97, 'misfortune': 1.94, 'rowen': 0.34, 'tempt with reflections': 1.55, 'yore-tiller nephilim': 0.54, 'hushwing gryff': 0.38, 'otepec huntmaster': 0.45, 'mogg alarm': 0.22, 'soul of innistrad': 0.23, 'centaur vinecrasher': 0.27, 'mnemonic sliver': 0.37, 'the avenger': 0.45, 'earthshaker khenra': 0.25, 'core prowler': 0.59, 'soulflayer': 0.12, 'mindleech mass': 1.37, 'on thin ice': 2.72, 'despotic scepter': 0.37, 'harmonious archon': 0.43, 'condemn': 0.04, 'phantasmal sphere': 2.25, 'eon hub': 1.8, 'skalla wolf': 1.26, 'redirect': 0.23, 'foul spirit': 0.37, 'advent of the wurm': 0.25, "ajani's influence": 0.38, 'invoke the firemind': 0.34, 'artful dodge': 0.26, "ancestor's prophet": 0.62, 'mindshrieker': 0.42, 'phantasmagorian': 0.46, "kolaghan, the storm's fury": 0.49, "virtus's maneuver": 0.76, 'forge of heroes': 1.49, 'knight of the kitchen sink': 0.34, 'strata scythe': 0.43, 'stormtide leviathan': 0.27, 'dragon fodder': 0.14, 'spinebiter': 0.51, 'loxodon smiter': 0.29, "freyalise's winds": 0.36, 'coral atoll': 0.09, 'clear the land': 0.42, 'corrupted conscience': 0.81, 'yavimaya dryad': 0.09, 'spiteful sliver': 1.67, 'tallowisp': 0.51, 'ghitu encampment': 0.2, 'escaped shapeshifter': 5.55, 'spike hatcher': 0.36, 'soltari monk': 0.36, 'waterknot': 0.04, 'wildfire devils': 0.21, 'wonder': 0.32, 'keldon necropolis': 0.36, 'summoning trap': 0.26, 'steel golem': 0.84, 'dread slaver': 0.24, 'infiltration lens': 1.0, 'gaseous form': 0.02, 'greatbow doyen': 0.77, 'sunblast angel': 0.18, 'stain the mind': 0.23, 'wiitigo': 0.36, 'witch-maw nephilim': 1.39, 'compost': 2.94, 'wishclaw talisman': 2.86, 'abyssal hunter': 0.24, 'deal broker': 0.58, 'elven warhounds': 0.45, 'elite inquisitor': 0.26, 'shifty doppelganger': 0.46, 'crucible of fire': 1.12, 'wild ox': 0.28, 'spore flower': 0.36, 'coalition victory': 0.73, 'barbarian horde': 4.05, 'wolfbriar elemental': 0.47, 'soul of ravnica': 0.24, 'goblin assassin': 0.62, 'incinerate': 0.47, 'hazduhr the abbot': 1.03, 'forbidden lore': 0.36, 'cowardice': 0.49, 'emberwilde caliph': 1.51, 'shard volley': 0.51, 'aggressive mining': 0.27, 'sacred ground': 0.42, 'mordant dragon': 0.41, 'mogg sentry': 0.41, 'faceless butcher': 0.3, 'mistvein borderpost': 0.52, 'rakdos pit dragon': 0.25, 'vorosh, the hunter': 0.22, "ugin's construct": 0.06, 'etherium-horn sorcerer': 0.2, 'mausoleum secrets': 1.07, 'flame-wreathed phoenix': 0.26, 'desolation': 2.4, 'wall of tears': 1.21, 'druidic satchel': 0.19, 'blood hound': 0.34, 'cabal pit': 0.43, 'amulet of kroog': 0.03, 'opulent palace': 0.36, 'pain magnification': 2.36, 'ogre taskmaster': 0.04, 'obscuring aether': 0.27, 'obelisk of alara': 0.35, 'oath of gideon': 0.33, 'bond of agony': 0.95, 'vedalken engineer': 0.22, 'dire fleet poisoner': 0.78, "verdant sun's avatar": 0.2, 'pearl dragon': 0.35, 'exclude': 0.09, 'cateran overlord': 0.39, 'marauding knight': 0.41, 'urge to feed': 0.1, 'seeker of the way': 0.17, 'magus of the jar': 2.57, 'major teroh': 0.45, 'mana cache': 0.62, 'dracoplasm': 0.36, 'circuitous route': 0.75, 'destructive urge': 0.26, 'runaway steam-kin': 0.37, 'violent ultimatum': 0.57, 'celestial convergence': 2.66, 'security detail': 0.26, 'avatar of will': 0.51, 'phoenix of ash': 0.15, 'cragganwick cremator': 0.12, 'viridian corrupter': 0.35, 'dryad militant': 0.11, 'demonlord of ashmouth': 0.22, 'alesha, who smiles at death': 0.14, 'aleatory': 0.34, 'dread wight': 0.35, 'credit voucher': 0.92, 'archivist': 0.32, 'phantasmal fiend': 0.08, 'myr battlesphere': 0.38, 'ixidron': 0.21, 'great sable stag': 0.49, 'jinxed ring': 0.7, 'censorship': 1.42, 'mogg fanatic': 0.23, 'underworld cerberus': 0.28, 'mizzium transreliquat': 0.49, 'kessig cagebreakers': 0.23, 'chancellor of the spires': 0.43, 'skylasher': 0.27, 'skyfire kirin': 0.57, 'shape of the wiitigo': 0.26, 'keeper of the nine gales': 0.43, 'armament master': 0.19, 'dwarven armory': 0.3, 'josu vess, lich knight': 1.0, 'corpsejack menace': 1.44, 'dimir aqueduct': 0.24, 'smothering abomination': 0.61, "karn's temporal sundering": 2.05, 'ends': 0.7, 'time machine': 1.04, "darigaaz's caldera": 1.71, 'odds': 0.7, 'stromgald cabal': 0.24, 'citanul centaurs': 2.64, 'spring of eternal peace': 7.1, 'honden of seeing winds': 2.02, 'worthy knight': 0.29, 'lyzolda, the blood witch': 0.48, 'empyrean eagle': 0.33, 'putrefy': 0.22, 'orcish squatters': 0.21, 'hedge troll': 0.1, 'boldwyr heavyweights': 0.81, 'azorius charm': 0.29, 'horde of notions': 0.76, 'infernal reckoning': 0.15, 'crumbling necropolis': 0.36, 'impatience': 0.3, 'crucible of the spirit dragon': 0.13, 'magus of the disk': 0.21, 'spellweaver volute': 1.47, 'firecat blitz': 0.42, 'duneblast': 0.16, 'paper tiger': 0.22, 'hunted troll': 0.74, 'galepowder mage': 0.3, 'enchantment alteration': 0.14, 'battlegrace angel': 0.57, 'cephalid illusionist': 0.44, "legacy's allure": 0.35, 'lava flow': 0.35, "marshal's anthem": 0.23, 'chittering witch': 0.19, 'brave the sands': 1.13, 'scale up': 0.5, "marchesa's decree": 3.5, 'collector protector': 0.33, 'beastcaller savant': 0.56, 'kurkesh, onakke ancient': 0.27, 'dictate of karametra': 1.37, 'kumano, master yamabushi': 0.29, 'psychic possession': 3.54, 'aisling leprechaun': 1.86, 'might weaver': 0.12, 'arcbound crusher': 2.76, 'talisman of unity': 0.43, 'scouting trek': 1.12, 'sigil captain': 0.44, 'scarwood hag': 1.13, 'price of knowledge': 0.61, 'staff of the ages': 0.29, 'trained orgg': 0.19, 'setessan tactics': 0.32, 'maro': 0.27, "pia's revolution": 0.46, 'treacherous pit-dweller': 0.21, 'telepathy': 0.43, 'coal golem': 0.34, 'revival': 0.95, 'rebuild': 0.12, 'dralnu, lich lord': 0.2, 'curse of echoes': 0.57, 'surge node': 0.05, 'xathrid necromancer': 0.16, 'daughter of autumn': 1.1, 'cartel aristocrat': 0.2, 'crypt incursion': 0.36, 'infinity elemental': 0.26, 'apprentice sorcerer': 0.39, 'evil twin': 0.44, 'blood oath': 0.3, 'spitting image': 0.12, 'mystic monastery': 0.29, 'rootwater matriarch': 0.44, "nomads' assembly": 0.38, 'scrambleverse': 0.38, 'noble purpose': 0.49, 'paradise druid': 0.2, 'quickling': 0.31, 'parallax nexus': 0.26, 'bloodhall ooze': 0.5, 'mask of avacyn': 0.25, 'blood scrivener': 0.21, 'nirkana cutthroat': 0.33, 'seeker of skybreak': 1.3, 'thoughtcast': 1.05, 'pentagram of the ages': 0.22, 'magus of the bazaar': 0.37, 'scourge of fleets': 0.17, 'insight': 1.47, 'fervent charge': 0.68, 'revenge': 0.95, 'silent gravestone': 0.23, 'ravenous baloth': 0.11, 'splinterfright': 0.2, 'soul summons': 0.02, 'cave people': 0.08, 'aether rift': 0.45, 'simic guildmage': 0.36, 'terra stomper': 0.21, 'blizzard specter': 0.22, 'eat to extinction': 0.19, 'overgrown battlement': 0.33, 'flametongue kavu': 0.16, 'skyfire phoenix': 0.14, 'blighted woodland': 0.23, 'hearthfire hobgoblin': 0.12, 'stinkdrinker bandit': 0.08, 'orcish settlers': 0.66, 'eternal scourge': 2.0, 'cho-manno, revolutionary': 0.35, 'hindering light': 0.48, 'orbs of warding': 0.72, 'consume the meek': 0.27, 'planar guide': 0.47, 'orzhov advokist': 0.08, 'damping engine': 0.79, 'wurmcalling': 1.31, 'chaos moon': 0.48, 'hashep oasis': 0.1, 'savage stomp': 0.15, 'talisman of creativity': 1.62, 'raging regisaur': 0.23, 'skullscorch': 0.36, 'knight of stromgald': 0.1, 'deafening clarion': 0.25, 'play of the game': 0.32, 'akki lavarunner': 0.48, 'kiyomaro, first to stand': 0.37, 'bake into a pie': 0.06, "thieves' guild enforcer": 0.34, 'spikeshot elder': 0.21, "tsabo's assassin": 0.3, 'talent of the telepath': 0.71, 'rishadan cutpurse': 0.22, 'moonmist': 0.29, 'worry beads': 0.43, 'nebelgast herald': 0.11, 'vitalize': 1.02, 'stalking bloodsucker': 0.23, 'cliffside rescuer': 0.01, 'mass mutiny': 0.5, 'visage of bolas': 0.27, 'scrapheap scrounger': 0.16, 'genesis storm': 0.4, "kyoki, sanity's eclipse": 1.01, 'aggressive mammoth': 0.59, 'angel of condemnation': 0.51, 'slithermuse': 1.25, 'battle hymn': 0.5, 'secluded steppe': 0.11, 'samurai of the pale curtain': 3.45, 'icy prison': 0.34, 'kavu monarch': 0.34, 'devoted hero': 0.13, 'mass polymorph': 0.4, 'icefall regent': 0.44, 'carapace forger': 0.24, 'reclamation': 0.44, 'growing ranks': 0.31, 'alter reality': 0.89, 'atalya, samite master': 0.66, 'sphinx-bone wand': 0.5, 'shuko': 1.49, 'spirit loop': 0.76, 'arashi, the sky asunder': 0.15, 'dwarven ruins': 0.24, 'spirit mirror': 0.33, 'valiant knight': 0.42, 'psychic battle': 0.72, 'psychotic fury': 0.51, 'giant turtle': 0.5, 'hibernation': 0.19, "heroes' podium": 0.34, 'fungal sprouting': 0.46, 'reduce to dreams': 0.42, 'emergency powers': 0.64, 'one with nature': 1.79, "urza's ruinous blast": 1.27, 'opaline sliver': 2.27, 'deep-sea kraken': 0.97, 'emerald dragonfly': 0.06, 'wei ambush force': 3.76, 'orcish mechanics': 0.33, 'web of inertia': 0.94, 'wydwen, the biting gale': 0.13, 'cabal therapist': 0.26, 'curse of misfortunes': 3.29, 'mass diminish': 0.44, 'hall of triumph': 0.39, 'fleetfoot panther': 0.98, 'crystal chimes': 1.1, "drana's emissary": 0.58, 'no rest for the wicked': 1.1, 'pangosaur': 0.26, 'noosegraf mob': 0.41, 'chorus of the conclave': 0.26, 'canopy cover': 0.75, 'retraced image': 3.39, 'dwarven blastminer': 1.78, 'oath of liliana': 0.45, 'thran temporal gateway': 0.9, 'stromkirk condemned': 0.15, 'biovisionary': 1.02, 'obelisk of esper': 0.24, 'fugitive druid': 0.35, 'squee, the immortal': 1.18, "gaea's embrace": 0.33, 'renegade krasis': 0.24, "what's yours is now mine": 0.74, 'army ants': 0.23, 'phyrexian plaguelord': 0.23, 'dawn charm': 0.1, 'cliffhaven vampire': 0.67, 'snake pit': 0.61, 'kalonian behemoth': 0.26, 'moonlight bargain': 0.5, 'vivid crag': 0.72, 'blinkmoth infusion': 3.99, 'karoo': 0.75, 'svyelunite temple': 0.14, 'broodmate dragon': 0.42, 'fated retribution': 0.26, 'selesnya eulogist': 0.21, 'tek': 0.41, 'jedit ojanen of efrava': 1.27, 'brothers of fire': 0.06, 'counterbore': 0.47, 'impassioned orator': 1.08, 'midnight ritual': 0.25, 'boneyard parley': 0.26, 'deep analysis': 0.19, 'molten-tail masticore': 0.57, 'rattleclaw mystic': 0.59, 'the ur-dragon': 0.33, 'eastern paladin': 0.23, 'saskia the unyielding': 0.33, 'brightstone ritual': 1.29, 'kopala, warden of waves': 0.68, 'glyph of doom': 0.51, 'khorvath brightflame': 0.65, "misfortune's gain": 0.33, "seht's tiger": 0.41, 'divine reckoning': 0.35, 'kusari-gama': 2.67, 'theft of dreams': 0.19, 'mogg conscripts': 0.33, 'abundant growth': 0.44, 'chamber of manipulation': 1.32, 'long-forgotten gohei': 0.29, 'mist-syndicate naga': 2.09, 'vizzerdrix': 0.22, 'khalni garden': 0.25, 'absolute grace': 0.48, 'phylactery lich': 0.17, 'mountain bandit': 4.94, 'fierce invocation': 0.01, 'peer pressure': 0.62, 'infinite hourglass': 0.23, 'spell crumple': 0.5, 'roar of reclamation': 0.46, 'nantuko mentor': 0.29, 'wall of frost': 0.24, 'reaper of the wilds': 0.18, "gerrard's verdict": 0.31, 'thriss, nantuko primus': 0.28, "executioner's capsule": 0.11, 'thought scour': 0.81, 'sturmgeist': 0.22, 'bulwark': 0.26, 'galvanoth': 0.24, 'thought sponge': 0.16, 'instigator': 0.3, 'crashing footfalls': 2.06, 'desecrated tomb': 0.62, "tilonalli's summoner": 0.57, 'tyrant of discord': 0.3, 'soul sculptor': 1.27, "brass's bounty": 1.77, 'bloodbond march': 0.53, 'rolling thunder': 0.08, 'the antiquities war': 0.44, 'quasiduplicate': 1.27, 'glaciers': 0.27, 'burning earth': 0.62, 'overrun': 0.33, 'abduction': 0.25, 'goblin kaboomist': 0.28, 'harness by force': 0.2, 'traxos, scourge of kroog': 0.54, 'sunweb': 0.25, 'plant elemental': 0.23, "teferi's veil": 2.39, 'eyes of the wisent': 0.49, 'plaxcaster frogling': 0.2, 'asylum visitor': 0.25, 'your puny minds cannot fathom': 0.6, 'goblin goon': 0.15, 'persuasion': 0.26, 'favor of the mighty': 0.62, 'burnout': 0.32, 'hand of cruelty': 0.22, 'grid monitor': 1.78, 'garza zol, plague queen': 0.62, 'greven, predator captain': 0.32, 'broken visage': 0.24, "gryff's boon": 0.04, 'gorilla warrior': 0.11, 'syphon soul': 0.1, 'pianna, nomad captain': 0.32, 'pestermite': 0.42, 'gleam of authority': 0.22, 'anarchy': 0.32, 'bosh, iron golem': 0.11, 'zealous persecution': 0.13, 'tribal unity': 0.62, 'strands of night': 1.41, 'elvish soultiller': 0.43, 'capricopian': 0.19, 'jori en, ruin diver': 0.33, 'ishi-ishi, akki crackshot': 0.25, "mercadia's downfall": 1.9, 'crater hellion': 0.16, 'bee sting': 0.14, "all suns' dawn": 0.49, 'cavern harpy': 0.35, 'rumbling slum': 0.28, 'muck drubb': 0.14, 'iron myr': 0.27, 'coastal tower': 0.15, 'behold my grandeur': 0.57, 'spectral sliver': 0.22, 'exava, rakdos blood witch': 0.24, "colfenor's urn": 2.98, 'wistful selkie': 0.29, 'diregraf captain': 0.25, 'armor sliver': 0.18, 'siege dragon': 0.42, "sosuke's summons": 0.82, 'djinn of infinite deceits': 0.52, 'savage firecat': 0.25, 'keldon marauders': 0.18, 'vivid meadow': 0.89, 'battle squadron': 0.32, "kirtar's wrath": 0.15, 'slaughter games': 0.16, 'skyshroud ranger': 0.81, 'skyshroud elite': 0.23, 'mirror of fate': 0.57, 'kessig malcontents': 0.17, 'contested war zone': 0.2, 'contested cliffs': 0.42, 'vodalian illusionist': 0.39, 'skull storm': 0.84, 'mind shatter': 0.19, 'song of freyalise': 0.83, 'virtuous charge': 4.48, "sisay's ring": 0.12, 'enormous baloth': 0.07, 'bastion enforcer': 0.2, 'enshrined memories': 0.5, 'intangible virtue': 0.13, 'shefet dunes': 0.2, 'warmonger hellkite': 0.91, 'woolly razorback': 0.49, 'split decision': 0.66, "nylea's intervention": 0.39, 'demon of wailing agonies': 0.98, 'steadfastness': 0.14, 'cyclopean mummy': 0.07, 'squall line': 1.89, 'flickerform': 1.05, 'oracle en-vec': 0.42, 'looter il-kor': 0.1, 'seismic mage': 0.37, 'hollowborn barghest': 0.46, 'stampede': 0.23, 'terra eternal': 1.69, 'spelltwine': 0.34, 'septic rats': 0.49, 'wand of denial': 0.36, 'ring of xathrid': 0.49, 'fieldmist borderpost': 0.26, 'crown of the ages': 0.32, 'fury sliver': 0.33, 'haze of rage': 0.23, 'captain lannery storm': 3.67, 'spin into myth': 0.42, "liliana's contract": 1.79, 'devout monk': 0.21, 'artificial evolution': 2.14, 'order of the white shield': 0.1, 'displacement wave': 0.88, 'frontier bivouac': 0.39, 'shivan harvest': 0.94, 'crypt sliver': 1.12, 'wood sage': 0.09, 'kodama of the north tree': 0.66, 'lost auramancers': 0.06, 'knighthood': 0.26, 'lost order of jarkeld': 0.31, 'sevinne, the chronoclasm': 0.31, 'volcanic vision': 0.2, 'pulse of the grid': 0.63, 'thorn mammoth': 0.73, 'kitesail freebooter': 0.19, 'skilled animator': 0.01, 'skeleton shard': 0.21, 'wight of precinct six': 0.18, 'scoured barrens': 0.12, 'deceiver exarch': 0.33, "liliana's standard bearer": 0.43, 'blightning': 0.27, 'cloudpost': 0.65, 'protector of the crown': 2.72, 'sickening dreams': 0.29, 'where ancients tread': 0.52, 'gleancrawler': 0.33, 'charging cinderhorn': 0.39, 'ghired, conclave exile': 0.31, 'sejiri steppe': 0.25, 'pyre zombie': 0.31, 'syphon flesh': 0.11, 'glittering lynx': 0.18, 'ghost council of orzhova': 0.26, 'lightning visionary': 0.01, 'trygon predator': 0.13, 'brawn': 0.39, 'augur of skulls': 0.27, 'wu elite cavalry': 0.31, 'saprazzan cove': 0.56, 'skyknight legionnaire': 0.01, 'oath of mages': 0.31, 'amber prison': 0.33, 'nobilis of war': 0.24, "apostle's blessing": 0.28, 'reverent silence': 0.21, 'gruul turf': 0.23, 'spirit of the hunt': 1.33, 'spirit of the hearth': 0.29, 'crush of wurms': 1.31, 'nightscape master': 0.25, 'tetzimoc, primal death': 0.55, 'banishing light': 0.12, 'suffer the past': 0.11, 'reap intellect': 0.25, "nature's claim": 1.06, 'withered wretch': 0.74, 'sporeback troll': 0.26, 'canal dredger': 0.31, 'curse of chains': 0.3, 'bygone bishop': 0.25, 'oust': 0.29, 'back to nature': 0.24, 'cytoplast root-kin': 0.24, 'cabal conditioning': 0.58, 'upwelling': 2.3, 'opal palace': 0.1, 'remove soul': 0.02, 'standing stones': 1.05, 'stag beetle': 0.59, 'staff of zegon': 0.31, 'striking sliver': 0.35, 'baleful force': 0.31, 'nahiri, the lithomancer': 7.94, 'tectonic hellion': 0.06, "auramancer's guise": 0.67, 'winding constrictor': 0.35, 'corpse connoisseur': 0.47, 'pikemen': 0.06, 'kaijin of the vanishing touch': 0.21, 'vithian renegades': 0.22, 'smoldering crater': 0.1, 'wingmate roc': 0.28, 'copperhoof vorrac': 0.35, 'sliversmith': 0.08, 'vizier of many faces': 0.6, 'mist of stagnation': 0.33, "chandra's flame wave": 0.26, 'soldier of the pantheon': 0.24, 'overabundance': 3.96, 'thallid devourer': 0.31, 'creeping chill': 0.28, 'pestilence demon': 0.63, 'crash of rhino beetles': 3.16, 'cranial extraction': 1.28, 'brutal nightstalker': 0.23, 'myojin of infinite rage': 2.29, "jace's mindseeker": 0.25, 'mycoid shepherd': 0.26, 'ruins of trokair': 0.11, 'gravity well': 0.36, 'celestial purge': 0.27, 'barren glory': 1.07, 'rapid decay': 0.37, 'grappling hook': 0.8, 'paliano, the high city': 0.26, 'epochrasite': 0.24, 'din of the fireherd': 0.4, 'enigma drake': 0.16, 'empyrial plate': 0.63, 'force bubble': 0.35, 'formless nurturing': 0.01, 'ever after': 0.19, 'filigree angel': 0.25, "dromar's charm": 0.3, 'elderwood scion': 0.17, 'everglades': 0.54, 'elfhame sanctuary': 0.73, 'vedalken mastermind': 0.41, 'into the north': 2.13, 'grasping giant': 0.54, "chandra's firemaw": 0.22, 'trinket mage': 0.26, 'rivalry': 0.2, 'southern elephant': 0.23, 'antagonism': 0.29, 'tranquil thicket': 0.14, 'vedalken plotter': 0.48, 'profaner of the dead': 0.19, 'promise of power': 0.66, "garza's assassin": 0.52, 'doubling chant': 0.28, 'bloodthrone vampire': 0.12, 'vampiric link': 0.38, 'isolate': 0.08, 'profane memento': 1.11, 'death match': 0.37, 'isao, enlightened bushi': 2.1, 'ironclaw curse': 0.29, 'bloodfire colossus': 0.22, 'ancient hellkite': 0.21, 'clickslither': 0.29, "rogue's passage": 0.27, 'crovax, ascendant hero': 0.62, 'bone harvest': 0.22, 'soul burn': 0.1, 'vampire hexmage': 0.26, 'unravel the aether': 0.87, 'soltari emissary': 0.3, "barrin's spite": 0.36, "urza's chalice": 0.3, 'amok': 0.24, 'glint-horn buccaneer': 2.36, 'polluted mire': 0.29, 'miscalculation': 0.41, 'engulfing eruption': 0.2, 'priest of gix': 1.26, 'sphinx of foresight': 0.37, 'nemesis mask': 1.28, 'decimator web': 0.36, 'unbender tine': 0.3, 'pulse of the fields': 0.34, 'the protector': 0.4, 'extinguish': 5.5, 'strangleroot geist': 0.43, 'testament of faith': 0.15, 'armored griffin': 0.1, "thalia's lancers": 0.41, 'the grand calcutron': 0.75, 'last-ditch effort': 0.55, 'moss diamond': 0.1, 'argothian treefolk': 0.3, 'talisman of conviction': 2.86, 'moldgraf monstrosity': 0.4, 'syphon mind': 1.77, 'recoil': 0.35, 'kodama of the south tree': 0.65, 'reality strobe': 0.44, 'talisman of hierarchy': 2.77, 'glacial ray': 0.07, 'molten disaster': 0.42, 'monsoon': 0.42, 'tel-jilad stylus': 0.3, 'the philosopher': 0.33, 'the savant': 0.3, 'fortunate few': 0.33, 'arcanum wings': 0.56, 'pyreheart wolf': 0.25, 'mob rule': 0.21, 'arcane encyclopedia': 0.2, 'revenge of the hunted': 0.21, 'blurred mongoose': 0.28, 'crag saurian': 0.26, 'izzet staticaster': 0.22, 'stand or fall': 0.33, 'the warrior': 0.34, 'this world belongs to me': 0.68, 'baku altar': 0.39, 'rain of salt': 0.24, 'forget': 0.24, 'lena, selfless champion': 0.19, 'stand': 0.15, 'thoughts of ruin': 0.63, 'lavinia, azorius renegade': 0.96, 'leering emblem': 1.0, 'loxodon hierarch': 0.42, 'verdant succession': 0.48, 'when will you learn?': 0.81, 'heroes remembered': 0.8, 'gold myr': 0.09, 'pardic miner': 0.69, 'caltrops': 0.5, 'pallimud': 0.25, 'damping matrix': 0.35, 'aegis angel': 0.31, 'benalish knight': 0.09, 'advance scout': 0.04, 'deliver': 0.15, 'penance': 0.65, 'hinder': 0.24, 'diabolic machine': 0.08, "dromar's cavern": 0.97, 'magus of the mirror': 0.36, 'warping wail': 1.41, 'glyph of reincarnation': 1.03, 'oath of jace': 0.28, "feroz's ban": 0.23, 'sibilant spirit': 0.12, "wizard's lightning": 0.2, 'grim backwoods': 0.24, 'wall of shadows': 0.07, 'yellow scarves troops': 3.32, 'orochi hatchery': 0.69, 'bitter feud': 0.63, 'sejiri refuge': 0.25, 'masumaro, first to live': 0.66, 'dragonshift': 0.18, 'merrow harbinger': 1.4, 'scalpelexis': 0.26, 'orzhov basilica': 0.24, "general's regalia": 0.38, "dralnu's crusade": 1.0, 'acidic slime': 0.1, 'outpost siege': 0.28, "serra's guardian": 0.27, 'fendeep summoner': 0.35, 'fruition': 5.57, 'magnivore': 0.75, "honden of life's web": 0.83, 'mind control': 0.12, 'plague stinger': 0.45, 'fatal frenzy': 0.36, "volrath's laboratory": 0.3, 'hoofprints of the stag': 0.1, 'saber ants': 0.36, 'nivmagus elemental': 0.3, 'magmatic insight': 0.26, 'skirk alarmist': 0.25, "mages' contest": 3.3, 'skycloud egg': 0.24, 'safeguard': 0.28, 'phantom nantuko': 0.21, 'honden of cleansing fire': 2.38, 'nuisance engine': 0.28, 'luminate primordial': 0.24, 'gempalm polluter': 0.26, 'salvaging station': 1.31, 'phyrexian lens': 0.29, 'death grasp': 0.24, 'snowblind': 1.63, "surveyor's scope": 0.6, 'goblin burrows': 0.32, 'baru, fist of krosa': 1.11, 'ethereal absolution': 0.48, 'dimir infiltrator': 1.3, 'elvish bard': 0.09, "basri's lieutenant": 0.41, 'essence harvest': 0.21, 'goblin diplomats': 0.32, 'blood host': 0.1, 'chaos wand': 0.21, 'bonded fetch': 0.07, 'recoup': 0.28, 'stratus dancer': 0.1, 'suncleanser': 0.17, 'ruin ghost': 0.34, 'snake umbra': 0.32, 'evolution vat': 0.54, 'claws of gix': 2.01, 'stone haven outfitter': 0.31, 'scourge of skola vale': 0.23, 'sarkhan the masterless': 0.4, 'saproling cluster': 0.28, 'shock': 0.02, 'flood': 0.11, 'retaliate': 0.38, 'mana geyser': 1.28, 'metzali, tower of triumph': 0.31, 'miscast': 2.33, 'siegehorn ceratops': 0.73, 'sigil of the new dawn': 0.24, 'sparkhunter masticore': 0.16, 'glimmerpost': 0.18, "liliana's scorn": 0.21, 'rienne, angel of rebirth': 0.29, 'glyph of delusion': 1.27, 'living armor': 0.07, 'sigiled sword of valeron': 0.83, 'signal the clans': 0.46, "baral's expertise": 0.57, 'lone missionary': 0.22, 'death wish': 0.4, 'desperate gambit': 0.3, 'fissure': 0.06, 'changeling titan': 1.42, 'shared fate': 0.62, 'stonebrow, krosan hero': 0.87, 'dermoplasm': 0.3, "chandra's phoenix": 0.36, 'lava blister': 0.38, 'lavalanche': 0.23, 'star compass': 1.05, 'magma jet': 0.12, 'shifting borders': 0.54, 'enigma sphinx': 0.23, 'renegade rallier': 0.17, 'simic growth chamber': 0.17, 'shimmering barrier': 0.23, 'colossal whale': 0.2, 'basking rootwalla': 0.12, 'devouring strossus': 0.45, 'hex': 0.12, 'presence of gond': 0.23, 'predatory advantage': 0.3, 'predator, flagship': 0.34, 'false summoning': 0.29, 'unnatural hunger': 0.32, 'ancient amphitheater': 0.5, 'independent troops': 2.93, 'curse of stalked prey': 0.42, 'oath of scholars': 0.32, 'anax and cymede': 0.21, "urza's blueprints": 0.27, 'curse of marit lage': 0.43, "urza's science fair project": 0.34, 'angelic blessing': 0.02, 'oathsworn giant': 0.67, 'tunnel ignus': 0.22, 'creeperhulk': 0.28, 'brain maggot': 0.1, 'doomwake giant': 0.27, 'path of mettle': 0.31, 'necroplasm': 0.44, 'patient rebuilding': 0.78, 'uyo, silent prophet': 0.3, 'favorable winds': 0.4, 'hollow specter': 0.32, 'demon of catastrophes': 0.31, 'nix': 2.77, 'bronzehide lion': 0.44, 'horn of plenty': 0.4, 'greener pastures': 0.34, 'nocturnal feeder': 0.03, 'wall of granite': 0.31, 'wasteland viper': 0.33, "nissa's renewal": 0.18, 'wei strike force': 0.29, 'wei scout': 12.94, "captain's maneuver": 0.19, 'alloy myr': 0.24, 'persistent petitioners': 1.46, 'vibrating sphere': 0.29, 'icatian town': 0.19, 'null profusion': 0.49, 'wave of vitriol': 1.16, 'watcher of the roost': 0.06, 'naya panorama': 0.24, 'elder of laurels': 0.2, 'dark heart of the wood': 0.12, 'force of virtue': 0.43, 'keldon twilight': 0.33, 'the slayer': 0.34, 'face of divinity': 0.09, 'fade away': 1.18, 'tooth of ramos': 0.79, "kadena's silencer": 0.08, 'temporal distortion': 0.2, 'grinning totem': 0.25, 'order of the ebon hand': 0.19, 'realm razer': 0.35, 'szadek, lord of secrets': 0.37, 'tablet of epityr': 0.29, 'constricting sliver': 1.4, 'tamanoa': 0.88, 'tangle kelp': 0.93, 'ashcloud phoenix': 0.21, 'fabled hero': 0.23, 'deep wood': 0.3, 'guard gomazoa': 0.4, "gideon's intervention": 0.21, 'thundering spineback': 0.17, 'gadrak, the crown-scourge': 0.81, 'wrath of marit lage': 0.18, 'tidebinder mage': 0.38, 'coveted jewel': 0.48, 'pack hunt': 0.35, 'jalira, master polymorphist': 0.24, "ajani's chosen": 0.35, 'destructive force': 0.24, 'faerie swarm': 1.07, 'jötun grunt': 0.15, 'omen machine': 0.94, 'quest for the holy relic': 0.18, 'archfiend of spite': 0.23, 'by force': 1.05, 'millikin': 0.13, 'scalding tongs': 0.32, 'blind seer': 0.45, 'discovery': 0.29, 'pestilent spirit': 0.34, "orim's prayer": 0.39, 'diabolic servitude': 0.27, 'goblin cadets': 0.35, 'charmed pendant': 0.56, 'melek, izzet paragon': 0.22, 'burning anger': 0.01, 'oriss, samite guardian': 0.78, 'mercadian lift': 0.25, 'noggin whack': 0.3, 'searing wind': 0.31, 'quirion elves': 1.65, 'censor': 0.2, 'goblin mutant': 0.13, 'dingus staff': 0.69, 'research': 0.47, 'purify': 0.26, 'falkenrath marauders': 0.25, 'faerie aerie': 0.44, 'myr enforcer': 0.38, 'rakdos riteknife': 0.38, 'reckless charge': 0.05, 'molder slug': 0.43, 'reach of branches': 0.25, "rath's edge": 0.38, 'monstrous carabid': 0.24, 'regal caracal': 0.73, 'cerulean wisps': 1.5, 'borderland behemoth': 0.29, 'fire and brimstone': 1.22, 'development': 0.47, 'neurok stealthsuit': 0.28, 'evolutionary escalation': 0.43, 'rule of law': 0.3, 'plaguecrafter': 0.33, 'dictate of heliod': 0.41, 'eviscerator': 0.26, 'plague sliver': 0.94, 'mindclaw shaman': 0.25, 'plagiarize': 0.32, 'piracy charm': 0.03, 'no one will hear your cries': 0.59, 'brood of cockroaches': 0.34, 'phyrexian rebirth': 0.35, 'mind harness': 0.23, 'plaza of harmony': 0.27, 'chaos confetti': 1.76, 'cateran slaver': 0.35, 'prognostic sphinx': 0.05, 'diligent farmhand': 0.72, 'brash taunter': 2.5, 'fallowsage': 0.59, 'nekrataal': 0.17, 'powerstone minefield': 0.44, 'nessian wilds ravager': 0.25, 'realm seekers': 0.48, 'search for tomorrow': 0.26, 'deep-sea serpent': 0.23, 'karplusan yeti': 0.11, 'weirding shaman': 0.46, 'tempting wurm': 1.25, 'hoard-smelter dragon': 0.1, 'armored guardian': 0.24, 'the general': 0.26, 'kami of false hope': 1.44, 'lava coil': 0.18, 'thicket elemental': 0.23, 'thorn lieutenant': 0.19, 'kalamax, the stormsire': 1.31, 'archetype of finality': 1.04, 'wayward servant': 0.27, 'hoarding dragon': 0.24, 'whetstone': 0.39, "teferi's wavecaster": 0.14, 'elite arcanist': 0.33, 'kjeldoran dead': 0.12, 'last stand': 0.21, "heroes' reunion": 0.1, 'grave upheaval': 0.6, 'cryptborn horror': 0.14, 'sun-blessed mount': 0.35, 'sway of the stars': 2.36, 'whirlpool drake': 0.3, 'swiftblade vindicator': 0.46, "autumn's veil": 0.65, 'ghitu fire': 0.26, 'symbiotic deployment': 0.45, 'kor firewalker': 0.5, 'kor cartographer': 0.1, 'know evil': 0.51, 'knight of dusk': 0.5, 'wall of heat': 0.06, 'tromokratis': 0.15, 'crimson honor guard': 0.15, 'twist allegiance': 0.35, 'curfew': 0.24, 'ink-treader nephilim': 1.3, "crosis's charm": 0.8, 'infernal offering': 0.18, 'hover barrier': 0.43, 'hulking goblin': 0.14, 'altar golem': 0.37, 'crusader of odric': 0.05, 'veteran brawlers': 0.24, "angrath's marauders": 0.94, 'animal sanctuary': 0.67, 'thrull parasite': 0.41, 'thrummingbird': 0.45, 'doom foretold': 0.11, 'arc trail': 0.14, "jace's erasure": 0.24, "ajani's mantra": 0.55, "ajani's pridemate": 0.11, 'foster': 0.2, 'vulturous zombie': 0.24, 'tooth and claw': 0.17, 'it that rides as one': 0.2, 'trade secrets': 0.42, 'tremor': 0.07, "volrath's dungeon": 0.35, 'magnigoth treefolk': 0.41, 'master of the veil': 0.53, 'selesnya charm': 0.35, 'grisly salvage': 0.21, 'skewer the critics': 0.58, 'lurking skirge': 0.33, 'dream tides': 0.64, 'mawcor': 0.2, 'clan defiance': 0.25, 'worldknit': 0.25, 'skullcage': 0.29, 'slippery karst': 0.23, 'gudul lurker': 0.65, 'dragonscale boon': 0.03, 'abzan charm': 0.14, 'gwafa hazid, profiteer': 0.41, 'mana vapors': 0.19, 'bellowing tanglewurm': 0.67, 'gnaw to the bone': 0.18, 'shivan wumpus': 0.64, 'daring fiendbonder': 0.23, 'show of valor': 0.2, 'mana bloom': 0.47, "yahenni's expertise": 0.26, 'sigil of sleep': 0.38, "martyr's cause": 1.06, 'entangler': 1.04, 'bant charm': 0.06, 'cloud spirit': 0.05, "banshee's blade": 0.24, 'dream fracture': 0.3, 'dispersal': 0.29, 'gaze of granite': 0.19, 'lightning coils': 0.57, 'end-raze forerunners': 0.82, 'spinal embrace': 0.16, 'dream pillager': 0.1, 'collapsing borders': 0.28, 'empty the warrens': 0.22, 'demanding dragon': 0.2, 'standardize': 0.89, 'serrated biskelion': 0.34, 'spectral lynx': 0.47, 'snow fortress': 0.28, 'global ruin': 0.3, "wolfcaller's howl": 3.28, 'lone rider': 0.2, 'soltari visionary': 0.28, 'somnophore': 0.38, 'spawning pool': 0.39, 'dance of the manse': 0.48, 'fyndhorn elder': 0.18, 'souvenir snatcher': 0.24, 'aerial caravan': 0.28, 'dark hatchling': 0.12, 'dark-dweller oracle': 0.18, 'degavolver': 0.23, 'crystal ball': 0.42, 'hunted dragon': 0.45, 'frontier warmonger': 0.2, 'hell swarm': 1.19, 'guildpact informant': 1.8, "obzedat's aid": 0.21, 'hatching plans': 0.54, 'obsessive search': 0.27, 'hollow dogs': 0.07, 'curious homunculus': 0.47, 'obsidian battle-axe': 0.31, 'canyon drake': 0.29, "darigaaz's charm": 0.18, 'daring thief': 0.27, 'honden of infinite rage': 1.04, 'nomad outpost': 0.74, 'okaun, eye of chaos': 1.1, 'curious herd': 0.18, 'honored hierarch': 0.14, 'omnibian': 0.7, 'hound of griselbrand': 0.31, 'norwood ranger': 0.07, 'medicine bag': 0.31, 'hypnotic siren': 0.29, 'dawn elemental': 0.42, 'loyal guardian': 3.2, 'mirror match': 0.26, 'clockwork dragon': 0.64, 'clockwork steed': 0.04, 'nighthowler': 0.22, "liliana's spoils": 0.4, 'flurry of wings': 0.3, 'mogg flunkies': 0.06, 'gorm the great': 0.48, 'maze of shadows': 0.27, 'meltdown': 4.84, 'mass manipulation': 0.64, 'merciless predator': 0.3, 'mardu strike leader': 0.18, 'manic scribe': 0.25, 'metallic sliver': 0.23, 'metrognome': 0.3, 'malignant growth': 1.43, 'midnight haunting': 0.24, 'mold adder': 0.29, 'kuro, pitlord': 0.25, 'mystic crusader': 0.25, 'mythic proportions': 0.45, 'cathedral membrane': 0.22, "ixalan's binding": 0.2, 'insult': 0.64, 'injury': 0.64, 'infernal genesis': 9.65, 'infantry veteran': 0.04, 'indulgent tormentor': 0.52, 'increasing devotion': 0.18, 'carnivorous plant': 0.03, "feudkiller's verdict": 0.19, 'mystic sanctuary': 1.19, 'crackling doom': 0.24, 'kezzerdrix': 0.27, 'kazandu refuge': 0.17, 'jodah, archmage eternal': 1.13, 'forgotten creation': 0.2, 'celestial sword': 0.27, 'celestial gatekeeper': 0.96, 'determined': 0.39, 'cloudhoof kirin': 0.42, 'doom blade': 0.22, 'avenging huntbonder': 0.12, 'stormfist crusader': 0.5, 'stone-cold basilisk': 0.33, 'bala ged thief': 0.25, 'emerge unscathed': 0.33, 'empty the catacombs': 0.41, 'spiritual focus': 0.36, 'tainted sigil': 0.73, 'talon sliver': 0.36, 'thrashing wumpus': 0.57, 'echo chamber': 0.46, 'archetype of aggression': 0.56, 'thought devourer': 0.25, 'the vanquisher': 0.28, 'the provider': 0.31, "thassa's intervention": 0.2, 'tetsuko umezawa, fugitive': 1.32, 'artifact possession': 1.48, 'artifact ward': 0.88, 'spark trooper': 0.21, 'soul of zendikar': 0.21, 'biorhythm': 1.38, 'serene master': 0.47, "sek'kuar, deathkeeper": 0.31, 'shimian specter': 0.16, 'screeching phoenix': 0.23, 'scrapyard recombiner': 0.46, 'scavenger folk': 0.04, 'salt road ambushers': 0.22, 'glint-eye nephilim': 0.25, 'beacon of destruction': 0.17, "barrin's codex": 0.34, 'death pit offering': 0.26, 'slave of bolas': 0.51, 'entrails feaster': 0.4, 'skarrg, the rage pits': 0.69, 'behemoth sledge': 0.06, 'ephemeron': 0.27, 'silverfur partisan': 2.6, 'bee-bee gun': 0.37, 'beetleback chief': 0.27, 'geist-honored monk': 0.22, 'sage of epityr': 0.28, 'dreampod druid': 0.17, 'whipflare': 0.19, 'well of discovery': 0.31, 'aethersphere harvester': 0.32, 'wasteland strangler': 0.21, 'wall of blood': 0.64, 'voracious reader': 0.47, 'drownyard temple': 0.23, 'willow dryad': 0.25, 'wirewood hivemaster': 0.19, 'abyssal nightstalker': 0.28, 'a reckoning approaches': 0.67, 'zada, hedron grinder': 0.43, 'academy researchers': 0.23, 'acclaimed contender': 0.18, 'wu warship': 0.27, 'torrent of souls': 0.14, 'turntimber ranger': 0.65, 'dwarven driller': 2.55, "angrath's fury": 0.25, 'treasure cruise': 0.25, 'tragic slip': 0.34, 'tornado elemental': 0.33, "angel's trumpet": 1.51, 'tomik, distinguished advokist': 0.26, 'tomb of urami': 0.63, 'earnest fellowship': 1.06, 'timecrafting': 0.32, 'arashin war beast': 0.03, 'angelheart vial': 0.3, "ulamog's crusher": 0.25, 'ghostly visit': 0.27, 'vengeful dreams': 0.35, 'villainous wealth': 0.44, 'vexing arcanix': 0.14, 'venarian gold': 0.84, 'veldrane of sengir': 1.65, 'every dream a nightmare': 0.56, 'grindclock': 0.26, 'brass herald': 0.01, 'restock': 0.19, 'false demise': 0.23, 'penumbra wurm': 0.18, 'brass squire': 0.07, 'path of bravery': 0.2, 'ring of thune': 0.05, 'rise': 0.25, "primevals' glorious rebirth": 1.41, 'feast of the unicorn': 0.08, 'quicksilver elemental': 0.64, 'breath of darigaaz': 0.28, 'ramosian sky marshal': 0.33, 'reckless waif': 0.3, 'plague boiler': 0.22, 'planar cleansing': 0.24, "piper's melody": 0.27, 'dimir house guard': 0.75, 'brightflame': 0.42, 'rekindled flame': 0.24, 'diamond faerie': 0.32, 'relic seeker': 0.18, 'bog raiders': 0.05, 'prohibit': 0.05, 'bounding krasis': 0.2, 'felhide spiritbinder': 0.2, 'overgrowth': 0.51, 'runesword': 0.05, 'bound': 0.39, 'fall': 0.25, 'tibor and lumia': 0.23, 'thumbscrews': 0.24, 'an-havva constable': 0.25, 'iname, life aspect': 0.47, 'incite rebellion': 0.4, 'amulet of safekeeping': 0.13, 'amugaba': 0.4, 'arcbond': 0.39, "prowler's helm": 0.69, 'arcbound lancer': 0.26, 'plaguemaw beast': 0.26, 'ebony owl netsuke': 0.46, 'nest of scarabs': 0.36, 'portal mage': 0.12, "treva's charm": 0.23, 'torture chamber': 0.27, 'naya charm': 0.1, 'izzet guildmage': 0.22, 'transmutation': 0.05, 'anthem of rakdos': 0.49, 'treacherous terrain': 0.18, 'invader parasite': 0.23, 'titan hunter': 0.1, 'insolent neonate': 0.24, 'tyrannize': 0.24, 'demonic dread': 0.23, 'unburial rites': 0.17, 'ancient silverback': 0.06, 'sage of ancient lore': 1.07, 'aether spellbomb': 0.24, 'dramatic reversal': 0.57, 'harbinger of the hunt': 0.31, 'drawn from dreams': 0.2, "wolf of devil's breach": 0.44, 'witch engine': 0.42, 'panic': 0.18, 'aeon engine': 0.13, 'havenwood battleground': 0.17, 'hellkite igniter': 0.17, 'wild evocation': 0.51, 'custodi soulbinders': 0.16, 'hero of precinct one': 0.32, 'hammer mage': 0.5, 'wormfang manta': 0.34, 'ophidian eye': 2.62, 'abhorrent overlord': 0.34, 'call': 0.2, "dragonlord's servant": 0.27, 'growth-chamber guardian': 0.22, 'zameck guildmage': 0.17, 'feline sovereign': 0.37, 'guerrilla tactics': 0.11, 'orzhov signet': 0.59, 'gurmag angler': 0.2, 'oloro, ageless ascetic': 9.1, 'ob nixilis of the black oath': 7.18, 'hornet cobra': 0.54, 'vizier of tumbling sands': 0.17, 'phyrexian furnace': 0.6, "hunter's prowess": 0.27, 'noble benefactor': 0.39, 'drumhunter': 0.57, 'jor kadeen, the prevailer': 0.2, 'vine trellis': 0.87, 'alabaster potion': 0.03, 'hypersonic dragon': 0.29, 'pit spawn': 0.47, 'vizkopa guildmage': 0.29, 'void stalker': 0.19, 'wall of earth': 0.56, 'werewolf of ancient hunger': 1.07, 'patron of the nezumi': 0.37, 'agonizing remorse': 0.03, 'oath of chandra': 0.2, 'brutalizer exarch': 0.41, "honden of night's reach": 0.97, 'akoum battlesinger': 0.12, 'voltaic construct': 0.8, "volrath's motion sensor": 0.3, 'hooded blightfang': 0.54, 'akoum refuge': 0.25, 'kari zev, skyship raider': 0.25, 'thran lens': 0.76, 'silverwing squadron': 0.51, 'lurking evil': 0.26, 'mistform wakecaster': 0.17, 'skeleton scavengers': 0.27, "rhonas's monument": 1.23, 'magus of the abyss': 0.25, 'magus of the balance': 0.3, "silumgar's command": 0.11, 'beck': 0.2, 'rites of spring': 0.21, 'shu farmer': 7.99, 'skittering invasion': 0.82, 'skull collector': 0.23, 'bargaining table': 0.35, 'soul exchange': 0.26, 'lockjaw snapper': 0.9, 'explore': 0.23, 'cloak of mists': 0.38, 'flesh-eater imp': 0.26, 'battle at the bridge': 0.2, 'smite the monstrous': 0.01, 'mesmeric fiend': 0.18, 'meglonoth': 0.63, 'blood funnel': 1.69, 'scroll thief': 0.08, 'scrapheap': 0.32, 'blazing effigy': 0.6, 'scepter of dominance': 0.26, 'mindleecher': 0.24, 'disciple of griselbrand': 0.24, 'saprazzan bailiff': 0.28, 'sandstone needle': 0.51, 'samite elder': 0.41, 'mindblade render': 1.9, 'salt marsh': 0.58, 'sages of the anima': 0.34, 'children of korlis': 0.15, 'rune snag': 0.08, 'blanchwood armor': 0.17, 'benthic biomancer': 0.47, 'besmirch': 1.06, 'mannichi, the fevered dream': 0.38, 'esper stormblade': 0.18, 'marsh casualties': 0.08, 'seraph sanctuary': 0.9, 'mire triton': 0.17, 'chimeric staff': 0.31, 'blade sliver': 1.18, 'flame javelin': 0.28, 'dispel': 0.21, 'for each of you, a gift': 0.62, 'elemental augury': 0.26, 'aryel, knight of windgrace': 0.42, 'boros garrison': 0.11, 'radiant fountain': 0.2, 'conquering manticore': 0.27, 'rakdos carnarium': 0.15, 'kor bladewhirl': 0.1, 'kothophed, soul hoarder': 0.31, 'sylvan advocate': 0.15, 'mudbrawler cohort': 0.28, "tezzeret's simulacrum": 0.14, 'psychic membrane': 0.23, 'jungle weaver': 0.23, 'jwar isle refuge': 0.26, 'echoing truth': 0.17, 'corpse augur': 0.1, 'dimensional breach': 0.36, 'pulse tracker': 0.26, 'punishing fire': 0.24, 'kazuul warlord': 0.24, 'keeper of the beasts': 0.16, 'swift silence': 0.32, 'surge of righteousness': 0.14, 'avenger en-dal': 0.27, 'flowstone slide': 0.19, 'disrupt': 0.27, 'flowstone sculpture': 0.26, 'liberate': 1.37, 'bonehoard': 0.2, 'spirit shackle': 0.05, 'spined sliver': 0.2, 'spike cannibal': 0.26, 'cloudthresher': 0.29, 'sphinx of magosi': 0.09, 'spellbinder': 10.72, 'bant sureblade': 0.15, 'flowstone strike': 0.06, 'spoils of blood': 0.54, "krenko's command": 0.28, 'springjack shepherd': 0.47, 'awaken the erstwhile': 0.43, 'azorius chancery': 0.12, 'cerodon yearling': 0.17, 'dissipate': 0.04, 'lava dart': 0.21, 'emmara, soul of the accord': 0.24, 'command the dreadhorde': 0.69, 'descendant of soramaro': 0.13, 'molten vortex': 0.16, '_____': 0.65, 'day of the dragons': 0.18, "garruk's horde": 0.17, 'deception': 4.33, 'darkwater egg': 0.25, "gorgon's head": 0.6, 'game preserve': 0.34, 'gerrymandering': 0.25, 'goldmane griffin': 0.2, 'debilitating injury': 0.03, 'graveyard marshal': 0.23, 'deadshot': 0.26, 'goblin chariot': 0.08, 'glint hawk': 0.17, 'altar of shadows': 0.37, 'naban, dean of iteration': 0.46, 'llanowar druid': 0.19, 'squeeze': 0.35, "squee's revenge": 0.98, 'deadshot minotaur': 0.2, 'ice cave': 0.44, 'gigadrowse': 0.24, 'deftblade elite': 0.25, 'runed arch': 0.3, 'night dealings': 1.54, 'krosan warchief': 0.22, 'krosan restorer': 0.36, 'goblin hero': 0.11, 'nascent metamorph': 0.09, 'fell shepherd': 0.17, 'evolution sage': 1.44, 'iizuka the ruthless': 1.27, 'goblin archaeologist': 0.55, 'goblin rally': 0.25, 'kalonian tusker': 0.1, 'bronze calendar': 0.11, 'hard hat area': 0.45, 'felidar guardian': 0.74, 'despark': 0.3, 'captivating crew': 0.29, 'rocket-powered turbo slug': 0.53, 'sisay, weatherlight captain': 0.96, 'tower defense': 0.24, 'living hive': 1.22, 'escape to the wilds': 0.52, 'call the gatewatch': 0.28, 'ballot broker': 0.14, 'ayula, queen among bears': 0.21, "kumena's awakening": 0.56, 'volunteer militia': 3.51, 'phyrexian vatmother': 0.3, 'eldrazi obligator': 0.26, 'phyrexian tribute': 4.16, 'arrogant vampire': 0.23, 'connive': 0.35, 'gutter grime': 0.32, 'nightshade stinger': 0.1, 'ichiga, who topples oaks': 0.09, 'tattermunge maniac': 0.35, 'roast': 0.1, 'wall of glare': 0.63, 'bloodcrazed paladin': 0.28, 'to arms!': 1.32, 'lost legacy': 0.16, 'angelsong': 0.9, 'hand to hand': 0.36, 'epiphany at the drownyard': 0.5, 'ion storm': 0.13, 'takeno, samurai general': 0.76, 'all that glitters': 0.43, 'task mage assembly': 0.25, 'puppet strings': 1.32, 'excavation': 0.3, 'caress of phyrexia': 0.35, 'cho-arrim alchemist': 0.31, 'silumgar, the drifting death': 0.51, 'kor outfitter': 0.22, 'fanatical devotion': 1.72, 'choose your demise': 0.45, 'elkin bottle': 0.1, 'wilt-leaf cavaliers': 0.2, 'tarox bladewing': 0.38, 'necromaster dragon': 0.25, 'rending volley': 0.16, 'loyal subordinate': 1.18, "planeswalker's favor": 0.32, 'aqueous form': 0.21, 'skullmulcher': 0.14, 'ashcoat bear': 0.3, 'sigiled paladin': 0.34, 'wild mongrel': 0.15, 'steamflogger boss': 0.47, 'concoct': 0.35, 'clock of omens': 1.3, 'dream stalker': 0.09, 'reinforcements': 0.12, "pyromancer's gauntlet": 0.24, 'turtleshell changeling': 0.24, 'naturalize': 0.04, 'flesh': 0.17, 'silent assassin': 0.31, 'embermaw hellion': 0.28, 'flayer husk': 0.08, 'arachnus spinner': 0.22, "biomancer's familiar": 1.02, 'ifnir deadlands': 0.27, 'alabaster mage': 0.02, 'ipnu rivulet': 0.17, 'iceberg': 0.19, 'goblin shrine': 0.04, 'wall of limbs': 0.2, 'dawntreader elk': 0.18, 'virtus the veiled': 1.77, 'blood speaker': 1.2, 'predatory rampage': 0.28, 'gargoyle castle': 0.1, 'werebear': 0.19, 'evangelize': 0.28, 'lavaborn muse': 0.12, 'walking corpse': 0.03, 'magus of the library': 0.45, 'spatula of the ages': 0.25, 'woebringer demon': 0.28, 'swiftwater cliffs': 0.1, 'warmth': 0.13, 'selesnya sanctuary': 0.24, 'uphill battle': 0.25, 'vicious conquistador': 0.42, 'scarblade elite': 0.39, 'mob justice': 0.31, 'ooze garden': 0.27, 'culling sun': 0.29, 'cabal archon': 0.22, 'auratouched mage': 0.22, 'demonfire': 0.32, 'perilous myr': 0.01, 'shu grain caravan': 1.67, 'noble panther': 0.25, 'vizier of remedies': 0.26, 'shrine of loyal legions': 0.13, 'blood': 0.17, 'sunrise sovereign': 0.45, 'havoc festival': 0.24, "sarkhan's dragonfire": 0.24, 'shred memory': 0.5, 'fortune thief': 0.28, 'budoka pupil': 0.09, 'archon of redemption': 0.17, 'noxious grasp': 0.04, 'echo storm': 0.46, 'riders of gavony': 0.11, 'demonic embrace': 0.19, "sorin's guide": 0.22, 'grinning demon': 0.54, 'calciform pools': 0.17, 'defiant bloodlord': 0.23, "cultivator's caravan": 0.44, 'insist': 1.78, 'warped devotion': 0.27, 'riftwing cloudskate': 0.07, 'nullmage advocate': 0.16, 'moon sprite': 0.46, 'enrage': 0.1, 'shrapnel blast': 0.12, 'soul snare': 0.02, 'wolf-skull shaman': 0.26, 'carven caryatid': 0.32, 'andradite leech': 0.25, 'common cause': 0.32, 'whirler rogue': 0.1, 'saheeli, sublime artificer': 0.32, 'sai of the shinobi': 0.23, 'suffocating blast': 0.28, "marchesa's infiltrator": 0.13, 'lapse of certainty': 0.72, "laquatus's champion": 0.19, 'fated infatuation': 0.5, 'the brute': 0.09, 'reaping the graves': 1.26, 'sanctum of all': 0.62, 'bandage': 0.16, 'fight or flight': 0.71, 'lightning runner': 0.65, 'dragonscale general': 0.19, 'pheres-band warchief': 0.16, 'selesnya guildmage': 0.05, 'goblin wardriver': 0.24, 'bounty of the hunt': 0.07, 'the explorer': 0.32, 'summary dismissal': 0.38, "shapeshifter's marrow": 0.36, 'rebel informer': 0.25, 'war tax': 1.0, 'bequeathal': 0.23, 'jungle basin': 0.06, 'spellbound dragon': 0.31, 'last word': 1.04, 'arisen gorgon': 0.54, "erebos's intervention": 0.31, 'diplomatic escort': 0.26, 'sandstone oracle': 0.09, 'goblin dark-dwellers': 0.17, 'wipe away': 0.05, 'magmasaur': 0.25, 'firebolt': 0.1, 'deepfathom skulker': 0.23, 'master healer': 0.2, 'hedron matrix': 0.49, 'robe of mirrors': 0.23, 'marsh goblins': 0.34, "victory's herald": 0.28, 'primal might': 0.19, 'marionette master': 0.27, 'veteran swordsmith': 0.16, 'wirefly hive': 0.15, 'riptide survivor': 0.21, 'precognition': 0.27, "sivvi's valor": 0.2, 'oran-rief hydra': 0.55, 'roar of the wurm': 0.11, 'orcish captain': 0.19, 'supply': 0.32, 'supplant form': 0.22, 'seize the soul': 0.24, 'dauthi horror': 0.24, 'bloodline shaman': 0.23, "witch's oven": 0.84, 'heartwood giant': 0.24, 'riptide pilferer': 0.02, 'tribute mage': 0.99, 'bloodthirsty blade': 0.11, 'dauthi ghoul': 0.29, 'cryptolith fragment': 0.51, 'necrosavant': 0.25, 'aegis of the heavens': 0.12, 'river boa': 0.18, 'chorus of woe': 0.11, 'breakthrough': 0.26, 'from under the floorboards': 0.24, "rith's grove": 0.62, "wit's end": 0.18, 'cho-arrim bruiser': 0.31, 'petradon': 0.22, 'jinxed choker': 0.48, 'dispense justice': 0.13, 'perplex': 1.39, 'saprazzan skerry': 0.46, 'seal of primordium': 0.19, 'goblin cohort': 0.26, 'sapseep forest': 0.11, 'vanishing': 0.33, 'search for survivors': 0.25, 'miraculous recovery': 0.18, 'whirlpool rider': 0.22, 'safehold elite': 0.16, "phyrexia's core": 0.1, 'undergrowth': 0.08, 'warbreak trumpeter': 0.15, 'werewolf ransacker': 0.46, "d'avenant archer": 0.02, 'centaur archer': 0.24, 'blessed spirits': 0.05, 'feast on the fallen': 0.28, 'watermarket': 0.34, "urza's contact lenses": 0.38, 'moonrise intruder': 0.53, 'barren moor': 0.2, 'enlisted wurm': 0.19, 'crab umbra': 0.26, 'aggressive instinct': 0.11, 'blessings of nature': 0.15, 'dungeon geists': 0.12, 'aetherplasm': 0.23, 'peer through depths': 0.22, 'ancestral tribute': 0.25, 'mungha wurm': 0.26, 'fuel for the cause': 0.23, 'fire imp': 0.24, 'afflicted deserter': 0.46, 'undead gladiator': 0.25, 'jungle hollow': 0.1, 'dormant volcano': 0.4, 'memory sluice': 0.46, 'alpha authority': 1.14, 'embodiment of agonies': 0.33, 'copper myr': 0.12, 'henge of ramos': 0.2, 'firemane angel': 0.21, 'glamerdye': 3.5, 'skirk drill sergeant': 0.16, 'beacon of destiny': 0.29, 'flame lash': 0.04, 'rogue refiner': 0.11, 'stormchaser mage': 0.24, 'plumeveil': 0.11, 'blood pet': 0.31, 'ghirapur orrery': 0.95, 'season of growth': 0.51, 'hidden strings': 0.24, 'splinter': 0.3, 'seasinger': 0.14, 'detritivore': 0.66, 'high priest of penance': 0.24, 'fires of invention': 0.23, 'outrage shaman': 0.18, 'mind rot': 0.01, 'mystical teachings': 0.1, 'phytotitan': 0.24, 'cathartic reunion': 0.15, 'irencrag pyromancer': 0.34, 'goblin electromancer': 0.15, 'balduvian bears': 0.22, 'dust elemental': 0.36, 'brittle effigy': 0.23, 'wild griffin': 0.08, 'eternal thirst': 0.18, 'soramaro, first to dream': 0.37, 'primitive etchings': 0.41, 'grizzly fate': 0.24, 'ingenious thief': 0.09, 'benevolent bodyguard': 0.23, 'birchlore rangers': 0.36, 'kor duelist': 0.22, 'call to mind': 0.24, 'raze': 0.25, 'ojutai, soul of winter': 0.46, 'nightscape familiar': 1.22, 'hammer dropper': 0.01, 'tarfire': 0.26, 'lightning berserker': 0.11, 'clay pigeon': 0.27, 'hallowed moonlight': 0.23, 'cancel': 0.04, 'tocatli honor guard': 0.26, 'lost soul': 0.06, 'to the slaughter': 0.16, 'experimental frenzy': 0.22, 'confound': 0.2, 'granted': 0.13, 'restore': 0.28, 'knotvine paladin': 0.19, 'ice floe': 0.14, 'respite': 0.16, 'vulshok sorcerer': 0.25, 'delirium': 0.44, 'ravenous demon': 0.15, "lich's tomb": 0.49, 'collateral damage': 0.02, 'bishop of rebirth': 0.55, 'talisman of curiosity': 0.62, 'hand of emrakul': 0.26, 'gnarlroot trapper': 0.32, "vivien's arkbow": 0.27, 'arcbound stinger': 0.17, 'tithe drinker': 0.27, 'purging scythe': 0.28, 'elite archers': 0.26, 'rackling': 0.18, 'boros elite': 0.16, 'deathgorge scavenger': 0.45, "ihsan's shade": 0.16, 'thunderscape master': 0.29, 'accelerate': 0.65, 'temporal isolation': 0.03, 'tidal force': 0.5, 'neverending torment': 0.42, 'yavimaya enchantress': 0.19, 'reclaim': 0.14, 'arms dealer': 0.2, 'yidris, maelstrom wielder': 0.24, 'nightsky mimic': 0.15, "teferi's care": 0.22, 'fae of wishes': 0.13, 'reality spasm': 0.22, 'gruul guildmage': 0.13, 'lorescale coatl': 0.07, 'biomantic mastery': 0.29, "thalia's geistcaller": 0.12, 'tireless tribe': 0.22, 'pyromancy': 0.3, 'pyramid of the pantheon': 0.49, 'thunderbolt': 0.05, 'nivix cyclops': 0.18, 'time wipe': 0.31, 'gruul war chant': 0.12, 'gnarled scarhide': 0.19, 'village messenger': 0.53, 'fertilid': 0.05, 'citadel siege': 0.15, 'tower of fortunes': 0.31, 'vile aggregate': 0.15, 'magma mine': 0.23, 'leyline of combustion': 0.25, 'demand': 0.32, 'voidmage husher': 0.47, 'swerve': 0.3, 'rakish heir': 0.14, 'notorious assassin': 0.33, 'aurora of emrakul': 0.51, 'flash flood': 0.12, 'deadeye tracker': 0.35, 'impromptu raid': 0.52, 'walking atlas': 1.25, 'lavabrink floodgates': 0.08, 'deathbringer regent': 0.23, 'void shatter': 0.25, 'retribution of the ancients': 0.24, 'zndrsplt, eye of wisdom': 1.15, 'archdemon of greed': 0.15, 'flock of rabid sheep': 0.4, 'spinning darkness': 0.14, 'ensnare': 0.28, "teshar, ancestor's apostle": 0.52, 'balthor the stout': 0.46, 'jumbo imp': 0.1, 'flux': 0.26, 'freewind falcon': 0.11, 'ranging raptors': 0.77, "tezzeret's touch": 0.09, 'jackal pup': 0.09, 'angel of flight alabaster': 0.15, 'pain seer': 0.21, 'akroan horse': 0.31, 'landslide': 0.19, 'thalakos seer': 0.23, 'imaginary pet': 0.26, 'iname, death aspect': 0.24, 'miracle worker': 0.26, 'jund charm': 0.23, 'cloven casting': 0.28, 'vitalizing wind': 0.52, "captain's claws": 0.27, "lim-dûl's high guard": 0.08, 'linden, the steadfast queen': 0.27, 'burst lightning': 0.24, 'rancid earth': 0.25, 'reckless abandon': 0.23, 'gemstone array': 1.08, 'thought gorger': 0.25, 'lingering mirage': 0.25, 'djeru, with eyes open': 0.36, 'doomed artisan': 0.08, 'hidden stag': 0.26, 'rust': 0.44, 'kyren negotiations': 3.53, 'darksteel myr': 0.38, "sorcerer's strongbox": 0.11, 'shivan oasis': 0.23, 'caustic caterpillar': 0.49, 'osai vultures': 0.07, 'aether mutation': 0.23, 'rack and ruin': 0.12, 'phyrexian grimoire': 0.27, "volrath's gardens": 0.2, 'destiny spinner': 2.49, 'thornscape master': 0.25, 'vitality hunter': 0.09, 'sabertooth nishoba': 0.29, 'fraying omnipotence': 0.44, 'fireslinger': 0.35, 'blood celebrant': 0.41, 'shisato, whispering hunter': 0.44, 'scorching winds': 0.23, 'the warmonger': 0.26, 'rakdos augermage': 0.35, 'pay tribute to me': 0.46, 'death spark': 0.18, 'wharf infiltrator': 0.26, 'throne of empires': 0.38, 'honored hydra': 0.25, 'soulscour': 0.45, 'vampire cutthroat': 0.99, "jhoira's toolbox": 0.27, 'forgotten harvest': 0.22, 'akoum stonewaker': 0.04, 'arcbound fiend': 0.25, 'light of day': 0.3, 'threaten': 0.27, 'murderous cut': 0.21, 'peer into the abyss': 0.38, 'death mutation': 0.27, 'zhur-taa ancient': 0.26, 'crown of convergence': 0.28, 'fblthp, the lost': 0.32, 'shield of the avatar': 0.28, 'energizer': 0.23, "jester's scepter": 0.54, 'thelonite druid': 0.23, 'desperate research': 0.26, 'goblin vandal': 0.1, 'zephyr sprite': 0.18, 'mistcaller': 0.2, 'dominate': 0.24, 'eye of doom': 0.19, 'warped landscape': 0.46, "laquatus's creativity": 0.37, 'endless sands': 0.19, 'soul-guide lantern': 2.0, 'reality scramble': 0.29, 'eye of nowhere': 0.22, 'blessed wind': 0.28, 'thran golem': 0.09, 'parting thoughts': 0.16, 'bartizan bats': 0.27, 'ghostly flame': 0.33, 'lantern scout': 0.17, 'raging kavu': 0.35, 'discordant dirge': 0.29, 'spellpyre phoenix': 0.09, 'afterlife': 0.13, 'soulcatcher': 0.17, 'ancient grudge': 0.15, 'deafening silence': 0.79, 'gruesome slaughter': 0.22, 'vampiric sliver': 0.46, 'read the bones': 1.59, 'mirror march': 0.98, 'frenzied fugue': 0.52, 'renewing dawn': 0.15, 'frogtosser banneret': 0.12, 'lovestruck beast': 0.17, 'infinite obliteration': 0.13, 'rogue elephant': 0.11, 'grapeshot catapult': 0.04, 'grab the reins': 0.29, 'drowned': 0.23, 'loyal drake': 0.95, 'goldmeadow stalwart': 0.12, 'bladed pinions': 0.2, 'hurloon shaman': 0.17, 'treasure mage': 0.13, 'dread shade': 0.16, 'identity crisis': 0.36, 'hunting wilds': 0.25, 'ornate kanzashi': 0.35, 'augury owl': 0.26, 'glademuse': 0.11, 'together forever': 0.19, 'dread slag': 0.24, 'dauthi mercenary': 0.23, 'sunken hope': 0.2, 'righteous authority': 0.17, 'vow of malice': 0.33, 'talisman of resilience': 0.42, 'skeletal vampire': 0.22, 'stolen goods': 0.25, 'gem of becoming': 0.2, 'annex': 0.32, "heart's desire": 0.17, 'precinct captain': 0.28, 'ring of valkas': 0.05, 'syphon life': 0.16, 'inner fire': 0.33, 'vigor mortis': 0.24, 'madrush cyclops': 0.25, 'bituminous blast': 0.02, 'contemplation': 0.25, 'order of leitbur': 0.2, 'manglehorn': 0.34, 'bog rats': 0.08, 'kjeldoran frostbeast': 0.23, 'danitha capashen, paragon': 0.38, 'goblin fireslinger': 0.14, 'blunt the assault': 0.18, 'bearer of the heavens': 0.45, 'psychic surgery': 0.46, 'nefashu': 0.27, 'omen': 0.27, 'niblis of the urn': 0.1, "titania's chosen": 0.22, 'righteous aura': 0.36, 'harsh mentor': 0.3, "sram's expertise": 0.37, 'rumbling crescendo': 0.45, 'orzhov charm': 0.23, 'obstinate familiar': 0.7, 'wolverine pack': 0.16, 'bristling hydra': 0.18, 'desolation twin': 0.25, "regna's sanction": 0.25, 'goblins of the flarg': 0.07, 'devout witness': 0.23, 'whiteout': 0.23, 'ricochet': 0.34, 'curse of verbosity': 0.3, 'rush of knowledge': 0.22, 'consume spirit': 0.25, 'kuldotha rebirth': 0.18, 'wolfir avenger': 0.23, 'wicked wolf': 0.15, 'haunted dead': 0.14, 'rupture spire': 0.03, 'concentrate': 0.12, 'veiled crocodile': 0.25, "avacyn's pilgrim": 0.24, 'anthroplasm': 0.26, 'sutured ghoul': 0.14, 'electrostatic field': 0.97, 'emmessi tome': 0.17, 'herald of anafenza': 0.14, 'shacklegeist': 0.29, 'havengul runebinder': 0.14, 'arahbo, roar of the world': 0.23, 'stensia masquerade': 0.14, 'caravan vigil': 0.17, 'roughshod mentor': 0.1, "kiora's follower": 0.36, 'azra oddsmaker': 0.99, "kraken's eye": 0.09, 'blood reckoning': 0.24, 'toy boat': 0.37, 'prismatic lens': 0.34, 'make yourself useful': 0.58, 'surrakar spellblade': 0.18, 'guttersnipe': 0.19, 'glyph of destruction': 0.56, 'herald of the host': 0.93, 'earth surge': 0.33, 'royal falcon': 0.14, 'backup plan': 0.28, 'pack leader': 0.22, 'noxious hatchling': 0.4, 'warren weirding': 0.15, 'moss monster': 0.07, 'crib swap': 0.24, 'incendiary flow': 0.09, 'vigilant martyr': 0.23, 'songs of the damned': 0.79, 'solarion': 0.5, 'ghostly pilferer': 0.24, 'hovermyr': 0.18, 'hostility': 0.17, "inquisitor's flail": 0.43, 'golem-skin gauntlets': 0.24, 'sea scryer': 0.24, 'cast down': 0.34, 'valorous charge': 0.19, 'valor': 0.24, 'opal titan': 0.25, "alexi's cloak": 0.25, 'hymn of the wilds': 0.3, "crater's claws": 0.11, 'nimbus swimmer': 0.23, 'vanish into memory': 0.02, 'daxos of meletis': 0.24, 'capricious efreet': 0.11, 'cabal patriarch': 0.37, 'because i have willed it': 0.57, 'alpha brawl': 0.25, 'volcano hellion': 0.61, 'smash to smithereens': 0.26, 'dismal failure': 0.24, 'séance': 0.21, 'isperia the inscrutable': 0.23, 'side to side': 0.22, 'myr servitor': 0.12, 'oblivion crown': 0.22, 'calming verse': 0.29, 'wall of vapor': 0.08, 'ainok tracker': 0.01, 'voracious hatchling': 0.21, 'akuta, born of ash': 0.24, 'caustic wasps': 1.31, 'outmaneuver': 0.32, 'mystic compass': 0.34, 'skymarcher aspirant': 0.17, 'overblaze': 0.3, 'entomber exarch': 0.08, 'ogre shaman': 0.22, 'call to the netherworld': 0.25, 'entropic specter': 0.33, 'skeletal scrying': 0.22, 'nefarious lich': 3.8, 'smother': 0.16, 'carnassid': 0.22, 'niblis of frost': 0.13, 'bathe in light': 0.25, "sea's claim": 0.23, 'oxidize': 0.27, 'death denied': 0.18, 'golden wish': 0.37, 'agrus kos, wojek veteran': 0.31, 'cruel sadist': 0.14, 'vampiric embrace': 0.24, 'oath of the ancient wood': 0.18, 'allay': 0.12, 'biomass mutation': 0.1, 'neck breaker': 1.58, 'ingenious infiltrator': 0.52, 'wall of essence': 0.13, 'okina nightwatch': 0.06, 'howlpack resurgence': 2.01, 'bishop of binding': 0.23, 'dross harvester': 0.63, 'swarm intelligence': 0.23, 'auramancer': 0.1, 'magnify': 0.19, 'reweave': 0.49, 'auriok windwalker': 0.41, 'kitsune mystic': 0.41, 'fusion elemental': 0.13, 'rhox war monk': 0.09, 'hate mirage': 0.03, 'dakmor scorpion': 0.09, "suq'ata firewalker": 0.22, 'avarice amulet': 0.22, 'avarice totem': 0.33, 'bower passage': 0.24, 'bow to my command': 0.57, 'magmaquake': 0.17, 'assembly hall': 0.26, 'hanged executioner': 0.21, 'tormented hero': 0.03, "conjurer's bauble": 0.54, 'bog imp': 0.09, 'knotvine mystic': 0.57, "conqueror's pledge": 0.19, 'atris, oracle of half-truths': 0.13, 'deepwood elder': 0.25, 'madcap experiment': 0.13, 'aura flux': 0.24, 'havoc demon': 0.24, 'cinder giant': 0.29, 'flameblade adept': 0.26, 'glacial wall': 0.23, 'pore over the pages': 0.1, 'massacre girl': 0.27, 'polymorphous rush': 0.14, 'gladecover scout': 0.19, 'giant solifuge': 0.2, 'chisei, heart of oceans': 0.7, 'stormfront riders': 0.01, 'dread statuary': 0.24, 'cytoshape': 0.3, 'emancipation angel': 0.17, 'flame jet': 0.1, 'bloodcurdler': 0.3, "angrath's rampage": 0.23, 'forced retreat': 0.22, 'hellhole rats': 0.25, 'rix maadi, dungeon palace': 0.05, 'masked admirers': 0.1, 'aven squire': 0.08, 'paladin of atonement': 0.24, 'witch hunt': 0.37, 'chronomantic escape': 2.23, 'ring of evos isle': 0.2, 'riptide': 0.24, 'mardu woe-reaper': 0.22, 'awaken the sky tyrant': 0.25, 'chromeshell crab': 0.11, 'stronghold machinist': 0.2, 'breakneck rider': 1.58, 'martyr of ashes': 0.24, 'goblin ruinblaster': 0.15, "azor's elocutors": 0.25, "tomorrow, azami's familiar": 0.95, 'fleet swallower': 1.42, 'repeal': 0.12, 'ebonblade reaper': 0.37, 'the tyrant': 0.26, 'arcbound wanderer': 0.08, 'groundskeeper': 0.08, 'dogged hunter': 0.2, 'growth spasm': 0.12, 'growth spiral': 0.37, 'grudge keeper': 0.13, 'pulse of the forge': 0.39, 'raging bull': 3.62, 'rage forger': 0.98, 'lightwielder paladin': 0.2, 'lambholt pacifist': 0.25, 'thresher beast': 0.12, 'dark privilege': 0.28, 'ramunap hydra': 0.21, "gideon's resolve": 0.11, 'thornwood falls': 0.09, 'grinning ignus': 0.01, 'ramosian rally': 0.24, 'boneyard mycodrax': 0.13, 'rally the horde': 0.23, 'rappelling scouts': 0.34, "dominaria's judgment": 0.28, 'efficient construction': 0.52, 'abolish': 0.31, 'lambholt butcher': 0.25, 'deadly insect': 0.12, 'abzan ascendancy': 0.12, 'elephant resurgence': 0.32, 'ashes of the abhorrent': 0.58, 'putrid leech': 0.12, 'ashes of the fallen': 5.5, 'cliffrunner behemoth': 0.2, 'flensermite': 0.21, 'tectonic giant': 0.24, 'delight in the hunt': 0.43, 'remove': 0.21, 'tatterkite': 0.87, 'confiscate': 0.03, 'renewed faith': 0.09, 'wrench mind': 0.2, "radiant's judgment": 0.22, 'cloudfin raptor': 0.12, "yawgmoth's agenda": 0.36, 'kynaios and tiro of meletis': 0.22, 'livewire lash': 0.39, 'tendrils of corruption': 0.09, 'extravagant spirit': 0.18, 'tideshaper mystic': 0.22, 'temur war shaman': 0.17, 'yasova dragonclaw': 0.15, 'gurzigost': 0.27, 'llanowar tribe': 0.25, 'clockspinning': 0.63, 'megatherium': 0.26, 'false dawn': 0.27, 'channel the suns': 0.38, 'phyresis': 0.45, 'anathemancer': 0.27, 'mimeofacture': 0.21, 'military intelligence': 0.19, 'blizzard elemental': 0.25, 'deadwood treefolk': 0.22, 'chariot of victory': 0.4, 'cornered market': 0.38, 'unstable hulk': 0.2, 'savaen elves': 0.28, 'double cleave': 0.14, 'saheeli, the gifted': 0.22, 'unquestioned authority': 0.07, 'changeling berserker': 0.96, 'greenbelt rampager': 0.19, 'splitting slime': 0.49, 'spectral sailor': 0.12, 'whispers of the muse': 0.2, 'mindwhip sliver': 0.24, 'phyrexian infiltrator': 0.23, 'patron of the akki': 0.38, 'golgari rot farm': 0.19, 'soulblast': 0.3, 'umbra stalker': 0.27, 'ulvenwald observer': 0.25, "ghired's belligerence": 0.2, 'jungle barrier': 0.15, 'forgotten cave': 0.1, 'savage ventmaw': 0.35, 'corrosive gale': 0.11, 'stalking assassin': 0.22, 'custodi squire': 0.1, 'mistmeadow witch': 0.1, 'stave off': 0.15, 'stealer of secrets': 0.1, 'salvage titan': 0.22, 'sphinx of uthuun': 0.04, 'midnight clock': 0.29, 'unifying theory': 0.34, 'phalanx leader': 0.17, "chandra's outburst": 0.19, 'angelic shield': 0.24, 'angelic wall': 0.12, 'ethereal elk': 0.23, 'dregscape sliver': 0.24, 'far wanderings': 0.24, 'rootwater diver': 0.21, 'plated slagwurm': 0.27, 'durkwood boars': 0.24, 'curse of exhaustion': 0.37, 'holy mantle': 0.25, 'sorry': 0.25, 'jhessian infiltrator': 0.22, 'waterfront bouncer': 0.22, 'undying flames': 0.31, 'evolving wilds': 0.09, 'moonring mirror': 0.26, 'linessa, zephyr mage': 0.44, 'silence the believers': 0.17, 'desperate ravings': 0.02, 'territorial dispute': 0.26, 'unnerve': 0.21, 'spatial contortion': 0.22, 'laccolith titan': 0.22, "liliana's triumph": 0.27, 'sigil of valor': 0.13, 'spawning grounds': 0.15, 'giant trap door spider': 0.13, 'jeskai barricade': 0.37, 'council guardian': 0.14, 'spawn of thraxes': 0.26, 'arc blade': 0.03, 'mob mentality': 0.25, 'infernius spawnington iii, esq.': 0.16, 'glyph of life': 0.58, 'krosan wayfarer': 0.24, 'graveblade marauder': 0.24, 'infected vermin': 0.33, 'lead the stampede': 0.18, "leshrac's sigil": 0.58, 'grave defiler': 0.25, 'moonscarred werewolf': 0.57, 'soul reap': 0.22, "liar's pendulum": 0.27, 'lavabelly sliver': 0.25, 'there is no refuge': 0.44, 'cover of winter': 0.36, 'covenant of minds': 0.14, 'soul channeling': 0.25, 'leonin relic-warder': 0.3, 'cephalid vandal': 0.24, 'thornwind faeries': 0.21, 'void': 0.22, 'cephalid inkshrouder': 0.25, 'gnat miser': 0.34, 'leaf gilder': 0.08, 'valleymaker': 0.22, 'archdemon of paliano': 0.25, 'lieutenants of the guard': 0.08, 'lava axe': 0.01, 'nikko-onna': 2.61, 'mulch': 0.02, 'lightning strike': 0.1, 'barbed sextant': 0.11, "jaya's immolating inferno": 0.15, 'festering goblin': 0.08, 'clout of the dominus': 0.4, "sovereign's realm": 0.29, 'fire sprites': 0.21, 'arcane savant': 0.15, 'shyft': 0.21, 'shunt': 0.38, 'basal sliver': 0.73, 'indestructible aura': 0.1, 'the mighty will fall': 0.47, 'no quarter': 0.27, 'the champion': 0.21, 'deathspore thallid': 0.05, 'vampire bats': 0.12, 'last breath': 0.02, 'basilica screecher': 0.2, "kamahl's druidic vow": 0.69, 'elvish ranger': 0.09, 'treefolk seedlings': 0.25, 'awaken the ancient': 0.22, 'devour in shadow': 0.19, 'khalni heart expedition': 0.19, 'slagwurm armor': 0.21, 'axebane guardian': 0.24, 'cast out': 0.11, 'treasury thrull': 0.2, 'charm school': 0.3, 'cinder cloud': 0.11, 'crazed armodon': 0.33, 'survival cache': 0.14, 'mammoth umbra': 0.1, 'ballyrush banneret': 0.22, 'crazed firecat': 0.25, 'sporemound': 0.1, 'cinder marsh': 0.21, 'marsh viper': 0.12, 'narnam renegade': 0.26, 'skybind': 0.23, 'steelshaper apprentice': 0.68, 'sky swallower': 0.21, 'venomous dragonfly': 0.15, 'mental note': 0.28, 'invigorated rampage': 0.32, 'invincible hymn': 0.32, "nature's spiral": 0.09, "devil's play": 0.13, 'invocation of saint traft': 0.22, 'skinrender': 0.18, 'fiend hunter': 0.21, 'charmbreaker devils': 0.16, 'neheb, dreadhorde champion': 0.75, 'interdict': 0.27, 'vengeful dead': 3.22, 'meteor golem': 0.09, 'tribute to the wild': 0.1, 'necrotic plague': 0.18, 'triskaidekaphobia': 0.24, 'merfolk looter': 0.09, 'vigean graftmage': 0.17, 'ultimate price': 0.11, 'tangleroot': 0.75, 'assault suit': 0.55, 'changeling hero': 0.34, 'ancient spider': 0.29, 'angel': 0.2, 'elusive krasis': 0.12, 'carnage wurm': 0.09, 'bane of the living': 0.15, 'tomb robber': 0.17, 'sphere of the suns': 0.38, 'smokebraider': 0.18, 'tears of rage': 0.11, 'jolting merfolk': 0.11, 'vampiric feast': 0.24, 'endless swarm': 0.59, 'taste of death': 0.22, 'infinite reflection': 0.24, 'darksteel garrison': 0.65, 'tolsimir, friend to wolves': 0.34, 'kor sanctifiers': 0.11, 'silvergill adept': 0.21, 'lurebound scarecrow': 0.5, "auntie's snitch": 0.18, 'spirit en-dal': 0.31, "firemind's foresight": 0.19, 'mind warp': 0.12, 'juniper order ranger': 0.12, 'grand warlord radha': 0.67, 'spitting hydra': 0.21, 'sylvan ranger': 0.13, 'silverglade pathfinder': 0.24, 'vile redeemer': 0.19, 'niambi, faithful healer': 0.2, 'niambi, esteemed speaker': 0.21, 'touch of brilliance': 0.11, 'mindsparker': 0.18, 'epic proportions': 0.24, 'rockslide elemental': 0.2, 'wilderness elemental': 0.15, 'shadow sliver': 1.2, 'disaster radius': 0.16, 'overwhelming intellect': 0.26, 'sever the bloodline': 0.17, 'young wei recruits': 0.21, 'realmwright': 0.21, "planeswalker's fury": 0.3, 'set adrift': 0.12, 'drifting meadow': 0.1, 'vow of lightning': 0.06, 'pacifism': 0.02, 'call to the feast': 0.23, 'fry': 0.09, 'icy blast': 0.22, 'abyssal specter': 0.13, 'blight herder': 0.19, 'radiant purge': 0.14, 'pegasus stampede': 0.09, 'wei infantry': 0.21, 'demon': 0.41, 'fathom trawl': 0.19, 'eye spy': 0.06, 'personal sanctuary': 0.22, 'drowner of secrets': 0.2, 'seedguide ash': 0.75, 'ordered migration': 0.14, 'hamletback goliath': 0.15, 'acornelia, fashionable filcher': 0.39, 'seal of removal': 0.01, 'culling dais': 0.18, 'blood tyrant': 0.2, 'razorfin hunter': 0.2, 'penumbra bobcat': 0.12, 'pentavus': 0.22, 'illness in the ranks': 0.09, 'shah of naar isle': 0.3, 'deadapult': 0.2, 'righteous cause': 0.36, 'deadly recluse': 0.19, "rivals' duel": 0.09, 'hot soup': 0.38, 'recross the paths': 1.4, 'ooze flux': 0.22, "rith's charm": 0.23, 'goblin flectomancer': 0.15, "demon's horn": 0.35, 'paradise plume': 0.13, 'heap doll': 0.24, 'pale recluse': 0.1, 'faerie trickery': 0.28, 'winnow': 0.25, 'precursor golem': 0.26, 'ethereal champion': 0.29, 'watcher for tomorrow': 0.38, 'scorned villager': 0.57, 'heightened awareness': 0.14, "bonder's ornament": 0.23, 'gerrard capashen': 0.27, 'recantation': 0.25, 'bite of the black rose': 0.25, 'get a life': 0.2, 'reckless assault': 0.27, "hazoret's monument": 1.42, 'heir to the night': 0.2, 'heir of falkenrath': 0.2, 'reckless scholar': 0.09, 'dragon hunter': 0.07, 'briar patch': 0.25, 'breeding pit': 0.21, 'hordeling outburst': 0.36, 'war cadence': 0.37, 'prophetic bolt': 0.1, 'wall of mulch': 0.21, 'grizzled leotau': 0.21, 'fathom fleet captain': 0.39, 'shipbreaker kraken': 0.15, 'daraja griffin': 0.14, 'benthic explorers': 0.07, 'grip of phyresis': 0.26, 'aether shockwave': 0.62, 'boneyard wurm': 0.19, 'nullmage shepherd': 0.28, 'goblin soothsayer': 0.33, 'disdainful stroke': 0.05, 'nyx weaver': 0.21, 'curse of the pierced heart': 0.3, 'fall of the titans': 0.21, 'borborygmos': 0.3, 'boon satyr': 0.17, 'pia nalaar': 0.09, 'bend or break': 0.48, 'resilient wanderer': 0.14, 'crystalline resonance': 0.09, 'grim affliction': 0.22, 'fated return': 0.15, 'phyrexian splicer': 0.24, 'humble defector': 0.09, 'workshop elders': 0.15, 'wild cantor': 0.24, 'volley of boulders': 0.06, 'whip silk': 0.39, 'secrets of the dead': 0.12, 'wall of hope': 0.28, 'reprisal': 0.1, 'falkenrath exterminator': 0.13, 'highland weald': 0.4, 'shard convergence': 0.39, 'akoum hellkite': 0.24, 'ferropede': 0.27, 'harsh judgment': 0.26, 'dark supplicant': 0.25, 'sachi, daughter of seshiro': 0.29, 'contagious nim': 0.24, 'aminatou, the fateshifter': 0.2, 'brawl': 0.33, 'withdraw': 0.11, 'wall of tanglecord': 0.27, 'manor gargoyle': 0.22, 'riot control': 0.24, 'kill! destroy!': 1.28, 'he who hungers': 0.5, 'knight of the holy nimbus': 0.04, 'battle of wits': 0.2, 'kheru spellsnatcher': 0.08, 'drogskol cavalry': 0.21, 'sudden disappearance': 0.23, 'clackbridge troll': 0.47, 'healer of the pride': 0.31, 'predatory urge': 0.17, 'font of fertility': 0.44, 'gangrenous zombies': 0.08, 'mountain goat': 0.13, 'knight of infamy': 0.1, 'cautery sliver': 0.18, 'overeager apprentice': 0.29, 'murk dwellers': 0.19, 'seal of cleansing': 0.1, 'warden of evos isle': 0.05, 'crash of rhinos': 0.07, 'ivorytusk fortress': 0.15, 'murderous betrayal': 0.32, 'riddlemaster sphinx': 0.17, 'reverent hunter': 0.17, 'cabal shrine': 0.25, 'mycosynth wellspring': 0.1, 'vanguard of brimaz': 0.14, 'magosi, the waterveil': 0.48, 'swift justice': 0.15, 'muse vessel': 0.25, 'reverse polarity': 0.13, 'brainwash': 0.22, 'ghastly conscription': 0.23, 'bounty agent': 0.19, 'treacherous blessing': 0.14, 'defiant falcon': 0.13, 'sylvan hierophant': 0.1, 'izzet chemister': 0.1, 'divine deflection': 0.26, 'sunken field': 0.31, 'sungrace pegasus': 0.13, 'blastoderm': 0.15, 'izzet boilerworks': 0.19, 'elvish herder': 0.2, 'ivy lane denizen': 0.16, 'sea sprite': 0.17, 'iwamori of the open fist': 0.11, "admiral's order": 0.39, 'trace of abundance': 0.39, "munda's vanguard": 0.11, "dromar's attendant": 0.17, 'traumatic visions': 0.02, "marisi's twinclaws": 0.2, 'disciple of the vault': 0.84, 'foresight': 0.17, 'goblin trenches': 0.17, 'stalking stones': 0.08, 'pet project': 0.47, "hero's blade": 0.07, 'emmara tandris': 0.17, 'corrupted resolve': 0.16, "heroes' bane": 0.15, 'brute force': 0.1, 'petrified wood-kin': 0.27, 'squire': 0.15, 'sand squid': 0.3, 'corrupted crossroads': 0.2, 'champion of rhonas': 0.23, 'mercenary informer': 0.21, 'checks and balances': 0.24, 'rot wolf': 0.2, 'deceiver of form': 0.29, 'five-alarm fire': 0.14, 'helm of the ghastlord': 0.27, 'favorable destiny': 0.22, 'bag of holding': 0.14, 'steam blast': 0.15, 'permeating mass': 0.26, 'turntimber basilisk': 0.12, 'herald of the forgotten': 0.13, 'rubblehulk': 0.18, 'mistfire weaver': 0.16, 'stasis snare': 0.16, 'sphinx of lost truths': 0.29, 'sanctum gargoyle': 0.02, 'jötun owl keeper': 0.27, 'giant killer': 0.27, "angel's feather": 0.26, 'dreamstone hedron': 0.15, 'brooding saurian': 0.16, 'undercity plague': 0.17, "emrakul's hatcher": 0.21, "enchanter's bane": 0.23, 'sacred nectar': 0.09, 'mind sculpt': 0.23, 'juvenile gloomwidow': 0.27, 'mirror strike': 0.28, 'sprout swarm': 0.49, 'mirror mockery': 0.28, 'kaboom!': 0.26, 'rustic clachan': 0.18, "sage's dousing": 0.22, 'forgestoker dragon': 0.19, 'wildest dreams': 0.43, 'duplicity': 0.22, 'heaven': 0.22, 'bloodhall priest': 0.07, 'agent of erebos': 0.41, 'chop down': 0.27, 'graceful adept': 0.61, 'scepter of insight': 0.12, 'ageless entity': 0.19, 'demonic rising': 0.16, 'massive raid': 0.18, 'master of predicaments': 0.24, 'triton shorestalker': 0.24, 'aphotic wisps': 0.27, 'deny reality': 0.37, 'flailing manticore': 0.22, 'jaddi offshoot': 0.18, 'precognition field': 0.28, 'chromescale drake': 0.25, 'morningtide': 0.32, 'strongarm tactics': 0.28, 'stromkirk occultist': 0.15, 'morale': 0.07, 'burrenton forge-tender': 0.25, 'rites of initiation': 0.2, 'court hussar': 0.05, 'maul splicer': 0.12, 'monomania': 0.15, 'molten hydra': 0.46, 'molten birth': 0.18, 'hellkite hatchling': 0.23, 'ancestral statue': 0.14, 'blighted steppe': 0.13, "forebear's blade": 0.54, "planeswalker's mischief": 0.28, 'mogg salvage': 0.02, 'memory lapse': 0.24, 'brine elemental': 0.11, 'planar outburst': 0.24, 'wildfield borderpost': 0.2, 'hellion eruption': 0.18, 'hellfire mongrel': 0.11, 'stonecloaker': 0.1, 'scarwood goblins': 0.29, 'cetavolver': 0.22, 'chain of smog': 7.08, 'despise': 0.12, "ur-golem's eye": 0.38, 'court cleric': 0.15, 'giant shark': 0.35, 'unyaro bees': 0.32, 'azorius guildgate': 0.11, 'fanning the flames': 0.2, 'goblin war drums': 0.49, "trostani's summoner": 0.08, 'scaled wurm': 0.06, 'bump in the night': 0.22, 'nantuko cultivator': 0.02, 'mystic retrieval': 0.1, 'retreat to coralhelm': 1.04, 'call for unity': 0.25, 'accorder paladin': 0.17, 'argivian restoration': 0.06, 'grove of the guardian': 0.22, 'floodgate': 0.19, 'illusory angel': 0.11, 'boiling blood': 0.21, 'pyrostatic pillar': 0.48, 'oracle of bones': 0.16, "nissa's chosen": 0.23, 'sins of the past': 0.23, 'vial of poison': 0.08, "ghoulcaller's chant": 0.25, 'volt charge': 0.16, 'nettlevine blight': 0.76, 'drowner of hope': 0.18, 'decoy gambit': 0.09, 'the harvester': 0.27, 'glory-bound initiate': 0.18, 'temporal cascade': 0.27, 'cognivore': 0.26, 'xathrid gorgon': 0.2, 'guul draz specter': 0.22, 'temple altisaur': 1.53, 'blacklance paragon': 0.19, 'needlebite trap': 0.12, 'needle storm': 0.06, 'nectar faerie': 0.26, 'selesnya evangel': 0.23, 'rakavolver': 0.28, 'the mirari conjecture': 0.25, 'selective adaptation': 0.07, 'nekusar, the mindrazer': 3.76, 'bond beetle': 0.14, 'grave scrabbler': 0.01, 'ingot chewer': 0.24, "liliana's elite": 0.14, "liliana's scrounger": 0.39, 'doom cannon': 0.23, 'call the skybreaker': 0.08, 'reciprocate': 0.28, 'raging minotaur': 0.2, 'carnage altar': 0.14, 'commune with lava': 0.17, 'okk': 0.15, 'servant of the conduit': 0.12, 'daru spiritualist': 0.14, 'reap the past': 0.38, 'voyager staff': 0.6, 'cloudgoat ranger': 0.1, 'armory of iroas': 0.02, 'dry spell': 0.07, 'silent sentinel': 0.1, 'nim devourer': 0.27, 'serpent warrior': 0.03, 'youthful knight': 0.02, 'sigiled contender': 0.11, "guildmages' forum": 0.5, 'tidehollow strix': 0.2, 'nine lives': 0.39, 'living inferno': 0.27, 'reach through mists': 0.17, 'one with the machine': 0.34, 'nine-tail white fox': 0.2, "tilonalli's skinshifter": 0.13, 'gigantiform': 0.23, 'quiet speculation': 0.24, 'reality acid': 0.09, 'reckless fireweaver': 0.49, 'armistice': 0.14, "guardians' pledge": 0.11, 'tidal surge': 0.1, 'inkfathom witch': 0.97, 'shadowblood egg': 0.19, 'call the bloodline': 0.15, 'obsidian acolyte': 0.23, 'ondu cleric': 0.13, 'psychic strike': 0.23, 'torchling': 0.27, 'shrieking mogg': 0.4, 'skyhunter skirmisher': 0.21, 'lotus guardian': 0.29, 'natural emergence': 0.27, 'torgaar, famine incarnate': 0.27, 'echo tracer': 0.34, 'rescue from the underworld': 0.11, 'sedraxis specter': 0.15, 'boneknitter': 0.22, 'lunar mystic': 0.1, "faith's shield": 0.24, 'inalla, archmage ritualist': 0.2, 'fell specter': 0.33, 'sheltering light': 0.12, 'goblin lookout': 0.41, "gideon's battle cry": 0.24, 'shifting shadow': 0.36, 'rapacious one': 0.22, 'fertile ground': 0.22, 'ben-ben, akki hermit': 0.6, 'tome scour': 0.19, 'rally': 0.07, 'earth': 0.22, 'kor skyfisher': 0.22, 'cruel celebrant': 1.2, 'noggle ransacker': 0.14, 'dark withering': 0.04, 'golgari germination': 0.37, 'dismal backwater': 0.1, 'word of binding': 0.09, 'necropolis fiend': 0.09, "zndrsplt's judgment": 0.45, 'ravaging riftwurm': 0.26, 'skyshroud elf': 0.2, 'falkenrath noble': 0.24, 'raven familiar': 0.21, 'aspect of mongoose': 1.11, 'wrap in vigor': 1.86, 'zuran spellcaster': 0.14, "shinen of life's roar": 0.21, 'lyev skyknight': 0.09, 'leatherback baloth': 0.25, 'aspect of hydra': 0.19, 'aquamoeba': 0.2, 'resurgence': 0.18, 'necrogenesis': 0.26, 'world queller': 0.29, 'noxious field': 0.24, 'folio of fancies': 0.73, 'nomads en-kor': 0.2, 'loyal unicorn': 0.32, 'archetype of imagination': 1.51, 'zoetic cavern': 0.23, 'halimar excavator': 0.1, 'woolly thoctar': 0.09, 'belltower sphinx': 0.09, 'boros swiftblade': 0.15, 'response': 0.18, 'knollspine invocation': 0.19, 'the birth of meletis': 0.11, 'larceny': 0.34, 'blood-chin fanatic': 0.19, 'grave bramble': 0.08, 'tukatongue thallid': 0.13, 'kavu predator': 0.13, 'flame fusillade': 0.28, 'ember hauler': 0.02, 'phyrexian etchings': 0.43, 'eater of hope': 0.14, "memory's journey": 0.2, 'gruul ragebeast': 0.22, 'fireshrieker': 0.26, 'thornscape battlemage': 0.04, 'thaumatog': 0.21, 'thalakos drifters': 0.19, 'starlight': 0.2, 'the unspeakable': 0.18, 'twisted image': 0.22, 'aether hub': 0.14, 'fungal reaches': 0.13, 'firewild borderpost': 0.21, 'dragon throne of tarkir': 0.34, "thieves' fortune": 0.26, 'meteor storm': 0.25, 'twinning glass': 0.28, 'latulla, keldon overseer': 0.3, 'firewake sliver': 0.21, 'threat': 0.15, 'rune of protection: red': 0.24, 'farsight mask': 0.42, 'zhalfirin void': 0.14, "lich's mastery": 0.33, 'eidolon of inspiration': 0.1, "hero's resolve": 0.05, "zephid's embrace": 0.24, "kamahl's summons": 0.24, 'rummaging wizard': 0.29, 'ruins of oran-rief': 0.24, 'sporoloth ancient': 0.03, 'rubblebelt raiders': 0.25, 'forerunner of the empire': 0.59, 'charging war boar': 0.17, 'blood rites': 0.1, 'the flame of keld': 0.12, 'spitting drake': 0.14, "domri's nodorog": 0.17, 'chasm guide': 0.08, 'broodbirth viper': 1.17, 'the destined': 0.23, 'wildborn preserver': 0.19, 'rust elemental': 0.31, "ral's dispersal": 0.13, 'border guard': 0.11, 'thrash': 0.15, 'eye of yawgmoth': 0.21, 'deglamer': 0.56, 'balancing act': 0.49, 'genju of the fields': 0.24, 'lightning-rig crew': 0.07, 'taunting elf': 0.2, 'havengul vampire': 0.11, "fool's demise": 0.26, 'dauthi cutthroat': 0.19, 'elite cat warrior': 0.13, 'treasure hunt': 0.22, 'kiss of death': 0.25, 'blossoming sands': 0.13, 'drake umbra': 0.18, 'riddleform': 0.06, 'kite shield': 0.18, 'rhystic circle': 0.1, 'priest of urabrask': 0.24, "loreseeker's stone": 0.14, 'haazda shield mate': 0.27, "faith's fetters": 0.02, 'hagra diabolist': 0.15, 'withering wisps': 0.19, 'deep reconnaissance': 0.19, 'consumptive goo': 0.33, 'treacherous urge': 0.3, 'lord windgrace': 0.19, 'sunstone': 0.55, 'lore seeker': 0.24, 'decaying soil': 0.34, 'transmogrify': 0.2, 'assault': 0.25, 'elsewhere flask': 0.25, 'word of seizing': 0.12, 'circling vultures': 0.18, 'flavor judge': 0.22, 'psychic theft': 0.31, 'madblind mountain': 0.39, 'kodama of the center tree': 0.38, "tourach's chant": 0.25, "harm's way": 0.15, 'clarion ultimatum': 0.27, 'delirium skeins': 0.17, 'mace of the valiant': 0.42, 'font of agonies': 0.47, 'boar umbra': 0.24, 'macabre waltz': 0.04, 'proteus machine': 0.3, 'exoskeletal armor': 0.17, 'tranquil cove': 0.09, 'pristine skywise': 0.07, 'taranika, akroan veteran': 0.11, 'loxodon punisher': 0.31, 'tangle angler': 0.22, 'reviving melody': 0.1, 'toolcraft exemplar': 0.2, 'magnetic mine': 0.16, 'magmaw': 0.07, 'sunken city': 0.02, 'protective sphere': 0.15, 'deep water': 0.24, 'keepers of the faith': 0.05, 'hedron-field purists': 0.22, 'faerie harbinger': 0.82, 'giantbaiting': 0.05, 'graceful cat': 0.1, 'quicksilver wall': 0.19, 'animate library': 0.43, 'tilling treefolk': 0.27, 'dizzy spell': 0.39, 'compulsion': 0.26, 'dauthi warlord': 0.19, 'composite golem': 0.37, 'gruul war plow': 0.5, 'plated sliver': 0.38, 'plated spider': 0.12, 'root elemental': 0.3, 'hellion crucible': 0.15, 'reborn hope': 0.24, 'compelling deterrence': 0.12, 'cloudform': 0.13, "yawgmoth's vile offering": 0.39, 'thunderstaff': 0.24, 'troll-horn cameo': 0.23, 'yavimaya granger': 0.25, 'martyr of sands': 0.15, 'gigapede': 0.19, 'fleshwrither': 1.44, 'as luck would have it': 0.45, 'predatory focus': 0.31, 'elephant guide': 0.22, 'time to feed': 0.01, 'temple elder': 0.24, 'killer instinct': 0.24, 'distended mindbender': 0.21, 'arashin sovereign': 0.19, 'elvish pioneer': 0.28, 'telling time': 0.24, 'python': 0.07, 'subira, tulzidi caravanner': 0.23, 'wing splicer': 0.18, 'extortion': 0.31, 'winged coatl': 0.34, 'martial law': 0.16, 'elvish visionary': 0.06, "yanling's harbinger": 0.21, 'quest for the gravelord': 0.1, 'stronghold biologist': 0.19, 'marsh flitter': 0.07, 'krosan tusker': 0.05, 'artisan of forms': 0.18, 'subdue': 0.83, 'wall of vipers': 0.16, 'pegasus refuge': 0.29, "vraska's stoneglare": 0.18, 'satyr wayfinder': 0.1, 'evasive action': 0.16, "vraska's scorn": 0.16, 'mnemonic wall': 0.19, 'ghost ship': 0.05, "orim's thunder": 0.19, 'village bell-ringer': 0.23, 'savage twister': 0.15, "garruk's uprising": 1.36, 'blazethorn scarecrow': 0.24, "dovin's dismissal": 0.21, 'scroll of the masters': 0.19, 'verdant touch': 0.19, "serra's embrace": 0.25, 'sky hussar': 0.23, 'nightshade assassin': 0.03, 'forgotten lore': 0.19, 'servo exhibition': 0.1, 'become immense': 0.2, 'enlistment officer': 0.25, 'spellheart chimera': 0.12, 'agitator ant': 0.12, 'festival': 0.54, 'venom': 0.1, 'mist leopard': 0.12, 'scuttling doom engine': 0.19, 'camaraderie': 0.5, 'hunter sliver': 0.45, 'fell flagship': 0.28, "jhoira's timebug": 0.02, 'vow of flight': 0.02, 'vow of wildness': 0.02, "sarkhan's triumph": 1.69, 'mistform ultimus': 0.25, 'butcher of the horde': 0.16, 'infest': 0.07, 'double negative': 0.23, 'gluttonous troll': 0.18, "ghoulcaller's bell": 0.18, "seer's sundial": 0.12, 'sinister sabotage': 0.12, 'urborg volcano': 0.46, 'nettle drone': 0.08, 'anaconda': 0.01, 'scornful egotist': 0.09, 'jade mage': 0.23, 'interpret the signs': 0.02, 'nest invader': 0.25, 'water wurm': 0.22, 'bearer of silence': 0.18, 'burnt offering': 0.37, 'scorching spear': 0.11, 'fountain of cho': 0.31, 'goblin berserker': 0.15, 'burst of speed': 0.1, 'simic guildgate': 0.09, 'scrabbling claws': 0.1, 'black cat': 0.16, 'order of the stars': 0.22, 'palisade giant': 0.15, 'naya soulbeast': 0.19, 'save life': 0.46, 'seraph of dawn': 0.08, 'nezumi shadow-watcher': 0.23, 'dryad sophisticate': 0.21, 'sapphire leech': 0.25, 'downhill charge': 0.25, 'ovinize': 0.23, 'whipgrass entangler': 0.14, 'crowd of cinders': 0.11, 'double vision': 0.81, 'indentured djinn': 0.31, 'shu elite infantry': 5.62, 'undertaker': 0.19, 'blitz hellion': 0.19, 'shriveling rot': 0.47, 'seal away': 0.12, 'oathsworn vampire': 0.26, 'vedalken heretic': 0.19, 'shared trauma': 0.33, "garruk's packleader": 0.23, 'hungry mist': 0.03, 'sakura-tribe springcaller': 0.1, "mire's toll": 0.13, 'celestial crusader': 0.08, 'end hostilities': 0.34, 'encroaching wastes': 0.03, 'overlaid terrain': 0.43, 'voidstone gargoyle': 0.21, 'shivan sand-mage': 0.05, 'belfry spirit': 0.05, 'shivan phoenix': 0.35, 'fate transfer': 0.21, 'hum of the radix': 0.44, 'mindwrack harpy': 0.24, 'impetuous devils': 0.15, 'brothers yamazaki': 0.23, 'fated intervention': 0.09, 'noggle hedge-mage': 0.24, 'firedrinker satyr': 0.17, 'golgari guildgate': 0.13, "belbe's armor": 0.24, "huatli's spurring": 0.14, 'minotaur explorer': 0.17, 'battery': 0.25, 'undercity informer': 0.32, 'shifting sky': 0.24, 'nivix, aerie of the firemind': 0.18, 'death cultist': 0.13, 'nacatl hunt-pride': 0.13, 'snow devil': 0.07, 'volition reins': 0.12, 'vitality charm': 0.12, "nissa's triumph": 0.09, "nissa's revelation": 0.24, 'obelisk spider': 0.29, 'curse of inertia': 0.26, "alseid of life's bounty": 0.22, 'nantuko elder': 0.36, 'slice and dice': 0.01, 'mugging': 0.04, "dawn's reflection": 0.49, 'skyscribing': 0.27, 'venerable monk': 0.07, 'pygmy giant': 0.25, 'myr propagator': 0.35, 'profane prayers': 0.11, 'doomfall': 0.1, 'foundry street denizen': 0.23, 'dinrova horror': 0.1, "ashiok's erasure": 0.13, 'necromentia': 0.38, 'skyshaper': 0.18, "brago's representative": 0.14, 'goblin grenadiers': 0.15, 'sword-point diplomacy': 0.16, 'gravebreaker lamia': 0.36, 'goblin raider': 0.19, "hydra's growth": 0.83, 'craven giant': 0.04, 'bottle gnomes': 0.1, 'seething anger': 0.18, 'lore broker': 0.26, 'vengeful firebrand': 0.25, 'into the roil': 0.09, 'orochi leafcaller': 0.24, 'fold into aether': 0.12, 'vengeful rebirth': 0.1, 'psychic puppetry': 0.29, 'hundred-handed one': 0.25, 'blur sliver': 0.23, 'aphemia, the cacophony': 0.1, 'psychogenic probe': 0.28, 'cathodion': 0.05, 'tomb of the spirit dragon': 0.48, 'devout lightcaster': 0.22, 'secret base': 0.19, 'catch': 0.15, 'psychotic episode': 0.02, 'skull fracture': 0.15, 'tomoya the revealer': 0.73, 'hunted lammasu': 0.09, 'puresight merrow': 0.3, 'necratog': 0.24, 'magma phoenix': 0.17, 'lumbering satyr': 0.24, 'deluge': 0.17, 'clear': 0.25, "daxos's torment": 0.25, 'vebulid': 0.41, 'tattered mummy': 0.17, 'oreskos explorer': 0.07, 'punish ignorance': 0.23, 'mystic genesis': 0.11, 'outbreak': 0.14, 'tower of eons': 0.27, 'claws of wirewood': 0.18, 'ark of blight': 0.11, "lat-nam's legacy": 0.12, 'vitaspore thallid': 0.22, 'befuddle': 0.03, 'argent sphinx': 0.2, 'raised by wolves': 0.33, 'eye to eye': 0.4, 'arcbound worker': 0.35, 'niveous wisps': 0.34, 'theater of horrors': 0.19, 'greater mossdog': 0.18, 'grave sifter': 0.34, 'ob nixilis reignited emblem': 0.18, 'nivix guildmage': 0.15, 'fresh meat': 0.17, 'druid lyrist': 0.17, 'grotesque hybrid': 0.18, 'shadow alley denizen': 0.36, 'shadows of the past': 0.41, 'the akroan war': 0.19, 'reality ripple': 0.21, 'armillary sphere': 0.07, 'illusion of choice': 0.19, 'razormane masticore': 0.14, 'fade from memory': 0.11, 'viseling': 0.21, 'the eldest reborn': 0.34, 'feral thallid': 0.18, 'dimir guildgate': 0.17, 'voltaic brawler': 0.09, 'coffin purge': 0.16, 'ebony charm': 0.11, 'release the gremlins': 0.2, 'sheltering word': 0.14, 'volcanic geyser': 0.02, 'zombie mob': 0.15, 'shield mate': 0.11, 'bonesplitter sliver': 0.11, 'leonin sun standard': 0.3, 'erithizon': 0.28, 'leonin skyhunter': 0.32, 'akroan conscriptor': 0.15, "ezuri's brigade": 0.18, 'beloved chaplain': 0.24, 'cantivore': 0.29, 'voice of law': 0.22, 'leave': 0.27, 'thran foundry': 0.25, 'collision': 0.18, 'colossus hammer': 1.34, 'shu yun, the silent tempest': 0.24, 'liberating combustion': 0.12, 'shattergang brothers': 1.88, 'shell of the last kappa': 0.46, 'shrouded serpent': 0.24, 'rakshasa deathdealer': 0.11, "vivien's invocation": 0.12, 'lexivore': 0.24, 'grixis charm': 0.16, 'levitation': 0.15, 'colossus': 0.18, 'disfigure': 0.06, 'shrine of boundless growth': 0.1, "shade's form": 0.25, 'odylic wraith': 0.14, 'binding grasp': 0.11, 'refreshing rain': 0.13, 'golem foundry': 0.35, 'quest for ancient secrets': 0.11, 'desert of the mindful': 0.06, 'electropotence': 0.18, 'opal avenger': 0.25, 'onyx mage': 0.12, 'faerie invaders': 0.13, 'new perspectives': 0.08, 'yavimaya ants': 0.15, 'gamekeeper': 0.1, 'quag vampires': 0.15, 'dual nature': 1.1, 'golgari brownscale': 0.1, 'release': 0.15, "ajani's aid": 0.11, 'longbow archer': 0.17, 'eon frolicker': 0.13, 'orchard warden': 0.24, 'lonely sandbar': 0.1, 'hymn of rebirth': 0.18, 'femeref archers': 0.12, 'selesnya guildgate': 0.11, 'arbiter of knollridge': 0.23, 'crimson acolyte': 0.23, 'siren of the silent song': 0.25, 'sinuous predator': 0.25, 'pyromantic pilgrim': 0.11, 'cartouche of solidarity': 0.16, 'inspired sprite': 0.2, 'kuldotha phoenix': 0.25, 'tideforce elemental': 0.26, 'abzan battle priest': 0.32, 'reborn hero': 0.23, 'lambholt elder': 0.32, 'flinthoof boar': 0.07, 'thunderherd migration': 0.25, 'gates ablaze': 0.16, 'nihilith': 0.33, 'thunderclap wyvern': 0.18, 'land leeches': 0.08, 'lightning rift': 0.01, "tezzeret's strider": 0.23, "seton's scout": 0.17, "crosis's attendant": 0.18, "oketra's last mercy": 0.21, 'boros fury-shield': 0.13, "silumgar's scorn": 0.15, 'silverpelt werewolf': 0.32, 'inner-chamber guard': 0.59, 'eldrazi spawn': 0.18, 'quirion trailblazer': 0.15, 'extremely slow zombie': 0.23, 'labyrinth champion': 0.13, 'icefall': 0.18, 'labyrinth of skophos': 0.97, 'silver erne': 0.15, 'guardian of the gateless': 0.22, 'pristine talisman': 0.26, 'jar of eyeballs': 0.21, 'molten nursery': 0.11, 'dwarven lieutenant': 0.19, 'troublesome spirit': 0.23, 'momentary blink': 0.11, 'furnace dragon': 0.43, 'conviction': 0.06, 'burn from within': 0.23, 'plummet': 0.01, 'elvish scout': 0.16, 'rod of spanking': 0.76, 'master trinketeer': 0.19, 'animal boneyard': 0.25, 'animal magnetism': 0.25, 'pollenbright wings': 0.24, "soul's might": 0.02, 'plated geopede': 0.19, 'steel wall': 0.14, "rowan's stalwarts": 0.11, 'steppe lynx': 0.08, 'stet, draconic proofreader': 0.17, 'aether charge': 0.16, 'counterlash': 0.21, 'mercadian bazaar': 0.38, 'embereth skyblazer': 0.15, "chemister's insight": 0.05, 'aftershock': 0.18, 'coveted peacock': 0.12, "ayula's influence": 0.37, 'ana sanctuary': 0.17, 'dark triumph': 0.15, "jace's ruse": 0.14, 'kessig prowler': 0.25, 'forsaken sanctuary': 0.13, 'morbid curiosity': 0.11, 'exclusion mage': 0.14, 'elvish scrapper': 0.25, 'cunning evasion': 0.21, 'butcher ghoul': 0.25, 'sudden death': 0.05, 'paragon of eternal wilds': 0.17, 'martyr of frost': 0.22, 'burning vengeance': 0.02, 'paragon of fierce defiance': 0.11, 'scattershot': 0.13, 'anavolver': 0.25, 'patagia viper': 0.13, 'scion of the wild': 0.13, 'aerial responder': 0.13, 'parasitic bond': 0.13, 'masked gorgon': 0.28, 'streambed aquitects': 0.12, 'strength from the fallen': 0.09, 'bloodhusk ritualist': 0.3, 'moonlight hunt': 1.11, 'agent of masks': 0.23, 'paragon of open graves': 0.18, 'channeler initiate': 0.23, 'white shield crusader': 0.2, 'phyrexian totem': 0.2, 'phyrexian war beast': 0.12, 'blinkmoth well': 0.2, 'mind bend': 0.4, 'ancient runes': 0.32, 'spread the sickness': 0.24, 'mirror image': 0.5, 'sprite noble': 0.53, 'historian of zhalfir': 0.08, 'safewright quest': 0.36, 'broodhatch nantuko': 0.35, 'jushi apprentice': 0.73, 'blood bairn': 0.16, 'deeproot champion': 0.23, 'angel of salvation': 0.14, 'phyrexian ghoul': 0.12, 'encroach': 0.15, 'baloth woodcrasher': 0.14, 'mindblaze': 0.21, 'spirit of malevolence': 0.11, 'phyrexian juggernaut': 0.18, 'broodwarden': 0.15, 'defender of the order': 0.18, "mishra's self-replicator": 0.22, 'fumble': 0.26, 'piper of the swarm': 0.11, 'gorilla chieftain': 0.06, 'pestilence rats': 0.17, 'broken ambitions': 0.15, "karametra's acolyte": 0.4, 'hermetic study': 0.23, 'starlit sanctum': 0.49, 'pit scorpion': 0.05, 'rugged highlands': 0.09, 'charnelhoard wurm': 0.12, 'steady progress': 0.24, 'hold the line': 0.25, 'emissary of grudges': 0.17, 'chance': 0.27, 'sprouting thrinax': 0.1, "kalemne's captain": 0.12, 'death watch': 0.17, 'corrupt official': 0.26, 'evolution charm': 0.06, 'rune of protection: white': 0.23, "tyrant's choice": 0.18, 'banish into fable': 0.13, 'pillory of the sleepless': 0.15, 'fungal shambler': 0.26, 'banishing knack': 0.28, 'jokulmorder': 0.29, 'two-headed sliver': 0.23, 'aether tunnel': 0.25, 'spellweaver helix': 2.66, 'pollen lullaby': 0.19, 'scuttlemutt': 0.19, 'primal bellow': 0.24, 'seafloor oracle': 0.67, 'adherent of hope': 0.07, 'destructor dragon': 0.23, 'flare': 0.06, 'somberwald alpha': 0.26, 'dive down': 0.19, 'overwhelming denial': 0.18, 'bludgeon brawl': 0.23, 'withering gaze': 0.12, 'mundungu': 0.22, 'sunstrike legionnaire': 0.3, 'final parting': 1.19, 'sea gate oracle': 0.11, 'traproot kami': 0.23, 'haze of pollen': 0.12, 'priest of the blood rite': 0.16, 'howl of the horde': 0.25, 'kiora, behemoth beckoner': 0.46, 'ethercaste knight': 0.13, 'muck rats': 0.23, 'foot soldiers': 0.07, 'scuttling sliver': 0.21, 'wizened cenn': 0.19, 'centaur chieftain': 0.09, 'fallow wurm': 0.13, 'glacial plating': 0.2, 'predatory wurm': 0.16, 'exiled doomsayer': 0.21, 'distant memories': 0.18, 'diversionary tactics': 0.32, 'crystallization': 0.18, 'the first iroan games': 0.22, 'dismantling blow': 0.04, 'raging swordtooth': 0.24, 'diregraf ghoul': 0.1, 'goliath sphinx': 0.21, 'ruinous path': 0.16, 'gatecreeper vine': 0.22, "shaman's trance": 0.3, 'shambling shell': 0.16, 'flowstone wyvern': 0.17, 'metamorphic alteration': 0.21, 'overgrown estate': 0.32, 'sacred cat': 0.25, 'phyrexian ingester': 0.27, 'bone splinters': 0.07, 'slice in twain': 0.02, 'brain in a jar': 0.2, 'munitions expert': 0.17, 'synod artificer': 0.22, 'erosion': 0.07, 'seasoned marshal': 0.06, 'shambling swarm': 0.47, 'cauldron dance': 0.28, 'ranger en-vec': 0.13, 'coffin puppets': 0.22, 'sigil blessing': 0.14, 'retreat to kazandu': 0.07, 'caller of the pack': 0.28, 'banshee of the dread choir': 0.38, 'novijen sages': 0.13, 'retreat to emeria': 0.1, 'merfolk wayfinder': 0.1, 'prodigal pyromancer': 0.05, 'ragemonger': 0.17, 'claim': 0.24, 'nightveil sprite': 0.14, 'gluttonous slime': 0.21, "gideon's phalanx": 0.11, 'retreat to hagra': 0.4, 'norwood warrior': 0.22, 'endling': 0.23, 'emergence zone': 0.64, 'thallid': 0.28, 'goblin locksmith': 0.01, 'bloated toad': 0.23, 'spellbane centaur': 0.34, 'munda, ambush leader': 0.13, 'sanguimancy': 0.11, 'brink of madness': 0.37, 'baleful stare': 0.12, 'shape anew': 0.16, 'revered unicorn': 0.23, 'fascination': 0.24, 'erratic explosion': 0.08, 'rushblade commander': 0.23, 'blood cultist': 0.23, "avacyn's judgment": 0.15, 'sway of illusion': 0.21, 'aura gnarlid': 0.1, 'rakdos ickspitter': 0.15, 'caustic crawler': 0.12, 'firewing phoenix': 0.11, 'bane of hanweir': 0.24, 'shelkin brownie': 0.87, 'rune of protection: artifacts': 0.23, 'slitherhead': 0.12, 'gatebreaker ram': 0.12, 'spitting spider': 0.1, 'cabal executioner': 0.2, 'rushwood legate': 0.14, 'sliptide serpent': 0.25, 'phyrexian vault': 0.19, 'colossal majesty': 0.34, 'brambleweft behemoth': 0.22, 'shell skulkin': 0.17, 'rushwood grove': 0.31, 'snag': 0.23, 'seal of strength': 0.1, 'glass of the guildpact': 0.17, 'sling-gang lieutenant': 0.27, 'mischievous poltergeist': 0.24, 'captain of the mists': 0.09, 'sphinx of jwar isle': 0.12, 'banewhip punisher': 0.19, 'prophet of distortion': 0.14, 'supreme will': 0.06, "nissa's expedition": 0.09, "nissa's encouragement": 0.1, 'banisher priest': 0.07, 'mwonvuli beast tracker': 0.24, 'charge across the araba': 0.25, 'shape stealer': 0.27, 'raise the alarm': 0.01, 'spike breeder': 0.17, 'djinn of wishes': 0.1, 'murasa pyromancer': 0.13, 'blinding powder': 0.26, 'murder': 0.1, 'blustersquall': 0.22, 'mage-ring network': 0.12, 'blaring recruiter': 0.13, 'sylvok lifestaff': 0.14, 'militia bugler': 0.11, 'goldmeadow harrier': 0.27, 'citanul woodreaders': 0.07, "serra's hymn": 0.22, 'entrancing melody': 0.32, 'protomatter powder': 0.11, 'bred for the hunt': 0.41, 'parallectric feedback': 0.23, 'mask of the mimic': 0.45, 'soul seizer': 0.1, 'rime transfusion': 3.75, 'strength of lunacy': 0.86, 'sulfur vent': 0.22, 'mothdust changeling': 0.68, 'release to the wind': 0.46, 'sejiri merfolk': 0.09, 'skarrgan pit-skulk': 0.2, 'moonring island': 0.3, 'bosk banneret': 0.24, 'cloak of feathers': 0.71, 'mass appeal': 0.17, "soul's fire": 0.04, 'regal unicorn': 0.12, 'netherborn phalanx': 0.33, 'choking fumes': 0.07, 'scatter to the winds': 0.14, 'repudiate': 1.08, 'lobber crew': 0.11, 'reign of the pit': 0.17, 'roc egg': 0.02, 'devouring light': 0.11, "oracle's vault": 0.41, 'fanatic of mogis': 0.25, 'find': 0.16, 'rimewind cryomancer': 0.29, 'bloodthirsty aerialist': 0.26, 'glint-sleeve artisan': 0.03, 'skirk ridge exhumer': 0.24, 'sosuke, son of seshiro': 0.26, 'ethereal haze': 0.29, 'fiend of the shadows': 0.12, 'scourge wolf': 0.21, 'pulse of the tangle': 0.27, 'devout decree': 0.03, 'pure reflection': 0.29, 'pure intentions': 0.44, 'puppeteer': 0.31, 'away': 0.2, 'submerged boneyard': 0.12, 'renegade firebrand': 0.1, 'gathan raiders': 0.01, 'mortuary mire': 0.11, 'soul manipulation': 0.14, 'flesh reaver': 0.22, 'replicate': 1.08, 'tandem lookout': 0.21, "ashling's prerogative": 0.63, 'fame': 0.24, 'pulse of llanowar': 0.21, "dead man's chest": 0.13, 'castle sengir': 0.23, 'prahv, spires of order': 0.23, 'riptide chimera': 0.13, 'repulse': 0.07, 'finality': 0.16, 'clutch of the undercity': 0.33, 'leech bonder': 0.29, 'savage punch': 0.07, 'planewide celebration': 0.63, 'silverglade elemental': 0.27, 'blood-chin rager': 0.24, 'memorial to folly': 0.1, 'clash of realities': 0.3, 'meletis charlatan': 0.12, 'lithatog': 0.16, 'blighted shaman': 0.14, 'mold shambler': 0.15, 'bloodbond vampire': 0.11, 'lithophage': 0.09, 'tephraderm': 0.21, 'bitterheart witch': 0.3, 'peacewalker colossus': 0.26, 'blighted fen': 0.11, 'stone quarry': 0.03, 'snapping sailback': 0.25, "gisa's bidding": 0.22, 'spectral shift': 0.35, 'serra paladin': 0.15, 'priest of the wakening sun': 0.28, 'steward of valeron': 0.29, 'moan of the unhallowed': 0.12, 'stinging licid': 0.1, "cenn's tactician": 0.2, 'nantuko vigilante': 0.03, 'pelakka wurm': 0.14, 'mudbutton torchrunner': 0.05, 'fire snake': 0.25, 'barter in blood': 0.1, 'fearsome awakening': 0.24, 'fiery bombardment': 0.18, 'monk idealist': 0.19, 'gild': 0.17, 'psychic trance': 0.26, 'ceta sanctuary': 0.2, 'brighthearth banneret': 0.42, 'sin collector': 0.1, 'soulblade corrupter': 0.09, 'extract from darkness': 0.14, 'redcap melee': 0.01, 'lumberknot': 0.15, 'manifold key': 0.5, 'opportunity': 0.07, 'ophidian': 0.13, 'elusive tormentor': 0.2, 'goring ceratops': 0.46, 'blighted bat': 0.08, 'peace of mind': 0.05, 'soulsworn jury': 0.13, 'soulquake': 0.23, 'centaur garden': 0.23, 'far': 0.2, 'plaxmanta': 0.15, 'chill of foreboding': 0.08, 'scrying glass': 0.28, 'new benalia': 0.15, 'ronin warclub': 0.32, 'call of the conclave': 0.11, 'elven cache': 0.13, 'unwilling recruit': 0.18, 'timber gorge': 0.09, 'ghostblade eidolon': 0.13, 'izzet keyrune': 0.18, 'tormented soul': 0.48, "hapatra's mark": 0.11, 'hanweir watchkeep': 0.24, 'traveling plague': 0.26, 'crackling drake': 0.04, 'vow of duty': 0.03, 'curse of the bloody tome': 0.18, 'curse of shallow graves': 3.33, 'adanto vanguard': 0.19, 'hideous end': 0.09, 'kiri-onna': 0.24, 'knights of the black rose': 0.59, 'adarkar sentinel': 0.17, 'thud': 0.23, 'akki underminer': 0.19, 'arcane teachings': 0.17, 'voracious wurm': 0.1, 'lashknife barrier': 0.25, 'crash': 0.13, 'words of wisdom': 0.25, 'anaba shaman': 0.06, 'hammerfist giant': 0.22, 'treasure trove': 0.13, 'krosan vorine': 0.17, 'unliving psychopath': 0.22, 'hixus, prison warden': 0.16, 'accursed witch': 0.41, 'guul draz vampire': 0.31, 'jhessian thief': 0.1, 'unsubstantiate': 0.14, 'whirlwind denial': 0.03, 'idol of endurance': 0.16, 'kindle the carnage': 0.25, 'drakestown forgotten': 0.17, 'acorn harvest': 1.01, 'urban evolution': 0.1, 'frilled mystic': 0.1, 'hive stirrings': 0.23, 'hissing iguanar': 0.14, 'vulshok battlemaster': 0.33, 'vulshok morningstar': 0.15, 'hidden spider': 0.21, "ladies' knight": 0.23, 'ghirapur aether grid': 0.48, 'inside out': 0.25, 'insidious mist': 0.2, 'custodi soulcaller': 0.14, 'veteran warleader': 0.12, 'consulate crackdown': 0.16, 'integrity': 0.04, 'vizier of the scorpion': 0.31, 'wildfire cerberus': 0.08, 'knight errant': 0.07, 'hellion': 0.17, 'hellhole flailer': 0.09, 'aether adept': 0.19, 'aesthir glider': 0.01, 'town sentry': 0.11, 'willbender': 0.02, 'infectious curse': 0.41, 'vitu-ghazi, the city-tree': 0.06, 'heidar, rimewind master': 0.51, 'complex automaton': 0.25, 'information dealer': 0.12, 'intervene': 0.23, 'intervention': 0.04, 'veteran armorsmith': 0.09, 'haunted plate mail': 0.12, 'heroic reinforcements': 0.1, 'wojek embermage': 0.16, 'frenzied goblin': 0.17, 'volatile rig': 0.16, 'veinfire borderpost': 0.2, 'haunted cloak': 0.01, 'imperial mask': 0.43, 'foul orchard': 0.1, 'earl of squirrel': 2.46, 'immolating souleater': 0.13, 'cruel revival': 0.12, 'irencrag feat': 0.5, 'kyren archive': 0.25, 'daghatar the adamant': 0.16, 'cremate': 0.08, 'wintermoon mesa': 0.28, 'wirewood savage': 0.22, 'touchstone': 0.12, 'ghastly haunting': 0.1, 'hero of leina tower': 0.1, 'grave-shell scarab': 0.34, 'cosmic larva': 0.23, 'korozda guildmage': 0.2, 'angelic renewal': 0.17, 'wavebreak hippocamp': 0.22, 'thran weaponry': 0.24, 'corpse knight': 0.63, 'confirm suspicions': 0.3, 'key to the city': 0.2, 'aethersquall ancient': 0.13, 'aid from the cowl': 0.26, 'kabira crossroads': 0.41, 'ghor-clan rampager': 0.08, 'abjure': 0.72, 'wall of deceit': 0.32, 'hyalopterous lemure': 0.17, 'zombie fanboy': 0.17, 'thrashing brontodon': 0.04, 'kalastria healer': 0.06, 'thousand winds': 0.06, "kozilek's predator": 0.06, 'twisted abomination': 0.02, 'twinblade slasher': 0.23, 'tribute to hunger': 0.13, 'dragon shadow': 0.23, 'crystal spray': 0.27, "dragonlord's prerogative": 0.21, 'tymaret calls the dead': 0.21, 'keral keep disciples': 0.18, 'hoof skulkin': 0.15, "tyrant's scorn": 0.18, 'hungry hungry heifer': 0.25, 'wall of lost thoughts': 0.26, 'gruul guildgate': 0.1, 'triplicate spirits': 0.1, 'karplusan hound': 0.17, 'concordia pegasus': 0.01, 'cryptic serpent': 0.09, "ulamog's despoiler": 0.16, 'killer whale': 0.11, 'trophy mage': 0.47, "warmonger's chariot": 0.08, 'forced adaptation': 0.22, 'draconic disciple': 0.14, 'abandoned sarcophagus': 0.07, 'archaeomancer': 0.26, 'culling scales': 0.3, 'ancient hydra': 0.16, 'drinker of sorrow': 0.23, 'krosan reclamation': 0.26, 'gang of elk': 0.16, 'lavaball trap': 0.2, 'ankle shanker': 0.23, 'grip of amnesia': 0.17, 'cry of the carnarium': 0.1, 'giant slug': 0.04, 'unblinking bleb': 0.23, "yarok's fenlurker": 0.26, 'shivan meteor': 0.03, 'voice of many': 0.11, 'civilized scholar': 0.1, 'deeproot waters': 0.28, 'void maw': 0.32, 'belligerent sliver': 0.43, 'siege of towers': 0.23, 'nip gwyllion': 0.16, 'infernal caretaker': 0.1, 'tournament grounds': 0.11, 'hoverguard sweepers': 0.15, 'team spirit': 0.16, 'vision charm': 0.25, 'symbol status': 0.25, "titan's presence": 0.25, 'shuriken': 0.19, 'knight of grace': 0.15, 'mage-ring responder': 0.15, 'war priest of thune': 0.22, 'festering evil': 0.11, "titan's revenge": 0.21, 'tectonic reformation': 0.19, 'goblin bookie': 0.4, 'blanket of night': 0.56, 'fleeting image': 0.24, 'behind the scenes': 0.14, 'augur of bolas': 0.18, 'out of bounds': 0.11, 'seascape aerialist': 0.11, 'oviya pashiri, sage lifecrafter': 0.24, 'noose constrictor': 0.14, 'huddle up': 0.04, 'gnarlwood dryad': 0.31, "vivien's jaguar": 0.25, 'searing spear': 0.24, 'sylvok explorer': 0.1, 'death by dragons': 0.27, 'orzhov guildgate': 0.19, 'kor entanglers': 0.04, 'magical hacker': 0.42, 'tajuru archer': 0.15, 'orchard elemental': 0.08, 'drought': 0.17, 'serum tank': 0.19, "seer's lantern": 0.05, 'goblin bangchuckers': 0.12, 'hydradoodle': 1.14, 'binding mummy': 0.24, 'esperzoa': 0.06, 'vulshok battlegear': 0.1, 'clash of wills': 0.19, 'icatian phalanx': 0.08, 'wakestone gargoyle': 0.2, 'serendib sorcerer': 0.15, 'topplegeist': 0.11, 'serene offering': 0.2, 'ghost-lit stalker': 0.13, 'congregate': 0.11, "oracle's attendants": 0.2, "elspeth's nightmare": 0.11, 'take possession': 0.22, 'ignition team': 0.24, 'orzhov cluestone': 0.16, 'caldera hellion': 0.21, 'shelter': 0.13, 'devout chaplain': 0.13, 'darksteel axe': 0.09, 'akrasan squire': 0.19, 'wall of razors': 0.14, 'vorrac battlehorns': 0.37, 'order of yawgmoth': 0.25, 'ochran assassin': 0.19, 'etchings of the chosen': 0.89, 'caller of the untamed': 0.17, 'blades of velis vel': 0.16, 'seed spark': 0.22, 'shaleskin plower': 0.05, 'escape artist': 0.15, 'dowsing shaman': 0.18, 'voracious cobra': 0.16, 'lurking nightstalker': 0.2, 'campaign of vengeance': 0.1, 'invasive surgery': 0.11, 'infernal plunge': 0.24, 'treetop scout': 0.21, 'spirit away': 0.12, 'tremble': 0.18, "marit lage's slumber": 0.58, "firemind's research": 0.23, 'spirit of the season': 0.14, 'mark of mutiny': 0.15, 'spitebellows': 0.13, 'ulvenwald primordials': 0.19, 'ulvenwald mystics': 0.19, 'ulvenwald mysteries': 0.22, 'subjugator angel': 0.31, 'khalni gem': 0.19, 'trepanation blade': 0.24, 'markov dreadknight': 0.15, 'ulcerate': 0.1, 'awol': 0.1, 'stun sniper': 0.11, 'dauthi trapper': 0.28, 'undead augur': 0.25, 'duskdale wurm': 0.03, 'alabaster leech': 0.25, 'mardu ascendancy': 0.16, 'spawning breath': 0.21, 'annihilate': 0.13, "dispeller's capsule": 0.01, 'jeweled spirit': 0.18, 'mitotic manipulation': 0.2, 'unlicensed disintegration': 0.09, 'map the wastes': 0.07, 'chameleon spirit': 0.16, 'sphere of law': 0.16, 'firebrand archer': 0.3, 'gomazoa': 0.14, 'sphinx of the chimes': 0.09, 'avian changeling': 0.23, 'corrupt': 0.19, 'death wind': 0.07, 'spider spawning': 0.23, 'changeling sentinel': 0.14, 'dissolve': 0.26, "treva's attendant": 0.15, 'embodiment of insight': 0.09, 'chastise': 0.14, 'back from the brink': 0.24, 'mer-ek nightblade': 0.14, 'azure mage': 0.08, 'duty-bound dead': 0.07, 'memoricide': 0.19, 'trusty machete': 0.18, 'convalescence': 0.34, 'melesse spirit': 0.21, 'dormant gomazoa': 0.13, 'storrev, devkarin lich': 0.34, 'child of night': 0.02, 'kazarov, sengir pureblood': 0.18, 'davriel, rogue shadowmage': 0.28, 'stonybrook schoolmaster': 0.23, 'meandering river': 0.09, 'chilling grasp': 0.08, 'maze sentinel': 0.02, 'storm herald': 0.13, 'masterful ninja': 0.25, 'stormscape master': 0.32, 'mercurial chemister': 0.09, 'spreading algae': 0.2, 'strongarm monk': 0.08, 'kessig forgemaster': 0.34, 'spurnmage advocate': 0.29, 'squadron hawk': 0.18, 'flameheart werewolf': 0.34, 'emperor crocodile': 0.02, 'migratory route': 0.08, 'stabilizer': 0.31, 'turn aside': 0.19, 'balduvian warlord': 0.19, 'staff of the sun magus': 0.13, 'triclopean sight': 0.17, 'messenger jays': 0.07, 'angelic gift': 0.02, 'mesa chicken': 0.21, 'spawnbroker': 0.29, "mogis's warhound": 0.07, 'veteran armorer': 0.16, 'alexander clamilton': 0.36, 'vessel of volatility': 0.11, 'cumber stone': 0.2, "inventor's goggles": 0.02, 'kithkin rabble': 0.2, 'naya hushblade': 0.22, 'verduran emissary': 0.2, 'skitter of lizards': 0.06, 'verdant crescendo': 0.09, 'vent sentinel': 0.07, 'skulltap': 0.12, 'caterwauling boggart': 0.22, 'duergar mine-captain': 0.29, 'nantuko husk': 0.12, 'vendetta': 0.16, "altar's reap": 0.27, 'vein drinker': 0.21, 'trait doctoring': 0.15, 'frantic salvage': 0.08, 'infiltrate': 0.17, 'viridian emissary': 0.15, 'eager cadet': 0.23, 'viridian claw': 0.16, 'violent eruption': 0.02, 'anurid brushhopper': 0.37, 'simic fluxmage': 0.08, 'inquisition': 0.26, 'inquisitor exarch': 0.13, 'vigilant drake': 0.1, 'cartographer': 0.12, 'sinister strength': 0.13, 'albino troll': 0.09, 'auriok glaivemaster': 0.08, 'neoform': 0.43, 'svogthos, the restless tomb': 0.26, 'deputy of acquittals': 0.09, 'bassara tower archer': 0.2, 'vampire champion': 0.17, 'soldier of fortune': 0.22, 'mana screw': 1.29, 'fire ants': 0.23, 'enlightened ascetic': 0.11, 'soul barrier': 0.22, 'soul diviner': 0.19, 'king of the pride': 0.42, 'soul ransom': 0.23, 'ursapine': 0.3, 'treasure hunter': 0.21, 'souldrinker': 0.16, 'molten sentry': 0.24, 'cinder barrens': 0.1, 'sowing salt': 0.2, 'transmogrifying wand': 0.26, 'slime molding': 0.09, 'suspicious bookcase': 0.21, 'myrsmith': 0.11, 'survivor of the unseen': 0.1, 'slither blade': 0.25, 'myr sire': 0.12, 'myr landshaper': 0.22, 'snapback': 0.05, 'dunes of the dead': 0.19, 'filigree sages': 0.62, 'flamewave invoker': 0.04, 'golgari guildmage': 0.16, 'baton of morale': 0.24, 'elvish guidance': 0.64, 'ivy elemental': 0.04, 'pyxis of pandemonium': 0.24, 'lava runner': 0.38, 'tidal courier': 0.11, 'wildwood patrol': 0.06, 'faerie seer': 0.64, 'roots of life': 0.35, 'wildheart invoker': 0.01, 'wildfire elemental': 0.15, 'planebound accomplice': 0.14, 'planar despair': 0.25, 'blood seeker': 0.13, 'thermo-alchemist': 0.08, "kytheon's irregulars": 0.12, 'deicide': 0.1, 'x': 0.44, 'domesticated hydra': 0.28, 'pyroclastic elemental': 0.06, 'dimir keyrune': 0.1, 'pooling venom': 0.23, 'wind-scarred crag': 0.05, 'briarpack alpha': 0.09, 'liege of the pit': 0.22, 'wind spirit': 0.15, 'territorial allosaurus': 0.29, 'wind drake': 0.01, 'dream cache': 0.12, 'redeem': 0.05, 'deep spawn': 0.16, 'flux channeler': 0.51, 'brood butcher': 0.13, 'hieroglyphic illumination': 0.07, 'thieving magpie': 0.12, 'living twister': 0.2, 'tempt with glory': 0.21, 'phyrexian gargantua': 0.09, 'highland lake': 0.09, 'guard dogs': 0.2, 'whispering shade': 0.09, 'hint of insanity': 0.22, 'goblin cratermaker': 0.2, 'arterial flow': 0.41, 'cloud elemental': 0.04, 'hermit of the natterknolls': 1.3, 'pillar of origins': 0.68, "diviner's wand": 0.46, 'boros guildgate': 0.06, 'guild summit': 0.18, 'blood for bones': 0.46, 'curse of wizardry': 0.22, 'generator servant': 0.16, 'reckless reveler': 0.02, 'hidden dragonslayer': 0.18, 'rushing river': 0.23, 'rix maadi reveler': 0.21, 'thunderscape battlemage': 0.17, 'haru-onna': 0.24, 'harvest hand': 0.16, 'harvest pyre': 0.07, 'harvest wurm': 0.17, 'goblin gardener': 0.15, 'bosom buddy': 0.25, 'coax from the blind eternities': 0.14, 'addle': 0.16, 'repeated reverberation': 0.83, 'primoc escapee': 0.22, 'primitive justice': 0.16, 'branching bolt': 0.18, "wolfhunter's quiver": 0.09, 'haunted fengraf': 0.14, 'primal plasma': 0.01, 'private research': 0.18, 'windreaver': 0.1, 'light of sanction': 0.36, 'thrull retainer': 0.15, 'the countdown is at one': 0.19, 'reversal of fortune': 0.94, 'prodigious growth': 0.21, 'hangman': 0.25, 'lightform': 0.08, 'rescind': 0.16, 'deep forest hermit': 2.11, 'reverse the sands': 0.36, 'goblin razerunners': 0.16, 'acid web spider': 0.16, 'putrid raptor': 0.15, 'relic crush': 0.11, 'armored whirl turtle': 0.11, 'pyrewild shaman': 0.06, 'coils of the medusa': 0.1, 'wing snare': 0.03, 'heat of battle': 0.16, 'aeon chronicler': 0.16, 'daring saboteur': 0.04, 'cloudshift': 0.3, 'furnace whelp': 0.08, 'hair-strung koto': 0.36, 'dementia sliver': 0.24, 'lightning mauler': 0.1, 'commune with dinosaurs': 0.15, 'bravado': 0.19, 'rendclaw trow': 0.24, 'thunderclap': 0.18, 'lifelink': 0.2, 'wirewood elf': 0.13, 'worthy cause': 0.91, "delif's cone": 0.22, 'wispmare': 0.25, 'wirewood guardian': 0.19, 'clocknapper': 0.24, 'scaretiller': 0.12, 'leonin vanguard': 0.13, 'leap': 0.81, 'sanguine sacrament': 0.27, 'permafrost trap': 0.07, 'thorntooth witch': 0.18, 'archon of the triumvirate': 0.11, 'part the veil': 0.21, 'scion of vitu-ghazi': 0.2, 'thought hemorrhage': 0.22, 'dreg mangler': 0.08, 'gather the townsfolk': 0.26, 'combat medic': 0.05, 'horned cheetah': 0.19, 'zektar shrine expedition': 0.1, "ranger's guile": 0.02, 'thought dissector': 0.21, 'waterspout weavers': 0.21, 'sarcomite myr': 0.01, "patrician's scorn": 0.25, 'rakdos cackler': 0.13, 'satyr enchanter': 0.84, 'thornweald archer': 0.1, 'pendulum of patterns': 0.14, 'drifting djinn': 0.34, 'rakdos guildgate': 0.13, 'drag to the underworld': 0.19, 'homicidal brute': 0.1, 'archery training': 0.22, 'gallows at willow hill': 0.21, 'lone wolf of the natterknolls': 1.3, 'tempered sliver': 0.27, 'scapegoat': 0.45, 'well of life': 0.18, 'penumbra spider': 0.05, 'locket of yesterdays': 0.97, 'etherwrought page': 0.19, 'thornscape apprentice': 0.08, 'ray of command': 0.14, 'pegasus charger': 0.12, 'gate to the afterlife': 0.23, "gideon's lawkeeper": 0.13, 'zebra unicorn': 0.14, 'defy death': 0.26, 'feasting troll king': 0.31, 'deadbridge goliath': 0.16, 'scrib nibblers': 0.31, 'scrounged scythe': 0.16, 'whims of the fates': 0.22, "razia's purification": 0.95, 'phantatog': 0.23, 'grim reminder': 0.24, 'ray of revelation': 0.07, "teferi's tutelage": 0.49, 'whetwheel': 0.32, 'fume spitter': 0.15, 'hostile desert': 0.08, 'boomstacker': 0.12, 'sanctimony': 0.1, 'deadly allure': 0.15, 'raid bombardment': 0.41, 'sagu mauler': 0.07, 'blazing salvo': 0.26, 'horribly awry': 0.08, 'death speakers': 0.1, 'spark of creativity': 0.09, 'rakdos shred-freak': 0.02, 'kathari remnant': 0.17, 'dwarven catapult': 0.12, 'dismissive pyromancer': 0.14, 'remember the fallen': 0.03, 'valiant changeling': 0.11, 'genju of the cedars': 0.3, 'spectral searchlight': 0.04, 'mtenda lion': 0.11, 'chatter of the squirrel': 0.26, 'solar blaze': 0.3, 'bogbrew witch': 0.07, 'izzet guildgate': 0.1, 'gallantry': 0.15, 'gallia of the endless dance': 0.21, 'cheering fanatic': 0.1, 'convalescent care': 0.22, 'mouth to mouth': 0.28, "drana's chosen": 0.11, 'soltari foot soldier': 0.16, 'hapless researcher': 0.14, 'form of the dinosaur': 0.14, 'glimmerpoint stag': 0.14, "darigaaz's attendant": 0.16, 'soul shred': 0.15, 'glare of heresy': 0.04, 'dwarven landslide': 0.09, 'keen-eyed archers': 0.14, 'flame jab': 0.11, "fa'adiyah seer": 0.05, 'handcuffs': 0.52, 'stone-tongue basilisk': 0.26, 'jackknight': 0.21, "ranger's path": 0.23, 'hand of death': 0.12, "jace's sentinel": 0.11, 'azorius herald': 0.21, 'conversion chamber': 0.15, "garruk's companion": 0.1, 'glint hawk idol': 0.03, 'rampage of the clans': 0.34, 'moriok rigger': 0.3, 'storm caller': 0.25, 'barbed wire': 0.24, 'rakshasa vizier': 0.1, 'ambush viper': 0.04, 'memorial to genius': 0.06, 'soot imp': 0.3, "aboshan's desire": 0.18, 'drake-skull cameo': 0.24, 'soulblade djinn': 0.18, 'monstrous growth': 0.09, 'soul stair expedition': 0.1, 'soratami mirror-mage': 0.21, 'urgoros, the empty one': 0.11, 'crackling perimeter': 0.1, 'act of treason': 0.04, 'maverick thopterist': 0.06, 'goblin legionnaire': 0.1, 'ursine champion': 0.24, 'cephalid shrine': 0.25, 'raging cougar': 0.23, 'guma': 0.17, 'umara raptor': 0.08, 'faerie impostor': 0.12, 'mind sludge': 0.08, 'abzan falconer': 0.1, 'empyrial storm': 0.29, 'typhoid rats': 0.18, 'quicksand': 0.13, 'spiritual visit': 0.16, 'meteor shower': 0.15, 'quest for pure flame': 0.28, 'stampeding serow': 0.3, 'display of dominance': 0.11, 'coral trickster': 0.01, 'red scarab': 0.11, 'chapel geist': 0.08, 'unburden': 0.04, 'jungle wayfinder': 0.08, 'spiny starfish': 0.15, 'sprouting vines': 0.26, 'forgeborn oreads': 0.12, 'boros cluestone': 0.16, 'angelic benediction': 0.28, 'gainsay': 0.07, 'rabble-rouser': 0.13, 'springbloom druid': 0.25, "emperor's vanguard": 0.12, 'raiding nightstalker': 0.16, "first sliver's chosen": 0.26, 'mind knives': 0.25, 'radiant flames': 0.12, 'kabira vindicator': 0.13, "radiant's dragoons": 0.1, 'sporeweb weaver': 0.23, 'mindstorm crown': 0.1, 'mindwarper': 0.24, 'chamber sentry': 0.11, 'backslide': 0.13, 'ravenous gigantotherium': 0.08, 'unhallowed pact': 0.1, 'journey of discovery': 0.26, 'turn the tables': 0.32, 'joraga auxiliary': 0.07, "chandra's outrage": 0.01, 'unity of purpose': 0.08, 'mistform sliver': 0.11, 'mizzium tank': 0.2, 'mizzium meddler': 0.17, 'eyeblight massacre': 0.04, 'stern proctor': 0.27, 'grim flowering': 0.21, 'mistmeadow skulk': 0.22, 'tunneling geopede': 0.16, 'stensia bloodhall': 0.24, 'mistform warchief': 0.2, 'dimir spybug': 0.08, 'goblin heelcutter': 0.08, 'meteor blast': 0.1, 'mesmeric sliver': 0.24, 'faerie miscreant': 0.11, 'messenger falcons': 0.17, 'spiketail hatchling': 0.19, 'zendikar incarnate': 0.14, 'metamorphic wurm': 0.17, 'quagmire druid': 0.12, 'boltwing marauder': 0.24, 'stand together': 0.09, 'spined fluke': 0.21, 'balustrade spy': 0.12, 'wurmweaver coil': 0.25, 'angelic page': 0.09, 'spidersilk net': 0.1, 'bane of bala ged': 0.89, 'undying beast': 0.12, 'glarecaster': 0.31, "chandra's regulator": 0.25, 'underworld coinsmith': 0.23, 'desperate lunge': 0.16, 'coral fighters': 0.11, 'dusk legion zealot': 0.25, 'spiritualize': 0.27, 'saltskitter': 0.21, 'whipkeeper': 0.25, 'call to glory': 0.2, 'call to heel': 0.06, "saheeli's artistry": 0.23, 'vryn wingmare': 0.16, 'bioshift': 0.1, 'bile blight': 0.1, 'ojutai monument': 0.18, 'ogre warrior': 0.32, 'essence capture': 0.24, 'feral incarnation': 0.09, 'hit': 0.15, 'phantom centaur': 0.22, 'serra advocate': 0.15, 'sanguinary mage': 0.06, 'ghitu lavarunner': 0.14, 'selhoff occultist': 0.09, 'dredge': 0.24, 'one thousand lashes': 0.09, "grenzo's ruffians": 0.13, 'bitter revelation': 0.01, 'phantasmal dragon': 0.16, 'goblin arsonist': 0.01, 'ignite memories': 0.63, 'pieces of the puzzle': 0.19, 'shattered perception': 0.19, 'benevolent unicorn': 0.11, 'shield of duty and reason': 0.17, 'rupture': 0.23, 'runic repetition': 0.01, 'runeflare trap': 0.09, "pilgrim's eye": 0.01, "freyalise's charm": 0.15, 'shiny impetus': 0.12, 'errant ephemeron': 0.02, 'nucklavee': 0.11, 'hesitation': 0.22, 'widespread panic': 0.26, 'void attendant': 0.12, 'immortal coil': 0.37, 'oathsworn knight': 0.08, 'betrothed of fire': 0.11, 'betrayal': 0.15, 'curse of the forsaken': 0.19, 'high sentinels of arashin': 0.11, 'curse of the nightly hunt': 0.23, 'shambling remains': 0.09, 'high alert': 0.45, 'drowner initiate': 0.18, 'phyrexian rager': 0.05, 'ruthless cullblade': 0.12, 'ghostflame sliver': 0.47, 'brood birthing': 0.16, 'hidden stockpile': 0.18, 'hollowhead sliver': 0.24, 'sanguine guard': 0.27, 'wild beastmaster': 0.12, 'hoodwink': 0.17, 'outland colossus': 0.22, 'wax': 0.25, 'hungry flames': 0.01, 'otrimi, the ever-playful': 0.9, 'otarian juggernaut': 0.19, 'ostracize': 0.09, 'wayfaring temple': 0.1, 'orzhov keyrune': 0.14, 'dearly departed': 0.12, 'wall of resistance': 0.11, 'scald': 0.23, 'weapons trainer': 0.09, 'scoria cat': 0.14, 'painful memories': 0.11, "butcher's cleaver": 0.1, 'gempalm strider': 0.16, 'discombobulate': 0.16, 'bushi tenderfoot': 0.32, 'blaring captain': 0.13, 'feedback bolt': 0.22, 'agent of the fates': 0.21, 'warchief giant': 0.32, 'agony warp': 0.12, 'scragnoth': 0.2, 'agent of stromgald': 0.12, 'curator of mysteries': 0.14, 'dromoka monument': 0.1, 'waning wurm': 0.21, 'wane': 0.25, 'hunting triad': 0.34, 'dregscape zombie': 0.05, 'blackcleave goblin': 0.11, 'cryptic annelid': 0.03, 'curse of bounty': 1.75, 'cadaver imp': 0.18, 'secret salvage': 0.21, 'peregrine mask': 0.25, "aethermage's touch": 0.12, 'favor of the overbeing': 0.25, 'ghost-lit redeemer': 0.23, 'oran-rief survivalist': 0.06, 'dwarven nomad': 0.11, 'seismic strike': 0.16, 'organ harvest': 0.16, 'savage thallid': 0.29, 'disciple of deceit': 0.19, 'frontier guide': 0.2, 'weight advantage': 0.13, 'dawning purist': 0.12, 'run': 0.15, 'rules lawyer': 0.44, 'sky spirit': 0.15, 'catalog': 0.03, "devils' playground": 0.16, 'creeping dread': 0.14, 'alms beast': 0.11, 'priests of norn': 0.15, 'sleep': 0.21, 'cateran summons': 1.01, 'iridescent drake': 0.09, 'battlefield medic': 0.14, 'skyshooter': 0.17, 'adeliz, the cinder wind': 0.2, 'rimefeather owl': 2.65, 'goblin rock sled': 0.07, 'into the story': 0.22, 'advice from the fae': 0.23, 'rishadan airship': 0.06, 'rimewind taskmage': 0.22, "healer's hawk": 0.22, 'aligned hedron network': 0.15, 'verity circle': 0.15, 'rite of ruin': 0.12, 'snakeform': 0.25, 'murmuring mystic': 0.28, 'vampire outcasts': 0.12, 'doublecast': 0.26, 'vampire neonate': 0.12, 'vampire lacerator': 0.09, 'vampire interloper': 0.01, 'boa constrictor': 0.26, 'branchsnap lorian': 0.14, 'revel of the fallen god': 0.12, "multani's presence": 0.14, 'prophetic prism': 0.1, 'celestine reef': 1.28, 'cellar door': 0.11, 'final punishment': 0.28, 'ith, high arcanist': 0.17, 'smiting helix': 0.07, 'veiled sentry': 0.23, 'giant crab': 0.08, 'amaranthine wall': 0.21, 'fiery temper': 0.07, 'slumbering tora': 0.47, 'isolation cell': 0.23, 'enslave': 0.03, 'pippa, duchess of dice': 0.15, 'eradicate': 0.27, 'festercreep': 0.1, 'bring down': 0.04, 'custody battle': 0.25, 'rootborn defenses': 0.24, 'viscera dragger': 0.2, 'sigil of the nayan gods': 0.18, 'virulent wound': 0.14, 'virulent swipe': 0.12, 'fangren marauder': 0.16, 'shu foot soldiers': 2.57, 'nova cleric': 0.24, 'pit fight': 0.09, "heretic's punishment": 0.16, 'ruin processor': 0.07, 'pit trap': 0.15, 'noble quarry': 0.2, 'herald of torment': 0.18, "druid's deliverance": 0.12, 'role reversal': 0.32, 'goblin roughrider': 0.07, 'winds of qal sisma': 0.23, 'carrion wurm': 0.08, 'possessed barbarian': 0.25, 'ephemerate': 1.34, 'neurok hoversail': 0.12, 'dreadship reef': 0.19, 'nested ghoul': 0.09, "rith's attendant": 0.16, 'wing shards': 0.03, 'neheb, the worthy': 0.25, 'casting of bones': 0.11, 'roaring slagwurm': 0.22, 'simic locket': 0.05, 'simic keyrune': 0.11, 'evra, halcyon witness': 0.2, 'bloodfell caves': 0.11, 'gluetius maximus': 0.2, 'alaborn cavalier': 0.01, 'glowspore shaman': 0.23, 'niblis of the breath': 0.11, 'nezumi bone-reader': 0.33, 'bloodflow connoisseur': 0.15, 'skyclaw thrash': 0.22, "krenko's enforcer": 0.09, 'kithkin armor': 0.1, 'tranquil expanse': 0.13, 'arborback stomper': 0.05, 'flash of insight': 0.24, 'keldon battlewagon': 0.24, 'consecrate': 0.09, 'tribal flames': 0.11, 'thalakos dreamsower': 0.14, 'conclave mentor': 1.41, 'loafing giant': 0.13, 'traitorous blood': 0.13, 'triskelavus': 0.23, "tezzeret's betrayal": 0.15, 'swimmer in nightmares': 0.1, "traitor's roar": 0.1, 'magus of the mind': 0.16, 'claim the firstborn': 0.07, 'flitterstep eidolon': 0.1, 'kitesail apprentice': 0.16, 'thundercloud shaman': 0.25, 'lupine prototype': 0.26, 'earth rift': 0.15, 'transguild promenade': 0.05, 'transgress the mind': 0.1, 'light of the legion': 0.23, 'torment of scarabs': 1.17, 'astral drift': 0.12, 'lightkeeper of emeria': 0.22, 'dauntless onslaught': 0.01, 'thrull wizard': 0.21, 'temper': 0.16, 'consume': 0.09, 'malevolent awakening': 0.22, 'marang river prowler': 0.05, 'timebender': 0.05, 'conundrum sphinx': 0.13, 'striped bears': 0.2, 'flaming gambit': 0.21, 'force of rage': 0.13, "lim-dûl's paladin": 0.15, 'citywide bust': 0.19, 'lingering tormentor': 0.28, "mage's guile": 0.14, 'tidewater minion': 0.15, 'deepwood legate': 0.17, 'compulsive research': 0.04, "kumena's speaker": 0.1, 'tower of champions': 0.19, 'keldon mantle': 0.1, 'temporal machinations': 0.1, 'auriok edgewright': 0.09, 'electryte': 0.25, 'arc runner': 0.09, 'trail of mystery': 0.08, 'touch of vitae': 0.11, 'syndicate trafficker': 0.12, 'madcap skills': 0.07, 'lost leonin': 0.2, 'llanowar dead': 0.24, "djeru's resolve": 0.1, 'maelstrom djinn': 0.35, "telim'tor's darts": 0.13, 'lava hounds': 0.2, 'elfhame palace': 0.24, 'elvish hexhunter': 0.18, 'thrasher brute': 0.24, 'talruum piper': 0.19, 'lay of the land': 0.08, 'aven skirmisher': 0.08, 'leyline of lightning': 0.29, "talrand's invocation": 0.1, 'cling to dust': 0.18, 'disturbed burial': 0.18, 'ashenmoor gouger': 0.1, 'loyal pegasus': 0.06, 'marsh gas': 0.09, 'eidolon of obstruction': 0.1, 'trap essence': 0.13, 'tomebound lich': 0.25, 'sunblade elf': 0.13, 'elite arrester': 0.18, 'thoughtleech': 0.21, 'legerdemain': 0.15, 'thought courier': 0.22, 'defiant vanguard': 0.16, 'awe strike': 0.21, 'togglodyte': 0.27, 'titanic growth': 0.01, 'elite scaleguard': 0.05, 'masterful replication': 0.18, 'manic vandal': 0.03, 'archdemon of unx': 0.24, "titan's strength": 0.18, 'annul': 0.09, 'keeper of the dead': 0.24, 'thran forge': 0.2, 'sunlance': 0.02, 'consume strength': 0.12, "marchesa's emissary": 0.09, 'trial of ambition': 0.23, 'deathless behemoth': 0.13, 'khenra charioteer': 0.18, 'flow of ideas': 0.27, 'thrill-kill assassin': 0.11, 'flame sweep': 0.16, 'tin street hooligan': 0.1, 'lava burst': 0.12, 'aven riftwatcher': 0.01, 'desecration elemental': 0.15, 'timid drake': 0.11, 'thrill of possibility': 0.09, "thelon's chant": 0.12, 'triad of fates': 0.13, 'shoulder to shoulder': 0.03, 'assert authority': 0.15, 'torch courier': 0.07, 'seek the horizon': 0.12, 'canopy surge': 0.18, 'incorrigible youths': 0.2, 'ordeal of nylea': 0.1, 'vug lizard': 0.17, 'target minotaur': 0.15, 'vodalian merchant': 0.18, 'settle the score': 0.22, 'shrink': 0.04, 'onslaught': 0.13, 'talas explorer': 0.3, 'lull': 0.12, 'indulging patrician': 1.25, 'cry of contrition': 0.22, 'ondu giant': 0.14, "selvala's charge": 0.12, 'frontline sage': 0.12, 'second sight': 0.14, 'seedling charm': 0.22, 'indigo faerie': 0.23, 'secret plans': 0.02, 'decorated champion': 0.24, 'goldenglow moth': 0.1, 'see beyond': 0.18, 'tower above': 0.14, 'shrine of limitless power': 0.1, 'golden demise': 0.07, 'volatile chimera': 0.15, 'crown of vigor': 0.08, 'syr cadian, knight owl': 0.17, 'selesnya cluestone': 0.1, 'frogmite': 0.28, 'syr konrad, the grim': 2.04, 'early frost': 0.16, 'obelisk of grixis': 0.24, "illusionist's stratagem": 0.39, 'attendant of vraska': 0.16, 'crypt champion': 0.16, 'escaped null': 0.11, 'taj-nar swordsmith': 0.24, 'fogwalker': 0.05, 'selesnya sagittars': 0.12, 'crypt cobra': 0.21, 'identity thief': 0.26, 'knight of dawn': 0.22, "seer's vision": 0.27, 'akroan crusader': 0.12, 'dawnbringer charioteers': 0.16, 'touch of death': 0.1, 'shimatsu the bloodcloaked': 0.2, 'orcish healer': 0.14, 'cryptic caves': 0.09, "nylea's emissary": 0.1, 'akki blizzard-herder': 0.15, 'gelid shackles': 0.19, 'bioplasm': 0.24, 'volcanic salvo': 0.09, 'self-inflicted wound': 0.16, 'assemble': 0.1, 'assure': 0.1, 'vampiric rites': 0.42, 'vampiric fury': 0.14, 'surestrike trident': 0.93, 'crashing boars': 0.07, 'snake cult initiation': 0.34, 'crash through': 0.1, 'decimator beetle': 0.09, 'multiform wonder': 0.09, 'fossil find': 0.15, 'surge of strength': 0.16, 'mana chains': 0.16, 'my first tome': 0.23, 'celestial archon': 0.1, 'veil of secrecy': 0.21, 'mystic skyfish': 0.07, 'slimefoot, the stowaway': 0.22, 'vedalken anatomist': 0.05, 'caustic tar': 0.09, 'mystic archaeologist': 0.11, 'cavalcade of calamity': 0.09, 'battle mastery': 0.24, 'myr moonvessel': 0.25, 'surreal memoir': 0.02, 'slum reaper': 0.1, 'filigree familiar': 0.02, 'soldevi sage': 0.23, "sleeper's robe": 0.27, 'moonlit wake': 0.25, 'jade leech': 0.28, "urza's armor": 0.18, 'courtly provocateur': 0.1, 'chain of plasma': 0.23, 'soulmender': 0.04, 'aven fleetwing': 0.03, 'cerulean sphinx': 0.3, 'king crab': 0.22, 'footbottom feast': 0.26, 'sunspear shikari': 0.07, 'fortitude': 0.22, 'sonic burst': 0.08, 'sunscape master': 0.25, 'soratami cloudskater': 0.17, 'sunscape battlemage': 0.17, 'circle of flame': 0.09, 'garna, the bloodflame': 0.11, 'barrage tyrant': 0.14, 'barrage of expendables': 0.25, 'mortarpod': 0.11, 'double dip': 0.12, 'elvish hunter': 0.04, 'crazed skirge': 0.15, 'divine congregation': 0.12, 'carrion call': 0.17, 'crippling fatigue': 0.1, 'silverskin armor': 0.1, 'vile requiem': 0.09, 'deranged assistant': 0.04, 'aura fracture': 0.13, 'inner demon': 0.24, 'vile deacon': 0.1, "dovin's automaton": 0.2, 'magmatic sinkhole': 0.05, 'vigilante justice': 0.02, 'insatiable gorgers': 0.13, 'initiates of the ebon hand': 0.17, 'infuriate': 0.02, 'ghosts of the innocent': 0.22, 'drudge spell': 0.19, 'sylvan bounty': 0.05, 'druid of the anima': 0.25, 'festering newt': 0.04, 'consulate skygate': 0.1, 'circle of solace': 0.27, 'virulent plague': 0.14, 'sigiled starfish': 0.07, 'viridian shaman': 0.08, 'festival of trokin': 0.61, 'nightveil predator': 0.19, 'silumgar spell-eater': 0.12, 'neurok invisimancer': 0.18, "slayer's plate": 0.16, 'divest': 0.11, 'skirk commando': 0.02, 'golgari findbroker': 0.1, 'vermiculos': 0.21, "nature's way": 0.08, 'doubtless one': 0.23, 'bazaar trademage': 0.11, 'irini sengir': 0.16, 'duergar cave-guard': 0.26, 'fiery cannonade': 0.19, 'narcolepsy': 0.02, 'skyshroud behemoth': 0.19, 'necrobite': 0.04, 'alhammarret, high arbiter': 0.23, 'catacomb sifter': 0.15, 'skin shedder': 0.1, 'sinister concoction': 0.12, 'viashino sandstalker': 0.1, 'magnifying glass': 0.1, 'beast attack': 0.07, 'sire of the storm': 0.1, 'nessian game warden': 0.09, 'sirocco': 0.23, 'magus of the arena': 0.09, 'nephalia smuggler': 0.1, 'sizzle': 0.19, 'nephalia academy': 0.23, 'envelop': 0.2, 'skarrg goliath': 0.14, "alchemist's vial": 0.18, 'intimidator initiate': 0.15, "necromancer's assistant": 0.07, 'skin invasion': 0.1, 'wall of shields': 0.14, 'screeching sliver': 0.25, 'bounty of the luxa': 0.09, 'profound journey': 0.16, 'probe': 0.14, "thassa's rebuff": 0.11, 'braidwood cup': 0.17, 'brain gorgers': 0.18, 'last rites': 0.13, 'dragon egg': 0.01, 'prism ring': 0.3, 'thunder-thrash elder': 0.15, 'rhystic cave': 0.29, 'dalakos, crafter of wonders': 0.07, 'darksteel pendant': 0.19, 'riches': 0.24, 'fyndhorn bow': 0.13, 'thryx, the sudden storm': 0.55, 'gather courage': 0.05, 'arcbound bruiser': 0.1, 'deathsprout': 0.4, 'handy dandy clone machine': 0.14, 'dangerous wager': 0.16, 'arm with aether': 0.11, 'psychic impetus': 0.01, 'psychic drain': 0.41, 'resourceful return': 0.03, 'rest for the weary': 0.19, 'restless dreams': 0.17, 'prowess of the fair': 0.22, 'protean thaumaturge': 0.23, 'woodland stream': 0.05, 'bog elemental': 0.19, 'fall of the thran': 0.25, 'darksteel sentinel': 0.14, 'fallen ferromancer': 0.17, 'riot devils': 0.06, 'rise from the grave': 0.06, 'advocate of the beast': 0.06, 'precision bolt': 0.17, 'bloodrite invoker': 0.1, 'wingrattle scarecrow': 0.28, 'heartless pillage': 0.02, 'bloodrage brawler': 0.02, 'wingcrafter': 0.16, 'wine of blood and iron': 0.34, 'bloodletter quill': 0.2, 'thunderous wrath': 0.13, 'wipe clean': 0.16, 'bloodstone cameo': 0.24, 'fallen ideal': 0.25, 'thalakos lowlands': 0.14, 'primal forcemage': 0.02, 'haunting misery': 0.12, 'armorcraft judge': 0.09, "tezzeret's gatebreaker": 0.13, "brawler's plate": 0.15, 'prickly boggart': 0.18, 'bloodwater entity': 0.18, 'armored ascension': 0.18, 'rile': 0.04, 'fodder launch': 0.22, 'goblin scouts': 0.2, "raiders' wake": 0.53, 'rags': 0.24, 'lazotep plating': 0.73, 'yukora, the prisoner': 0.23, 'yuki-onna': 0.26, 'boros battleshaper': 0.11, 'reap and sow': 0.23, 'reap what is sown': 0.07, 'working stiff': 0.26, 'bonds of mortality': 0.25, 'rage thrower': 0.08, 'game-trail changeling': 0.21, 'thopter engineer': 0.07, 'gruesome fate': 0.12, 'dark remedy': 0.14, 'abandon reason': 0.13, 'thoughtrender lamia': 0.21, 'abattoir ghoul': 0.11, "ral's staticaster": 0.13, 'face to face': 0.35, "dragon's eye savants": 0.09, 'raptor hatchling': 0.24, 'about face': 0.08, 'zhur-taa druid': 0.18, "eyeblight's ending": 0.11, 'leonin elder': 0.2, 'leonin scimitar': 0.19, 'extruder': 0.02, 'pyrite spellbomb': 0.24, 'throatseeker': 0.21, 'lathnu hellion': 0.1, 'haktos the unscarred': 0.12, 'bogardan firefiend': 0.09, 'wrangle': 0.15, 'dead-iron sledge': 0.21, 'rend flesh': 0.17, 'arcbound hybrid': 0.11, 'wormfang crab': 0.17, 'dimensional infiltrator': 0.14, 'cogwork grinder': 0.13, 'psychotic haze': 0.24, 'quirion explorer': 0.16, 'archaeological dig': 0.25, 'quilled sliver': 0.35, 'guided strike': 0.1, 'gulf squid': 0.14, 'question elemental?': 0.2, 'gurmag swiftwing': 0.1, 'xathrid slyblade': 0.1, 'quagnoth': 0.22, 'refurbish': 0.11, "wurm's tooth": 0.08, 'boldwyr intimidator': 0.08, 'eiganjo free-riders': 0.24, 'poultice sliver': 0.15, 'roaring primadox': 0.08, 'agent of acquisitions': 0.19, 'waxmane baku': 0.07, 'horizon chimera': 0.18, 'blessed reincarnation': 0.14, 'school of the unseen': 0.23, 'parasitic impetus': 0.1, 'scorched rusalka': 0.08, 'waterspout elemental': 0.26, 'waterkin shaman': 0.17, 'feast or famine': 0.17, 'drill bit': 0.12, 'scouring sands': 0.05, 'watchdog': 0.22, 'scrapyard mongrel': 0.05, 'path of peace': 0.02, 'pathbreaker wurm': 0.1, 'whalebone glider': 0.09, 'perpetual timepiece': 0.61, 'saproling infestation': 0.25, 'sarcatog': 0.14, 'arboreal grazer': 0.19, 'lobotomy': 0.15, 'well-laid plans': 0.23, 'gilded light': 0.03, 'homarid spawning bed': 0.14, 'pennon blade': 0.01, 'temple acolyte': 0.13, 'savannah sage': 0.17, 'temmet, vizier of naktamun': 0.18, 'cunning breezedancer': 0.09, 'feeding frenzy': 0.15, 'cult of the waxing moon': 0.38, 'overwhelming instinct': 0.39, 'arachnus web': 0.12, "huatli's raptor": 0.15, 'hulking cyclops': 0.09, "aquitect's will": 0.26, 'overcome': 0.04, 'searing meditation': 0.18, 'hunger of the howlpack': 0.19, 'otherworldly journey': 0.21, 'seal of doom': 0.12, 'krakilin': 0.14, 'warden of the wall': 0.08, 'elf replica': 0.11, 'scroll of origins': 0.26, 'blaze commando': 0.14, "warrior's honor": 0.02, 'hour of need': 0.12, 'butcher orgg': 0.18, 'goblin bully': 0.14, 'cultivator of blades': 0.19, 'frostwielder': 0.12, 'grapple with the past': 0.16, 'howlgeist': 0.16, 'blast of genius': 0.09, 'frostwalk bastion': 0.13, 'persecute artist': 0.22, 'everdawn champion': 0.07, 'diamond mare': 0.1, 'desert of the fervent': 0.09, 'ruin raider': 0.25, 'ruinous minotaur': 0.09, 'kyren sniper': 0.12, 'hero of goma fada': 0.12, 'dream twist': 0.17, 'broken bond': 0.35, 'rune of protection: black': 0.22, 'ghirapur gearcrafter': 0.07, 'blood tithe': 0.2, "hedonist's trove": 0.1, 'dreadwaters': 0.04, 'briar shield': 0.11, 'briarhorn': 0.1, 'terrifying presence': 0.13, 'wind dancer': 0.05, 'cloudblazer': 0.1, 'root snare': 0.03, 'blood-cursed knight': 0.15, 'dream leash': 0.31, 'roterothopter': 0.14, 'wild-field scarecrow': 0.26, "heron's grace champion": 0.13, 'aether storm': 0.13, "sage's reverie": 0.33, 'whiplash trap': 0.04, 'salvager of secrets': 0.09, 'timbermare': 0.32, 'brutal expulsion': 0.13, 'hobble': 0.14, 'petals of insight': 0.08, 'brute strength': 0.07, 'curse of predation': 0.3, 'aether sting': 0.38, 'wicker warcrawler': 0.29, 'whitemane lion': 0.1, 'white scarab': 0.18, 'living terrain': 0.17, 'aether searcher': 0.2, 'sabertooth wyvern': 0.14, 'dreamstealer': 0.11, "artificer's hex": 0.14, 'sacred knight': 0.13, 'krovikan vampire': 0.14, 'inspiration': 0.13, 'master thief': 0.1, 'forerunner of the legion': 0.68, 'storm front': 0.16, 'mardu hordechief': 0.04, 'mayhem devil': 1.78, 'spirit cairn': 0.01, 'chimeric egg': 0.14, 'stun': 0.07, 'marrow chomper': 0.12, 'student of elements': 0.1, 'metathran aerostat': 0.24, 'spell counter': 1.81, 'gossamer chains': 0.16, 'gorgon recluse': 0.01, 'displace': 0.27, 'stingerfling spider': 0.02, 'mark of sakiko': 0.49, 'spawning bed': 0.26, 'sulfuric vapors': 0.36, 'keepsake gorgon': 0.08, 'spiketail drake': 0.15, 'desiccated naga': 0.11, "ulrich's kindred": 0.25, 'corrupted grafstone': 0.25, 'choking tethers': 0.02, 'firemantle mage': 0.09, 'triumph of cruelty': 0.09, 'chicken egg': 0.21, 'death-hood cobra': 0.02, 'flamerush rider': 0.11, 'firebrand ranger': 0.18, 'jilt': 0.21, 'gleaming overseer': 0.15, "stitcher's graft": 0.11, 'journey for the elixir': 0.14, 'undead servant': 0.01, 'chakram retriever': 0.51, 'metallic rebuke': 0.18, 'march from the tomb': 0.14, "meng huo's horde": 0.14, 'balduvian barbarians': 0.08, 'foresee': 0.05, 'duskmantle, house of shadow': 0.31, "jhoira's familiar": 0.47, 'costly plunder': 0.2, "trostani's judgment": 0.01, 'treetop sentinel': 0.13, "kaervek's torch": 0.09, 'stone idol trap': 0.14, 'foratog': 0.1, 'desolation giant': 0.14, 'species gorger': 0.09, 'flames of the firebrand': 0.07, 'unexpected potential': 0.18, 'jhessian zombies': 0.17, 'spire owl': 0.29, 'kaervek, the spiteful': 0.11, 'squallmonger': 0.14, 'spiraling embers': 0.12, 'jeskai charm': 0.13, 'dispersal shield': 0.1, 'tree monkey': 0.11, 'aven shrine': 0.26, 'emcee': 0.07, 'staggering insight': 0.2, 'stenchskipper': 0.22, 'kami of the honored dead': 0.17, 'banishing stroke': 0.11, 'jungle troll': 0.13, 'join the ranks': 0.1, 'trusted advisor': 0.41, 'stormblood berserker': 0.09, 'disruptive pitmage': 0.17, 'tymaret, the murder king': 0.19, 'disruptive student': 0.23, 'mantle of the wolf': 0.19, 'baffling end': 0.16, 'keldon megaliths': 0.21, 'graven dominator': 0.18, 'stormscape apprentice': 0.16, 'flameblade angel': 0.17, 'ancient spring': 0.15, 'spite of mogis': 0.1, 'midnight guard': 0.11, 'jungleborn pioneer': 0.11, 'graf harvest': 0.4, 'matsu-tribe sniper': 0.16, 'staggershock': 0.14, 'jhessian balmgiver': 0.13, "emrakul's evangel": 0.3, 'chambered nautilus': 0.11, 'baleful eidolon': 0.06, 'strength of the pack': 0.02, 'spellwild ouphe': 0.1, 'steam augury': 0.14, 'treasured find': 0.24, 'sultai charm': 0.09, 'gearseeker serpent': 0.11, 'firemind vessel': 0.49, 'chandra, novice pyromancer': 0.22, 'coral net': 0.25, 'justice strike': 0.22, 'devour flesh': 0.08, 'high ground': 0.2, 'tigereye cameo': 0.17, 'crookclaw elder': 0.25, 'dreamcaller siren': 0.21, 'metallurgeon': 0.24, 'cloud djinn': 0.09, 'chronomaton': 0.14, 'temur charm': 0.08, 'stampeding wildebeests': 0.22, 'runeclaw bear': 0.06, 'silkwrap': 0.1, 'aura blast': 0.32, 'flashfreeze': 0.04, 'mask of intolerance': 0.29, 'piranha marsh': 0.13, 'vision skeins': 0.28, 'ruthless knave': 0.33, 'broken concentration': 0.08, 'little girl': 0.26, 'tidal warrior': 0.12, 'foreshadow': 0.15, 'fetid imp': 0.02, 'whisper, blood liturgist': 0.3, 'viridescent wisps': 0.15, 'giant harbinger': 0.43, 'charnel troll': 0.14, 'whispers of emrakul': 0.14, 'tenacious dead': 0.24, 'fate forgotten': 0.09, 'devour in flames': 0.05, 'charmed griffin': 0.22, 'nihilistic glee': 0.24, 'phyrexian digester': 0.16, "druid's familiar": 0.2, 'hidden guerrillas': 0.26, 'goldmeadow lookout': 0.11, "artificer's assistant": 0.16, 'nikya of the old ways': 0.23, 'sacred boon': 0.1, 'fungal infection': 0.1, 'arc-slogger': 0.22, 'phyrexian librarian': 0.21, 'careful consideration': 0.09, 'sylvan might': 0.03, 'magma spray': 0.09, 'runed stalactite': 0.13, 'runes of the deus': 0.26, 'heraldic banner': 0.99, 'dirge of dread': 0.07, 'sadistic obsession': 0.03, 'nightshade peddler': 0.08, 'sacellum godspeaker': 0.2, 'rushwood herbalist': 0.13, 'hijack': 0.07, 'clone shell': 0.1, 'changeling outcast': 0.3, 'grasping dunes': 0.23, 'gluttonous zombie': 0.17, 'llanowar elite': 0.13, 'govern the guildless': 0.26, 'dying wish': 0.12, 'forerunner of the heralds': 0.13, "castaway's despair": 0.06, 'veteran motorist': 0.09, 'turn to mist': 0.16, 'train of thought': 0.07, 'merfolk thaumaturgist': 0.16, 'steam frigate': 0.16, 'neglected heirloom': 0.27, 'interplanar beacon': 0.09, 'skarrgan firebird': 0.1, 'windreaper falcon': 0.13, 'cloudkin seer': 0.23, 'roc hatchling': 0.16, "rogue's gloves": 0.24, 'fang skulkin': 0.25, 'dauntless bodyguard': 0.25, 'inspiring veteran': 0.07, 'fanatical firebrand': 0.11, 'aerie ouphes': 0.16, 'wily goblin': 0.34, 'territorial hammerskull': 0.1, "veteran's armaments": 0.28, 'skeletal changeling': 0.35, 'excise': 0.08, 'heavy ballista': 0.12, 'hearth charm': 0.17, 'rite of belzenlok': 0.24, 'breaker of armies': 0.33, 'bad deal': 0.04, 'steel squirrel': 0.37, 'dubious challenge': 0.12, 'skill borrower': 0.34, 'excruciator': 0.18, "predator's strike": 0.22, 'vesperlark': 0.12, 'wings of aesthir': 0.1, 'fists of the demigod': 0.27, 'chartooth cougar': 0.05, 'fists of ironwood': 0.14, 'skeletal grimace': 0.12, 'power armor': 0.14, 'magus of the scroll': 0.27, "heliod's pilgrim": 0.06, 'fibrous entangler': 0.16, 'inner calm, outer strength': 0.1, 'sulfurous blast': 0.14, 'fickle efreet': 0.26, 'glowing anemone': 0.11, 'rotfeaster maggot': 0.02, 'brine seer': 0.17, 'tuskguard captain': 0.13, 'new prahv guildmage': 0.08, 'rot farm skeleton': 0.12, 'planar overlay': 0.33, 'henge guardian': 0.12, 'cursed monstrosity': 0.25, 'vindictive vampire': 1.25, 'eldrazi devastator': 0.27, 'silvergill douser': 0.15, 'anurid barkripper': 0.12, 'ruby leech': 0.24, 'silversmote ghoul': 0.21, 'fevered strength': 0.06, 'herald of dromoka': 0.16, 'alaborn grenadier': 0.29, 'cloud sprite': 0.12, 'cylian sunsinger': 0.27, 'brilliant halo': 0.13, 'plover knights': 0.13, 'roiling terrain': 0.19, 'roiling horror': 0.21, 'helium squirter': 0.06, 'viashino pyromancer': 0.13, 'cyclops of eternal fury': 0.07, 'cyclops gladiator': 0.14, 'brimstone volley': 0.08, 'aura graft': 0.15, 'carrion rats': 0.17, 'carrion screecher': 0.02, 'alaborn musketeer': 0.13, 'kjeldoran home guard': 0.07, 'rootgrapple': 0.16, 'lilting refrain': 0.32, 'give': 0.12, 'shoreline ranger': 0.04, 'flesh to dust': 0.19, "huatli's snubhorn": 0.25, 'ashmouth blade': 0.27, 'cabal interrogator': 0.23, 'gleam of resistance': 0.06, "ashiok's forerunner": 0.12, 'biting rain': 0.22, 'ward of lights': 0.15, 'take': 0.12, 'ovinomancer': 0.18, 'spore cloud': 0.1, 'omnispell adept': 0.19, 'essence fracture': 0.1, 'cabal slaver': 0.21, 'wakeroot elemental': 0.1, 'searing light': 0.07, 'one dozen eyes': 0.09, 'serene steward': 0.14, 'wake the reflections': 0.12, 'felhide petrifier': 0.21, 'clear the mind': 0.19, 'greater werewolf': 0.24, 'overload': 0.17, 'icefeather aven': 0.03, 'ouphe vandals': 0.09, "trespasser's curse": 0.32, "warrior's charge": 0.11, 'hour of eternity': 0.15, "teferi's sentinel": 0.1, 'warteye witch': 0.02, 'atarka monument': 0.13, 'minamo sightbender': 0.1, 'paladin of prahv': 0.2, 'tel-jilad fallen': 0.1, 'pale moon': 0.28, 'corpse cur': 0.28, 'paliano vanguard': 0.11, 'dwarven shrine': 0.18, 'warrior en-kor': 0.13, 'marsh crocodile': 0.14, "pack's disdain": 0.12, 'angel of retribution': 0.1, 'mindscour dragon': 0.11, 'torment of venom': 0.07, 'feral animist': 0.07, 'serra sphinx': 0.1, 'goblin bowling team': 0.26, 'chaos imps': 0.16, 'goblin assailant': 0.08, 'pain': 0.14, 'diseased vermin': 0.31, 'suffering': 0.14, 'junk golem': 0.25, 'orator of ojutai': 0.26, 'cage of hands': 0.01, 'lotus-eye mystics': 0.04, 'seedcradle witch': 0.18, 'disempower': 0.08, 'green scarab': 0.15, 'geist of the archives': 0.26, 'oracle': 49.99, 'ordeal of heliod': 0.19, 'airborne aid': 0.13, 'seismic spike': 0.22, 'etched oracle': 0.1, 'tar pitcher': 0.11, 'fleet-footed monk': 0.15, 'orcish spy': 0.08, 'devouring swarm': 0.11, "konda's hatamoto": 0.22, 'confront the unknown': 0.07, 'seaside haven': 0.24, 'cryoclasm': 0.09, 'walking desecration': 0.12, 'essence vortex': 0.18, 'drown in filth': 0.06, 'orzhov guildmage': 0.26, "ajani's last stand": 0.08, 'sengir nosferatu': 0.09, 'tivadar of thorn': 0.24, 'ainok survivalist': 0.02, "ajani's presence": 0.2, 'walking wall': 0.11, 'black oak of odunos': 0.1, 'sedraxis alchemist': 0.26, 'doomed traveler': 0.03, 'graveyard busybody': 0.25, 'wall of lava': 0.15, 'second wind': 0.25, 'wall of pine needles': 0.17, 'orochi sustainer': 0.1, 'tavern swindler': 0.03, 'black scarab': 0.17, 'horseshoe crab': 0.1, 'vortex elemental': 0.08, 'palliation accord': 0.25, 'aethergeode miner': 0.13, 'touch of moonglove': 0.08, 'krosan druid': 0.02, 'knight of the hokey pokey': 0.07, 'cankerous thirst': 0.14, 'blightwidow': 0.2, 'gang up': 0.12, 'conclave naturalists': 0.05, "builder's blessing": 0.11, 'blind hunter': 0.07, 'kami of ancient law': 0.1, 'might of the nephilim': 0.22, 'synchronous sliver': 0.27, 'weirding wood': 0.26, 'krosan drover': 0.22, 'bull cerodon': 0.12, 'shields of velis vel': 0.54, 'minister of pain': 0.11, 'conclave tribunal': 0.09, 'ministrant of obligation': 0.29, 'consign to dust': 0.08, 'aphetto grifter': 0.14, 'weirded vampire': 0.1, 'pendelhaven elder': 0.03, 'aphetto exterminator': 0.2, 'shimmering grotto': 0.1, 'nulltread gargantuan': 0.2, 'krosan colossus': 0.1, 'sanguine praetor': 0.28, 'aether web': 0.11, 'dispersing orb': 0.16, 'duskborne skymarcher': 0.08, 'sylvok replica': 0.11, 'tower geist': 0.1, 'salvage scout': 0.12, 'saltcrusted steppe': 0.12, 'evermind': 0.32, 'evernight shade': 0.1, 'noble stand': 0.13, 'hisoka, minamo sensei': 0.25, "emissary's ploy": 0.15, 'sage owl': 0.16, 'knight of malice': 0.2, 'indebted samurai': 0.67, 'spike jester': 0.09, 'riptide turtle': 0.04, 'maddening wind': 0.14, "grenzo's rebuttal": 0.12, 'hold the perimeter': 0.11, 'hold the gates': 0.18, 'petravark': 0.09, 'kami of old stone': 0.16, 'sandbar serpent': 0.14, 'everflame eidolon': 0.07, "consul's lieutenant": 0.08, "nylea's presence": 0.08, 'savage gorger': 0.76, 'savage knuckleblade': 0.15, 'martial impetus': 0.01, 'paraselene': 0.11, 'parasitic strix': 0.04, "gods' eye, gate to the reikai": 0.28, 'scepter of empires': 0.23, 'scent of brine': 0.11, 'paroxysm': 0.18, 'mardu scout': 0.05, 'voltaic servant': 0.1, 'gatstaf shepherd': 0.21, 'aysen abbey': 0.21, 'erupting dreadwolf': 0.2, 'oboro breezecaller': 0.19, 'illuminate': 0.17, 'duskmantle prowler': 0.08, 'hornswoggle': 0.14, 'watchwing scarecrow': 0.18, 'uktabi drake': 0.02, 'graveshifter': 0.5, 'kraul raider': 0.13, 'parallax inhibitor': 0.13, 'waterspout djinn': 0.03, "curator's ward": 0.42, 'ethersworn shieldmage': 0.19, 'burning cloak': 0.1, 'impelled giant': 0.16, 'gatstaf howler': 0.21, 'weaver of currents': 0.1, 'lone revenant': 0.14, 'shield dancer': 0.16, 'gatstaf arsonists': 0.1, 'lys alana scarblade': 0.1, "asha's favor": 0.22, 'depala, pilot exemplar': 0.21, 'gatstaf ravagers': 0.1, 'scarland thrinax': 0.1, 'long road home': 0.19, 'imi statue': 0.24, 'scar': 0.18, 'charging troll': 0.1, 'fearless halberdier': 0.1, 'scandalmonger': 0.15, 'hooded assassin': 0.04, 'sharpened pitchfork': 0.12, 'volcanic wind': 0.17, 'immolating glare': 0.08, 'scampering scorcher': 0.07, 'scalding salamander': 0.22, "minions' murmurs": 0.26, 'break asunder': 0.12, 'defensive formation': 0.26, 'unstable footing': 0.1, "multani's harmony": 0.17, "kiora's dismissal": 0.11, 'faerie tauntings': 0.27, 'qarsi deceiver': 0.1, 'megatog': 0.22, 'unstable frontier': 0.15, "trapmaker's snare": 0.11, 'reign of terror': 0.11, 'protean raider': 0.72, 'unnatural endurance': 0.07, 'pyretic hunter': 0.07, 'ardent recruit': 0.13, 'haazda marshal': 0.09, 'faerie vandal': 0.1, 'truefire paladin': 0.11, 'accursed horde': 0.08, "basri's solidarity": 0.08, 'barrenton medic': 0.06, 'centaur courser': 0.01, 'stormwing dragon': 0.16, 'spectral grasp': 0.28, 'bond of insight': 0.09, 'quiet disrepair': 0.14, 'reckless wurm': 0.02, 'valor made real': 0.09, 'quest for the gemblades': 0.1, 'boros guildmage': 0.17, 'mudhole': 0.32, 'force void': 0.09, 'soaring seacliff': 0.04, 'izzet chronarch': 0.25, 'basal thrull': 0.09, 'gustcloak savior': 0.19, 'dramatic rescue': 0.03, 'renowned weaponsmith': 0.04, 'enslaved scout': 0.11, "dralnu's pet": 0.22, 'wormfang drake': 0.15, 'fight with fire': 0.07, 'goblin grappler': 0.09, 'enslaved horror': 0.16, 'sludge strider': 0.18, 'sliver construct': 0.23, 'cogwork assembler': 0.05, 'master of arms': 0.13, 'cavalry pegasus': 0.06, 'vedalken ghoul': 0.14, 'irregular cohort': 0.14, 'happily ever after': 0.09, 'vectis agents': 0.1, 'commence the endgame': 0.23, 'psychic rebuttal': 0.13, 'memorial to unity': 0.11, 'smoldering werewolf': 0.2, 'gorilla war cry': 0.08, 'ambassador oak': 0.02, 'mutiny': 0.05, 'battering sliver': 0.11, 'celestial flare': 0.05, 'relic putrescence': 0.1, 'relic bane': 0.09, 'putrefaction': 0.18, 'dawn to dusk': 0.1, 'crater elemental': 0.13, 'lifespinner': 0.3, 'lifesmith': 0.06, 'hallow': 0.25, 'mycosynth fiend': 0.13, 'isolation zone': 0.08, 'remote farm': 0.23, 'mycologist': 0.04, 'fireblade artist': 0.08, 'latchkey faerie': 0.04, 'trolls of tel-jilad': 0.1, 'urborg syphon-mage': 0.01, 'rakeclaw gargantuan': 0.07, 'league guildmage': 0.09, 'legions of lim-dûl': 0.08, 'soulbright flamekin': 0.1, 'abbey matron': 0.1, 'manalith': 0.1, 'sungrass egg': 0.21, "rakshasa's disdain": 0.13, "embalmer's tools": 0.21, 'demonmail hauberk': 0.11, "archers' parapet": 0.05, "master's call": 0.09, 'thornscape familiar': 0.19, 'groundshaker sliver': 0.2, 'barbed field': 0.13, 'soultether golem': 0.1, 'unyaro griffin': 0.13, 'moldervine cloak': 0.17, 'dragon-scarred bear': 0.08, 'barbed battlegear': 0.09, 'gravelgill duo': 0.11, 'molten firebird': 0.19, 'darkwatch elves': 0.12, 'spark mage': 0.63, "archfiend's vessel": 0.2, 'jawbone skulkin': 0.22, 'jasmine seer': 0.2, 'thought collapse': 0.24, 'rally the peasants': 0.12, 'stormscape familiar': 0.38, 'demonic taskmaster': 0.12, 'dark intimations': 0.24, 'moment of silence': 0.27, 'moment of heroism': 0.04, 'echoes of the kin tree': 0.1, 'moonlace': 0.35, "jabari's banner": 0.12, 'cerebral eruption': 0.19, 'gahiji, honored one': 2.67, "raff capashen, ship's mage": 0.16, 'flameshot': 0.13, "specter's shroud": 0.23, 'elvish house party': 0.25, 'bar the door': 0.18, 'arctic nishoba': 0.14, 'fortify': 0.01, 'radiant kavu': 0.25, 'guardian shield-bearer': 0.02, 'mogg cannon': 0.13, 'reckless spite': 0.02, 'master splicer': 0.09, 'song of serenity': 0.19, 'cephalid retainer': 0.25, 'yavimaya gnats': 0.15, 'songstitcher': 0.14, 'lay claim': 0.14, 'guardians of akrasa': 0.06, 'ragged veins': 0.17, 'rain of thorns': 0.1, "jace's triumph": 0.05, 'jackal familiar': 0.17, 'archweaver': 0.1, 'archway angel': 0.09, "domri's ambush": 0.14, 'gateway plaza': 0.11, 'jeering homunculus': 0.08, 'garrulous sycophant': 0.11, 'razortooth rats': 0.1, 'barkhide troll': 0.12, 'bone picker': 0.13, 'cinderhaze wretch': 0.2, 'geothermal crevice': 0.2, "jace's ingenuity": 0.1, 'sunlit hoplite': 0.12, 'soul kiss': 0.13, 'grunn, the lonely king': 0.11, 'ebony treefolk': 0.19, 'ember swallower': 0.14, 'tangleclaw werewolf': 0.16, 'jirina kudro': 0.56, 'riddlesmith': 0.23, 'battlefield thaumaturge': 0.16, 'battlefront krushok': 0.1, 'malakir soothsayer': 0.07, 'coordinated assault': 0.08, 'keldon arsonist': 0.13, 'angelic rocket': 0.25, 'nagging thoughts': 0.05, 'spellshift': 0.21, 'malakir cullblade': 0.26, 'mercurial pretender': 0.26, 'skyship stalker': 0.08, 'merfolk branchwalker': 0.18, 'adamant will': 0.02, "rhonas's last stand": 0.14, 'dead weight': 0.02, "witch's vengeance": 0.16, 'gearshift ace': 0.1, 'foundry of the consuls': 0.12, 'coast watcher': 0.08, 'veilborn ghoul': 0.06, 'allied strategies': 0.12, 'enduring scalelord': 0.08, 'embodiment of fury': 0.13, 'stingmoggie': 0.07, 'alms of the vein': 0.21, 'inviolability': 0.16, 'wizard replica': 0.19, 'battlewise hoplite': 0.1, 'nantuko blightcutter': 0.25, 'skull catapult': 0.09, 'revive': 0.09, 'foul renewal': 0.12, 'skull rend': 0.12, 'grazing gladehart': 0.26, 'rift elemental': 0.02, 'malachite talisman': 0.18, 'swamp mosquito': 0.38, 'rewards of diversity': 0.22, "avacyn's collar": 0.08, 'battle strain': 0.16, 'ensouled scimitar': 0.21, 'thunderblade charge': 0.21, 'choking vines': 0.08, 'the big idea': 0.24, 'gift of the deity': 0.14, 'battleground geist': 0.06, 'harsh scrutiny': 0.16, 'name dropping': 0.26, 'venerable knight': 0.1, 'verdant eidolon': 0.04, 'jiwari, the earth aflame': 0.24, 'bramblesnap': 0.1, 'skyhunter cub': 0.11, 'jiang yanggu, wildcrafter': 0.24, 'rhox pikemaster': 0.13, 'rings a bell': 0.1, 'the first eruption': 0.12, 'graceful antelope': 0.33, 'dakra mystic': 0.23, 'necravolver': 0.21, 'steelform sliver': 0.23, 'death stroke': 0.1, 'prophetic ravings': 0.05, 'makeshift munitions': 0.02, 'press into service': 0.1, 'invasive species': 0.05, 'rhystic scrying': 0.14, 'dragon blood': 0.25, 'woodland changeling': 0.9, 'fit of rage': 0.06, 'due respect': 0.1, "summoner's bane": 0.1, 'ribbons of the reikai': 0.28, 'ire shaman': 0.1, 'stench of decay': 0.07, 'natural connection': 0.01, 'flowstone overseer': 0.2, 'bramble elemental': 0.1, 'sporecrown thallid': 0.26, 'ribbons of night': 0.11, 'dragonrage': 0.14, 'kraken of the straits': 0.26, 'paragon of new dawns': 0.15, 'arctic aven': 0.09, 'fog elemental': 0.1, 'blessed breath': 0.19, 'sea spirit': 0.09, "raiders' spoils": 0.09, 'feiyi snake': 0.09, 'grumgully, the generous': 0.17, 'mind rake': 0.06, 'overwhelmed apprentice': 0.17, 'aerie mystics': 0.11, 'ridgescale tusker': 0.12, 'chimeric mass': 0.28, 'bramblecrush': 0.1, 'merrow witsniper': 0.12, 'fade into antiquity': 0.04, 'tropical storm': 0.17, 'merciless javelineer': 0.09, 'maze abomination': 0.08, "warleader's helix": 0.11, 'blossoming wreath': 0.09, 'kessig recluse': 0.16, 'ley weaver': 0.43, 'briarknit kami': 0.22, 'agility': 0.11, 'haunted angel': 0.14, 'controvert': 0.18, 'horrifying revelation': 0.07, 'painsmith': 0.03, 'brass secretary': 0.14, 'ashen-skin zubera': 0.19, 'qumulox': 0.15, 'haunted cadaver': 0.07, 'guardian of tazeem': 0.19, 'arctic wolves': 0.14, 'screeching bat': 0.12, 'guardian of cloverdell': 0.14, 'scrivener': 0.1, 'wasp of the bitter end': 0.16, 'deepcavern imp': 0.01, 'etherium astrolabe': 0.09, 'terrarion': 0.14, 'chilling apparition': 0.19, 'guardian of the ages': 0.15, 'daru encampment': 0.25, 'bloodfire infusion': 0.09, "butcher's glee": 0.09, 'ragefire': 0.15, 'watcher of the spheres': 0.21, 'coalition honor guard': 0.09, 'dwarven soldier': 0.04, 'scourge of the nobilis': 0.18, 'trokin high guard': 0.08, 'exultant skymarcher': 0.01, 'wind zendikon': 0.1, 'gift of paradise': 0.03, 'cleansing beam': 0.06, 'headstrong brute': 0.02, 'grisly spectacle': 0.09, 'copper carapace': 0.03, 'rapacious dragon': 0.14, 'rally the righteous': 0.21, 'prey upon': 0.05, 'rank and file': 0.06, 'frontline strategist': 0.11, 'turn to frog': 0.1, 'eternal skylord': 0.1, 'clutch of currents': 0.04, 'deathforge shaman': 0.09, 'hunting moa': 0.1, 'wall of mist': 0.04, 'emerald charm': 0.3, 'tattermunge witch': 0.07, 'genju of the fens': 0.16, 'familiar ground': 0.23, 'bloodmad vampire': 0.16, 'justice': 0.1, 'learn from the past': 0.22, 'angel of vitality': 1.21, 'predatory impetus': 0.02, 'dark nourishment': 0.05, 'grind': 0.14, 'wirewood pride': 0.15, 'segmented wurm': 0.19, 'false memories': 0.22, 'karoo meerkat': 0.15, 'mark of the oni': 0.3, 'stormrider rig': 0.1, 'leave no trace': 0.27, 'tar fiend': 0.13, 'earsplitting rats': 0.16, 'leaping master': 0.04, 'ramosian commander': 0.14, 'break through the line': 0.12, 'trip noose': 0.12, 'seek the wilds': 0.03, 'confiscation coup': 0.11, 'wall of faith': 0.12, 'wishmonger': 0.24, "seekers' squire": 0.06, 'order': 0.08, 'gallows warden': 0.08, 'hunter of eyeblights': 0.24, 'split screen': 0.33, 'fan bearer': 0.03, 'parhelion ii': 0.23, "wanderer's twig": 0.32, 'mercurial geists': 0.09, 'aim high': 0.08, 'possessed aven': 0.23, 'ovalchase daredevil': 0.9, 'searing rays': 0.13, 'dragonloft idol': 0.07, 'possessed centaur': 0.24, 'searing touch': 0.12, 'thorn thallid': 0.09, 'ashmouth hound': 0.1, "ulamog's nullifier": 0.12, 'lead golem': 0.09, 'overrule': 0.12, 'sealock monster': 0.11, 'riftmarked knight': 0.03, 'cleaving sliver': 0.11, 'roar of the kha': 0.14, 'awesome presence': 0.11, 'aspect of gorgon': 0.15, 'fallow earth': 0.11, 'armor thrull': 0.1, 'river sneak': 0.1, 'woebearer': 0.12, 'head to head': 0.18, 'headhunter': 0.14, 'orzhov euthanist': 0.07, 'orzhov enforcer': 0.27, 'daxos, blessed by the sun': 0.41, 'goblin kites': 0.15, 'pride guardian': 0.1, 'hunted wumpus': 0.08, 'turn': 0.06, 'breath of malfegor': 0.21, 'rathi trapper': 0.01, 'trophy hunter': 0.12, 'conduit of emrakul': 0.23, 'ground assault': 0.07, 'conduit of storms': 0.23, 'hawkeater moth': 0.2, 'orzhova, the church of deals': 0.17, 'bloodhunter bat': 0.02, 'withstand death': 0.29, 'orzhov locket': 0.24, 'thunderous might': 0.09, 'blessed orator': 0.1, 'geist snatch': 0.06, 'pitchstone wall': 0.15, 'temporal fissure': 0.37, 'phyrexian boon': 0.09, 'stalking vampire': 0.12, 'drastic revelation': 0.09, 'kathari bomber': 0.09, 'drake hatchling': 0.06, 'grief tyrant': 0.14, 'fateful showdown': 0.25, 'goblin taskmaster': 0.08, 'llanowar behemoth': 0.17, 'act of aggression': 0.24, 'sacred excavation': 0.1, 'highland giant': 0.16, 'hamlet captain': 0.09, 'stitchwing skaab': 0.09, 'the crowd goes wild': 0.11, 'acrobatic maneuver': 0.09, 'twins of maurer estate': 0.09, 'halo hunter': 0.22, 'miasmic mummy': 0.07, 'fate foretold': 0.03, 'sacred wolf': 0.11, 'gravepurge': 0.13, 'elemental appeal': 0.2, 'tidal influence': 0.14, 'grateful apparition': 0.21, 'krovikan elementalist': 0.12, 'phantasmal mount': 0.12, 'hada spy patrol': 0.15, "explorer's scope": 0.05, 'curse of oblivion': 0.15, 'sanctum of fruitful harvest': 0.3, 'aether figment': 0.15, 'sanctum of stone fangs': 0.48, 'sanctum plowbeast': 0.14, 'thunder wall': 0.12, 'rotting giant': 0.13, 'dust': 0.14, 'azorius keyrune': 0.13, 'fodder cannon': 0.1, 'dead revels': 0.03, 'harnessed lightning': 0.18, 'stir the grave': 0.16, 'dirty wererat': 0.15, 'hissing miasma': 0.75, 'angelic curator': 0.03, 'sacred armory': 0.13, 'resolute blademaster': 0.13, "karametra's blessing": 0.04, 'resolute watchdog': 0.35, 'psionic gift': 0.23, 'word of blasting': 0.1, 'why': 0.12, 'who': 0.14, 'curse of vitality': 0.46, 'expedite': 0.03, 'hickory woodlot': 0.24, 'resilient khenra': 0.18, 'phytoburst': 0.08, 'dust stalker': 0.15, 'restless apparition': 0.09, 'tenth district legionnaire': 0.19, "woodweaver's puzzleknot": 0.04, 'woolly mammoths': 0.05, 'fall of the hammer': 0.18, 'retraction helix': 0.09, 'harbor bandit': 0.12, 'azorius locket': 0.1, 'balduvian dead': 0.08, 'provoke': 0.11, 'griffin guide': 0.02, 'hankyu': 0.25, 'repel the abominable': 0.17, 'flame burst': 0.09, 'repopulate': 0.18, 'blood divination': 0.14, 'kavu mauler': 0.26, 'cogwork librarian': 0.25, 'ruthless sniper': 0.21, 'forcemage advocate': 0.14, 'curse of thirst': 0.46, 'tempting licid': 0.15, "pirate's prize": 0.2, 'renounce': 0.2, 'piston sledge': 0.09, 'harmattan efreet': 0.13, 'pit keeper': 0.01, 'psychic spiral': 0.24, "kefnet's monument": 0.28, 'hands of binding': 0.1, 'dreams of the dead': 0.12, 'fatal blow': 0.07, 'ghitu chronicler': 0.02, 'living lore': 0.01, 'rustwing falcon': 0.06, 'ruthless deathfang': 0.07, "kruphix's insight": 0.14, 'gravebane zombie': 0.14, 'saving grasp': 0.06, 'gibbering fiend': 0.1, 'martial glory': 0.07, 'grave consequences': 0.23, 'blighted cataract': 0.04, 'weather the storm': 0.16, 'wear away': 0.12, 'squall drifter': 0.12, 'savvy hunter': 0.06, 'scab-clan mauler': 0.08, 'honorable passage': 0.22, 'scalding devil': 0.08, 'flowstone flood': 0.15, 'red-hot hottie': 0.24, 'weatherseed elf': 0.2, 'brimstone trebuchet': 0.02, 'thermopod': 0.62, 'dread drone': 0.09, 'quagmire lamprey': 0.1, 'drift of the dead': 0.12, 'refocus': 0.12, 'reflex sliver': 0.08, 'squeaking pie sneak': 0.13, 'lantern spirit': 0.07, 'merseine': 0.11, 'keeper of the mind': 0.16, 'arbalest elite': 0.07, 'blight sickle': 0.22, 'reclaiming vines': 0.04, "burning sun's avatar": 0.23, "gaea's might": 0.1, 'scatter the seeds': 0.17, 'greenseeker': 0.01, 'quicksmith spy': 0.19, 'scavenger drake': 0.11, 'guild feud': 0.16, 'patron of the wild': 0.12, 'hatchery spider': 0.2, "ugin's insight": 0.17, 'colossal dreadmaw': 0.03, 'brainspoil': 0.23, 'hell-bent raider': 0.27, 'goblin cannon': 0.24, 'spy network': 0.16, 'thief of hope': 0.08, 'guilty conscience': 0.23, 'quicksilver dagger': 0.11, 'ronom unicorn': 0.01, 'academy elite': 0.15, 'ronin cliffrider': 0.26, 'cooperation': 0.07, 'burn': 0.06, 'recumbent bliss': 0.15, 'furyblade vampire': 0.12, 'bond of revival': 0.08, 'geistblast': 0.09, 'scars of the veteran': 0.1, 'rune of protection: green': 0.14, 'leyline prowler': 0.14, "lim-dûl's hex": 0.23, 'evangel of heliod': 0.11, 'faultgrinder': 0.17, 'kemuri-onna': 0.22, 'gyre engineer': 0.12, 'sapphire charm': 0.19, 'sapphire drake': 0.1, 'dream fighter': 0.09, 'ekundu griffin': 0.06, 'what': 0.14, 'mighty emergence': 0.1, "colfenor's plans": 0.34, 'faith of the devoted': 0.11, 'stone spirit': 0.1, 'guul draz overseer': 0.16, 'wirecat': 0.17, 'blinding beam': 0.11, 'tidal flats': 0.16, 'llanowar sentinel': 0.12, 'wrecking ball': 0.11, 'baleful ammit': 0.09, 'staunch defenders': 0.03, 'revoke existence': 0.05, 'reward the faithful': 0.13, 'goblin tunneler': 0.1, 'fathom seer': 0.01, 'where': 0.12, 'squirrel-powered scheme': 0.33, 'cold snap': 0.13, 'when': 0.12, 'time and tide': 0.22, 'cyclical evolution': 0.14, 'regicide': 0.05, 'domestication': 0.14, 'rootwater depths': 0.12, 'thallid shell-dweller': 0.07, 'exotic disease': 0.11, "accorder's shield": 0.17, 'arbor colossus': 0.19, 'blightspeaker': 0.01, 'gemini engine': 0.18, 'wildfire eternal': 0.25, 'welkin hawk': 0.12, 'stone-seeder hierophant': 0.25, 'arvad the cursed': 0.27, "squee's toy": 0.12, 'plant': 0.18, 'lochmere serpent': 0.23, "squee's embrace": 0.15, 'déjà vu': 0.25, 'sundering growth': 0.12, 'elven fortress': 0.14, 'granulate': 0.22, 'necrogen spellbomb': 0.16, "suq'ata assassin": 0.2, 'gird for battle': 0.1, 'crumble to dust': 0.09, 'battered golem': 0.22, 'gods willing': 0.1, 'algae gharial': 0.07, "gonti's machinations": 0.19, 'callous giant': 0.25, 'lurking automaton': 0.11, 'vessel of endless rest': 0.19, 'siege modification': 0.11, 'necromantic summons': 0.12, 'akki coalflinger': 0.27, 'glacial revelation': 0.21, 'vampire hounds': 0.12, 'vitu-ghazi guildmage': 0.02, 'misinformation': 0.12, 'feral prowler': 0.1, 'freyalise supplicant': 0.14, 'aven wind guide': 0.2, 'lurking jackals': 0.1, 'volunteer reserves': 0.17, 'indrik stomphowler': 0.14, 'oblivion': 0.22, 'clam-i-am': 0.19, 'illusionary servant': 0.14, 'aurochs herd': 0.11, 'golgari cluestone': 0.1, 'nearheath pilgrim': 0.11, 'shambling strider': 0.05, 'vertigo': 0.15, "shanna, sisay's legacy": 0.19, 'authority': 0.09, 'mine excavation': 0.21, 'skinthinner': 0.01, 'callow jushi': 0.22, 'necrite': 0.03, 'iterative analysis': 0.15, 'enclave elite': 0.05, 'gloomdrifter': 0.17, 'muzzle': 0.09, 'mizzium skin': 0.18, "captain's hook": 0.19, "vraska, swarm's eminence": 0.24, 'modular monstrosity': 0.17, 'lunar force': 0.11, 'soldevi machinist': 0.12, 'glitterfang': 0.12, 'into the maw of hell': 0.12, 'ninth bridge patrol': 0.01, 'disperse': 0.03, 'soldevi sentry': 0.12, 'ichor slick': 0.01, 'jeskai elder': 0.01, 'anointer of champions': 0.09, 'conifer wurm': 0.08, "oko's hospitality": 0.13, 'mana prism': 0.1, 'tajuru warcaller': 0.08, 'vampire aristocrat': 0.08, 'solemn recruit': 0.08, 'astral steel': 0.13, 'basilica bell-haunt': 0.15, 'sight of the scalelords': 0.39, 'energy arc': 0.12, 'befoul': 0.13, 'disinformation campaign': 0.12, 'tower of murmurs': 0.23, 'trap digger': 0.19, 'golgari keyrune': 0.15, "multani's decree": 0.15, 'unraveling mummy': 0.09, 'defiant greatmaw': 0.08, 'skeletal wurm': 0.14, "chandra's spitfire": 0.08, 'vitalizing cascade': 0.26, 'consuming ferocity': 0.08, 'carapace': 0.08, 'shivan zombie': 0.09, 'vital splicer': 0.1, 'mindstab thrull': 0.07, "cenn's enlistment": 0.1, 'sift': 0.05, 'surprise deployment': 0.19, 'illusory ambusher': 0.09, 'symbiotic elf': 0.12, 'sweatworks brawler': 0.02, 'ghostly changeling': 0.1, 'universal automaton': 0.35, 'vodalian mage': 0.18, 'vodalian soldiers': 0.05, 'nomad stadium': 0.23, 'shriekgeist': 0.08, 'veil of birds': 0.08, 'natural state': 0.15, "shiv's embrace": 0.07, 'fiery impulse': 0.11, 'distress': 0.15, "nature's blessing": 0.12, 'mystic meditation': 0.07, 'irrigation ditch': 0.14, 'elvish rejuvenator': 0.1, 'maalfeld twins': 0.01, 'alluring siren': 0.08, 'shielding plax': 0.02, 'irresistible prey': 0.04, 'slip through space': 0.21, 'mystic repeal': 0.03, 'impetuous protege': 0.07, 'battle rampart': 0.01, 'contaminated bond': 0.09, 'mad ratter': 0.04, 'skyward eye prophets': 0.21, 'vengeful archon': 0.23, 'iron tusk elephant': 0.15, 'crown of suspicion': 0.09, 'jhovall rider': 0.11, 'mistform skyreaver': 0.18, 'voice of the provinces': 0.09, 'shivan raptor': 0.16, 'skyshroud cutter': 0.1, 'chaos': 0.08, 'voice of duty': 0.24, 'slag fiend': 0.61, 'slash of talons': 0.01, 'battle sliver': 0.3, 'skyknight vanguard': 0.08, 'slay': 0.1, 'touch of the eternal': 0.14, 'venarian glimmer': 0.13, 'skymark roc': 0.07, 'civic wayfinder': 0.02, 'make a stand': 0.19, 'sly requisitioner': 0.1, 'mardu charm': 0.11, 'skittering horror': 0.08, 'amateur auteur': 0.15, "akroma's blessing": 0.12, 'devouring deep': 0.54, 'vizier of deferment': 0.09, 'bereavement': 0.15, 'swift warden': 0.1, 'shrivel': 0.06, 'ob nixilis, the hate-twisted': 0.29, 'capashen standard': 0.15, 'apostle of purifying light': 0.07, 'obelisk of naya': 0.13, "miner's bane": 0.04, 'clairvoyance': 0.13, 'myr adapter': 0.11, 'volley veteran': 0.13, "akroma's devoted": 0.26, 'nausea': 0.06, 'immolation shaman': 0.2, 'apocalypse demon': 0.17, 'vastwood zendikon': 0.06, 'mistral charger': 0.14, 'verdant haven': 0.09, 'aven warcraft': 0.15, 'dumb ass': 0.23, 'deepwood ghoul': 0.1, 'greater harvester': 0.21, 'oak street innkeeper': 0.12, 'mistmoon griffin': 0.12, 'nyxborn shieldmate': 0.05, 'atzocan seer': 0.27, 'oakhame adversary': 0.09, 'suspension field': 0.08, 'maraleaf pixie': 0.1, "death's duet": 0.12, 'consign': 0.22, 'slith predator': 0.1, 'carrier thrall': 0.22, 'catalyst elemental': 0.01, "vassal's duty": 0.23, 'walk the plank': 0.06, 'mortal obstinacy': 0.09, "tracker's instincts": 0.11, 'oran-rief recluse': 0.13, 'chain of acid': 0.47, 'untamed kavu': 0.12, 'flaying tendrils': 0.08, 'appetite for brains': 0.06, 'ghoulraiser': 0.12, 'appeal': 0.09, 'soul link': 0.17, 'vexing beetle': 0.23, 'hypnotic cloud': 0.08, "oracle's insight": 0.08, 'fortified rampart': 0.13, 'chainweb aracnir': 0.02, 'despoil': 0.09, 'nezumi cutthroat': 0.07, 'mindlash sliver': 0.23, 'icatian priest': 0.09, 'sunflare shaman': 0.09, 'magmatic core': 0.09, 'dauthi mindripper': 0.18, 'essence scatter': 0.02, 'oni of wild places': 0.22, 'mogg jailer': 0.1, 'glint-sleeve siphoner': 0.26, 'carnival hellsteed': 0.14, 'unflinching courage': 0.15, 'fever charm': 0.13, 'distemper of the blood': 0.18, 'cinder elemental': 0.09, 'manakin': 0.29, 'aura extraction': 0.13, 'carry away': 0.13, 'vigean hydropon': 0.11, 'vine mare': 0.13, 'moonglove winnower': 0.09, 'nether horror': 0.03, 'ephemeral shields': 0.1, 'soul tithe': 0.1, 'simoon': 0.14, 'kjeldoran elite guard': 0.03, 'selfless exorcist': 0.19, 'goldnight commander': 0.1, 'single combat': 0.35, 'crypt creeper': 0.03, 'walker of the wastes': 0.2, "oona's gatewarden": 0.23, "oona's grace": 0.08, 'monk realist': 0.12, 'sinuous vermin': 0.25, 'anax, hardened in the forge': 0.1, 'morbid bloom': 0.2, 'aven archer': 0.12, 'viashino cutthroat': 0.12, 'mirror wall': 0.1, 'send to sleep': 0.07, 'awakened amalgam': 0.16, "ajani's comrade": 0.21, 'cerulean drake': 0.12, 'cartouche of knowledge': 0.09, 'court street denizen': 0.01, 'crimson roc': 0.12, 'sultai soothsayer': 0.06, 'deranged outcast': 0.15, 'endless obedience': 0.07, 'cephalid broker': 0.11, 'selective memory': 0.52, 'trained caracal': 0.08, 'auriok survivors': 0.09, 'crush underfoot': 0.13, 'molten slagheap': 0.07, 'tangle asp': 0.13, 'valor in akros': 0.1, 'festering wound': 0.17, 'carom': 0.1, 'vagrant plowbeasts': 0.12, 'moldervine reclamation': 0.26, 'valley rannet': 0.09, 'graypelt hunter': 0.06, 'unwind': 0.47, 'sunscorched desert': 0.15, 'fleetfeather sandals': 0.21, 'orcish cannoneers': 0.06, 'cadaverous knight': 0.15, 'gleam of battle': 0.11, 'serpentine spike': 0.09, 'cramped bunker': 0.17, 'apathy': 0.13, 'call the scions': 0.07, 'gravitic punch': 0.05, 'kitsune palliator': 0.15, 'fledgling mawcor': 0.23, 'viridian joiner': 0.24, 'luminesce': 0.1, "traveler's cloak": 0.14, 'nightwind glider': 0.15, 'luminescent rain': 0.23, 'essence leak': 0.12, "mangara's blessing": 0.22, 'wakedancer': 0.08, 'kor dirge': 0.04, "emrakul's influence": 0.11, 'fire-belly changeling': 0.4, 'chainbreaker': 0.24, 'unbridled growth': 0.1, "olivia's bloodsworn": 0.21, 'ondu champion': 0.05, 'mana seism': 0.13, 'updraft': 0.08, 'duplication device': 0.24, 'crafty cutpurse': 0.2, 'dovin, hand of control': 0.19, 'douse': 0.24, 'fragmentize': 0.14, 'wizened snitches': 0.27, 'thallid germinator': 0.02, 'dread defiler': 0.17, 'foundry champion': 0.1, 'exert influence': 0.1, 'carrion wall': 0.24, 'insidious bookworms': 0.11, 'wildsize': 0.01, 'trail of evidence': 0.27, 'verdant rebirth': 0.1, 'tome raider': 0.04, 'plated crusher': 0.08, 'blue scarab': 0.17, 'adarkar windform': 0.22, 'simic ragworm': 0.09, 'bramblefort fink': 0.07, 'rowan treefolk': 0.1, 'mirrorwood treefolk': 0.12, 'brimstone mage': 0.12, 'plagued rusalka': 0.1, 'summon the school': 0.21, 'rhythmic water vortex': 0.13, 'branded howler': 0.1, 'divination': 0.04, 'venomous changeling': 0.05, 'primeval light': 0.23, 'crimson muckwader': 0.07, 'lab rats': 0.11, 'sky tether': 0.04, 'emblem of the warmind': 0.24, 'hateful eidolon': 0.1, 'lantern kami': 0.09, 'vile manifestation': 0.1, 'statute of denial': 0.05, 'new horizons': 0.09, 'creature guy': 0.27, 'skyscanner': 0.03, 'wildfire emissary': 0.02, 'brass-talon chimera': 0.13, 'ridgetop raptor': 0.15, "planeswalker's mirth": 0.25, 'alpine houndmaster': 0.2, 'skyrider elf': 0.08, 'hellraiser goblin': 0.12, 'kashi-tribe reaver': 0.13, 'battlewand oak': 0.17, 'foulmire knight': 0.1, 'uninvited geist': 0.1, 'vile rebirth': 0.08, 'unimpeded trespasser': 0.1, 'dutiful attendant': 0.02, 'trail of crumbs': 0.15, 'ior ruin expedition': 0.02, 'exclusion ritual': 0.14, 'dub': 0.02, 'nemesis trap': 0.1, 'stream of thought': 0.05, 'corrupted roots': 0.09, 'heartlash cinder': 0.1, 'fanatic of xenagos': 0.07, 'misery charm': 0.13, 'into the void': 0.04, 'necropouncer': 0.12, 'thundering tanadon': 0.08, 'angelic protector': 0.05, 'bloodfray giant': 0.08, "ephara's enlightenment": 0.08, 'bloodfire enforcers': 0.06, 'rise from the tides': 0.19, 'commune with the gods': 0.18, 'sphere of grace': 0.14, 'skeleton key': 0.19, 'armored warhorse': 0.07, 'precognitive perception': 0.27, 'merfolk raiders': 0.09, 'rite of undoing': 0.11, 'merfolk skyscout': 0.1, 'into the core': 0.06, 'baird, steward of argive': 0.41, 'spellweaver eternal': 0.05, 'intimidation': 0.26, 'possessed nomad': 0.25, 'possessed skaab': 0.2, 'kitsune dawnblade': 0.15, 'steam spitter': 0.24, "alchemist's greeting": 0.02, 'heavy arbalest': 0.1, 'pounce': 0.19, 'windscouter': 0.12, 'breath of dreams': 0.16, 'join shields': 0.1, 'kitsune blademaster': 0.22, 'crested herdcaller': 0.11, 'merfolk skydiver': 0.2, 'heartwood treefolk': 0.22, 'windstorm': 0.19, 'lagonna-band storyteller': 0.01, "predator's rapport": 0.07, "sisay's ingenuity": 0.15, 'cloudcrown oak': 0.06, 'price of fame': 0.24, 'vicious rumors': 0.27, 'vicious hunger': 0.12, 'beast in show': 0.14, 'tranquil domain': 0.08, 'viashino slaughtermaster': 0.1, "jolrael's centaur": 0.07, 'plumes of peace': 0.09, 'viashino fangtail': 0.09, 'skirk shaman': 0.01, 'beacon bolt': 0.1, 'tibalt, rakish instigator': 0.24, 'architect of the untamed': 0.15, 'cystbearer': 0.18, 'skittering crustacean': 0.11, "winter's rest": 0.03, "liliana's indignation": 0.09, 'riptide mangler': 0.27, 'vex': 0.09, 'misstep': 0.11, 'bearer of overwhelming truths': 0.11, 'skinbrand goblin': 0.01, "siren's ruse": 0.23, 'wintermoor commander': 0.05, 'dreadbringer lampads': 0.07, 'fowl play': 0.26, 'wily bandar': 0.04, 'unified front': 0.07, "land aid '04": 0.21, 'lightning surge': 0.22, 'siona, captain of the pyleas': 0.1, "rofellos's gift": 0.2, 'advanced stitchwing': 0.08, 'advantageous proclamation': 0.18, 'ghastly remains': 0.19, 'foxfire': 0.09, 'tanglesap': 0.05, 'harsh sustenance': 0.09, 'dragon mask': 0.15, 'think twice': 0.06, 'soratami savant': 0.33, 'bonds of faith': 0.11, 'meandering towershell': 0.15, 'abzan beastmaster': 0.15, 'rebound': 0.11, 'guardian of the great conduit': 0.07, 'convicted killer': 0.1, 'guardian zendikon': 0.06, "yavimaya's embrace": 0.06, 'district guide': 0.04, 'mortiphobia': 0.12, 'valakut invoker': 0.01, 'enigmatic incarnation': 0.11, 'maze glider': 0.01, 'bone saw': 0.1, 'chilling shade': 0.17, 'maze rusher': 0.02, 'chittering doom': 0.39, "sorin's thirst": 0.11, "mortal's ardor": 0.09, 'meadowboon': 0.1, 'cower in fear': 0.02, 'crabapple cohort': 0.07, 'crack the earth': 0.21, 'lay bare the heart': 0.08, 'valduk, keeper of the flame': 0.22, 'redwood treefolk': 0.09, 'quickening licid': 0.12, 'bond of flourishing': 0.08, 'gladehart cavalry': 0.18, 'mobilized district': 0.2, 'dragon hatchling': 0.08, 'suntouched myr': 0.24, 'disturbing plot': 0.11, 'thicket crasher': 0.04, 'centaur battlemaster': 0.06, 'mtenda griffin': 0.2, 'consuming fervor': 0.1, 'basilica guards': 0.06, 'troubled healer': 0.06, 'grim guardian': 0.22, 'double play': 0.14, 'somberwald spider': 0.09, "lawmage's binding": 0.09, 'chill haunting': 0.1, 'flowstone mauler': 0.11, "angrath's ambusher": 0.17, 'soltari crusader': 0.2, 'eerie procession': 0.24, 'izzet locket': 0.08, 'solidarity': 0.17, 'sunspring expedition': 0.08, 'guildscorn ward': 0.03, "glissa's scorn": 0.07, 'barrow ghoul': 0.14, 'goblin motivator': 0.13, 'stoneshaker shaman': 0.64, 'gruul charm': 0.11, "ancestor's chosen": 0.06, 'rally of wings': 0.21, 'abbey gargoyles': 0.11, 'dimir cluestone': 0.15, 'treasure keeper': 0.1, 'lens of clarity': 0.08, 'grixis slavedriver': 0.06, 'sunhome guildmage': 0.08, 'goblin machinist': 0.13, 'momentum': 0.13, 'abandon hope': 0.25, 'sparksmith': 0.16, 'forlorn pseudamma': 0.12, 'molten frame': 0.06, 'flamestick courier': 0.1, 'desperate stand': 0.12, 'dega sanctuary': 0.15, "sovereign's bite": 0.1, 'stormscape battlemage': 0.09, 'deadeye plunderers': 0.18, 'ramosian sergeant': 0.23, 'soulless revival': 0.16, 'keeper of fables': 0.1, 'sparring construct': 0.07, 'doorkeeper': 0.11, 'dragon-style twins': 0.11, "stormcaller's boon": 0.08, 'ransack the lab': 0.11, 'thornwatch scarecrow': 0.15, 'borderland marauder': 0.01, 'ravnica at war': 0.21, 'leopard-spotted jiao': 0.08, 'anaba bodyguard': 0.06, 'deadbridge shaman': 0.07, 'edgewall innkeeper': 0.06, 'glint': 0.07, "jace's scrutiny": 0.04, 'rakdos locket': 0.17, 'despoiler of souls': 0.12, 'lethal sting': 0.05, 'morgue theft': 0.16, 'grusilda, monster masher': 0.32, 'rain of blades': 0.07, 'storm fleet spy': 0.07, 'raka sanctuary': 0.15, 'defiant elf': 0.15, 'rakdos keyrune': 0.14, 'cerulean wyvern': 0.14, 'leonin den-guard': 0.14, 'zhalfirin commander': 0.03, 'leafdrake roost': 0.12, "sunbringer's touch": 0.12, 'zephyr scribe': 0.05, 'soul swallower': 0.12, 'ursine fylgja': 0.52, 'footlight fiend': 0.09, 'quash': 0.1, 'sol grail': 0.11, 'menacing ogre': 0.17, 'last gasp': 0.02, 'bog initiate': 0.2, 'sustainer of the realm': 0.06, 'alter fate': 0.09, 'commencement of festivities': 0.04, 'retreat to valakut': 0.1, 'stolen by the fae': 0.24, 'bound in silence': 0.01, 'stoic champion': 0.11, 'ironroot warlord': 0.12, 'psychic barrier': 0.08, 'darba': 0.1, 'myr prototype': 0.2, 'worldheart phoenix': 0.15, 'cave of temptation': 0.14, 'kavu howler': 0.14, 'anthousa, setessan hero': 0.09, 'arlinn, voice of the pack': 0.31, 'throne warden': 0.1, 'mysterious pathlighter': 0.02, 'resize': 0.13, 'eland umbra': 0.22, 'reef shaman': 0.15, 'skyspear cavalry': 0.02, 'profane insight': 0.1, 'swab goblin': 0.17, 'thunder totem': 0.17, 'slaughter': 0.35, 'reverse engineer': 0.14, 'skywinder drake': 0.01, 'nameless one': 0.16, 'revitalize': 0.02, 'entangling trap': 0.1, 'harpoon sniper': 0.19, 'altac bloodseeker': 0.07, 'harrowing journey': 0.08, 'skyshroud falcon': 0.13, 'marang river skeleton': 0.12, "thassa's ire": 0.08, 'goblin racketeer': 0.09, 'kiss of the amesha': 0.05, 'hardy veteran': 0.02, 'malfunction': 0.02, 'woodland champion': 0.09, 'harmonic convergence': 0.13, 'act on impulse': 0.13, 'nahiri, storm of stone': 0.17, 'goblin psychopath': 0.14, "sleeper's guile": 0.15, 'slavering nulls': 0.13, 'pulse of murasa': 0.09, 'suppress': 0.14, 'boros keyrune': 0.13, 'foriysian totem': 0.16, 'murasa ranger': 0.03, 'manticore eternal': 0.03, 'spectral rider': 0.12, 'fairgrounds warden': 0.08, 'triton fortune hunter': 0.07, 'expunge': 0.11, 'moaning wall': 0.03, 'life burst': 0.14, 'angler drake': 0.09, 'murder investigation': 0.11, 'rejuvenate': 0.11, 'gwyllion hedge-mage': 0.1, 'faith unbroken': 0.03, 'unnatural aggression': 0.06, 'flame spirit': 0.07, 'daring sleuth': 0.11, 'darkthicket wolf': 0.11, 'glimmer of genius': 0.06, 'refraction trap': 0.05, 'snow hound': 0.12, 'cemetery recruitment': 0.34, 'snickering squirrel': 0.11, "ixalli's diviner": 0.03, "multani's acolyte": 0.23, 'reign of chaos': 0.14, 'pyromatics': 0.05, 'flowering field': 0.15, 'angrath, captain of chaos': 0.19, 'vampire envoy': 0.06, 'grim discovery': 0.09, 'smart ass': 0.2, 'halimar wavewatch': 0.14, 'hallar, the firefletcher': 0.09, 'borrowed hostility': 0.07, 'stratadon': 0.11, 'wreath of geists': 0.11, 'goblin oriflamme': 0.02, 'slow motion': 0.19, 'memorial to war': 0.02, 'flame wave': 0.08, 'renegade tactics': 0.04, 'puncture blast': 0.13, 'daring archaeologist': 0.1, 'elvish warrior': 0.1, 'gift of orzhova': 0.13, 'pygmy kavu': 0.11, 'murmurs from beyond': 0.19, 'battering craghorn': 0.25, "suq'ata lancer": 0.22, 'putrid goblin': 0.1, 'speedway fanatic': 0.08, 'gloom surgeon': 0.14, 'halcyon glaze': 0.18, 'diminish': 0.06, 'melting': 0.15, 'purple-crystal crab': 0.22, 'dodecapod': 0.15, 'chieftain en-dal': 0.15, 'graceful reprieve': 0.09, 'hollowsage': 0.15, 'wandering goblins': 0.08, 'drown in sorrow': 0.05, 'saprazzan legate': 0.15, 'fencing ace': 0.01, 'fugue': 0.07, 'teetering peaks': 0.1, 'impostor of the sixth pride': 0.05, 'tribal golem': 0.19, 'spikeshot goblin': 0.11, 'gnawing zombie': 0.11, 'perilous voyage': 0.09, 'stupefying touch': 0.1, 'unchecked growth': 0.14, 'tyrant of valakut': 0.14, 'serpent of the endless sea': 0.15, 'uncaged fury': 0.04, 'kheru bloodsucker': 0.1, 'chant of vitu-ghazi': 0.19, 'waker of the wilds': 0.1, 'voice of truth': 0.13, 'bellowing aegisaur': 0.24, 'voiceless spirit': 0.07, "in bolas's clutches": 0.16, 'search the city': 0.09, 'icatian scout': 0.03, 'diviner spirit': 0.11, 'kragma warcaller': 0.11, 'sealed fate': 0.24, 'pentarch ward': 0.12, 'totem speaker': 0.13, 'weight of spires': 0.11, 'locust swarm': 0.2, 'benalish heralds': 0.14, 'war report': 0.1, 'shimmering glasskite': 0.16, 'omega myr': 0.11, 'vulshok refugee': 0.06, 'erratic cyclops': 0.07, 'homarid warrior': 0.09, 'homarid': 0.14, 'sudden strength': 0.11, 'lumengrid augur': 0.17, 'eliminate the competition': 0.14, 'voidwalk': 0.23, 'noyan dar, roil shaper': 0.14, 'squelch': 0.32, 'chosen by heliod': 0.07, 'peregrination': 0.17, 'elephant ambush': 0.15, 'welder automaton': 0.02, 'shipwreck singer': 0.08, 'even the odds': 0.09, 'sarpadian empires, vol. vii': 0.29, 'jund hackblade': 0.22, 'voice of reason': 0.19, 'wall of torches': 0.06, 'krovikan mist': 0.14, 'goblin clearcutter': 0.16, 'akroan phalanx': 0.04, 'mire shade': 0.16, 'desert of the glorified': 0.14, 'electrostatic bolt': 0.11, 'kami of the painted road': 0.19, 'samite archer': 0.17, 'hungry spriggan': 0.03, 'brushstroke paintermage': 0.1, 'day': 0.16, 'talas scout': 0.24, 'opal acrolith': 0.1, 'midnight entourage': 0.1, 'bane alley broker': 0.09, 'icatian infantry': 0.13, 'hunted witness': 0.11, 'sailmonger': 0.14, 'torch slinger': 0.02, 'blistering barrier': 0.09, 'angel of deliverance': 0.14, 'samut, tyrant smasher': 0.17, 'sanctifier of souls': 0.11, 'desert of the true': 0.08, 'angelic captain': 0.1, 'shreds of sanity': 0.1, 'sandbar merfolk': 0.13, 'titanic bulvox': 0.14, 'sentinel totem': 0.09, 'shower of coals': 0.15, 'norritt': 0.11, 'symbol of unsummoning': 0.11, 'earthblighter': 0.16, 'shoving match': 0.14, 'holdout settlement': 0.21, 'sandsteppe mastodon': 0.12, 'tower gargoyle': 0.07, 'sentry oak': 0.12, 'shrewd hatchling': 0.06, 'whip vine': 0.12, 'phantasmal form': 0.01, 'sanctuary cat': 0.11, 'sanctum of calm waters': 0.27, 'chronic flooding': 0.12, 'shriek raptor': 0.12, 'desert of the indomitable': 0.2, 'sanctum of shattered heights': 0.28, 'sentinel dispatch': 0.11, 'our market research shows that players like really long card names so we made this card to have the absolute longest card name ever elemental': 0.21, 'devouring greed': 0.06, 'feeling of dread': 0.11, 'old-growth dryads': 0.15, 'corpse churn': 0.01, 'shambleshark': 0.08, 'illumination': 0.9, 'parasitic implant': 0.09, 'screeching skaab': 0.03, 'parapet': 0.1, 'ballista squad': 0.16, 'scorching lava': 0.09, 'tablet of the guilds': 0.2, 'gobbling ooze': 0.12, 'sudden impact': 0.13, 'blessing of the nephilim': 0.4, 'servant of tymaret': 0.07, 'illusory gains': 0.15, 'lust for war': 0.1, 'blessing of leeches': 0.53, 'waxing moon': 0.22, 'bamboozle': 0.24, 'waveskimmer aven': 0.05, "kaervek's hex": 0.13, 'longhorn firebeast': 0.05, 'wave-wing elemental': 0.04, 'canal courier': 0.07, 'hot fix': 0.15, 'waterveil cavern': 0.22, 'arashin cleric': 0.07, 'krark-clan shaman': 0.43, 'kraul harpooner': 0.05, 'gore vassal': 0.04, 'watchers of the dead': 0.1, 'sudden reclamation': 0.08, 'watcher sliver': 0.06, 'caller of gales': 0.05, 'better than one': 0.17, 'hornet sting': 0.06, 'scrapbasket': 0.22, 'shadowed caravel': 0.17, 'shadow guildmage': 0.15, 'krasis incubation': 0.06, 'springing tiger': 0.08, 'atinlay igpay': 0.22, 'scout the borders': 0.06, 'tormenting voice': 0.07, 'bestial menace': 0.08, 'pale rider of trostad': 0.11, 'screeching drake': 0.11, 'parallel thoughts': 0.96, 'mardu shadowspear': 0.15, 'bile urchin': 0.11, 'sewer rats': 0.17, 'paragon of the amesha': 0.16, 'teleportal': 0.24, 'undead executioner': 0.02, 'betrayal of flesh': 0.18, 'scour': 0.15, 'spring cleaning': 0.24, 'glassdust hulk': 0.08, 'forge devil': 0.1, 'hooting mandrills': 0.07, 'tainted well': 0.12, 'howling golem': 0.01, 'honed khopesh': 0.03, 'spincrusher': 0.2, 'torrent of fire': 0.09, 'impaler shrike': 0.08, 'agonizing memories': 0.11, 'conjured currency': 0.17, 'weathered bodyguards': 0.28, 'essence extraction': 0.06, 'greenwheel liberator': 0.11, 'cruel feeding': 0.05, 'shield of the realm': 0.08, "nylea's disciple": 0.06, 'arbiter of the ideal': 0.25, 'shield of the righteous': 0.2, 'icehide golem': 0.08, 'tempest of light': 0.12, 'frenzied tilling': 0.06, 'aethertide whale': 0.14, 'shenanigans': 0.1, 'sheltering prayers': 0.2, 'beneath the sands': 0.11, 'sawtooth loon': 0.21, 'burning palm efreet': 0.13, 'lumithread field': 0.16, "voyage's end": 0.05, 'contaminated ground': 0.06, "angel's tomb": 0.1, 'cunning': 0.06, 'obelisk of bant': 0.15, 'ashen firebeast': 0.28, 'patrol signaler': 0.22, 'charging tuskodon': 0.24, 'volcanic strength': 0.07, 'weaponcraft enthusiast': 0.21, 'frostweb spider': 0.17, 'gangrenous goliath': 0.23, 'syr carah, the bold': 0.15, "ajani's sunstriker": 0.15, 'strutting turkey': 0.1, 'imminent doom': 0.13, 'blastfire bolt': 0.03, 'chaos maw': 0.2, 'sage-eye avengers': 0.07, 'whitewater naiads': 0.1, 'kor chant': 0.05, 'hunting pack': 0.01, 'dawnray archer': 0.12, 'opportunistic dragon': 0.08, 'order of midnight': 0.09, 'selfless savior': 0.17, 'awakening of vitu-ghazi': 0.2, 'temur charger': 0.08, 'trench wurm': 0.21, "sphinx's decree": 0.11, 'signpost scarecrow': 0.1, 'nighthaze': 0.14, 'strength in numbers': 0.01, 'selfie preservation': 0.14, 'temur banner': 0.1, 'funeral pyre': 0.12, 'silent departure': 0.12, "magistrate's veto": 0.11, 'consulate dreadnought': 0.26, 'arrogant bloodlord': 0.13, 'sightless ghoul': 0.06, 'ordeal of purphoros': 0.08, "hieromancer's cage": 0.09, 'visionary augmenter': 0.07, 'mirror shield': 0.28, 'goretusk firebeast': 0.08, "pirate's pillage": 1.68, 'animate land': 0.24, 'mesmeric glare': 0.05, 'judge of currents': 0.21, "god-pharaoh's statue": 0.3, 'run amok': 0.01, 'azorius aethermage': 0.15, 'close quarters': 0.18, 'toymaker': 0.28, 'hurloon wrangler': 0.16, 'drunau corpse trawler': 0.13, 'confessor': 0.12, 'wicker witch': 0.07, 'depose': 0.08, 'nightscape battlemage': 0.23, 'talon trooper': 0.02, 'silumgar assassin': 0.06, 'greatsword': 0.17, 'rune of protection: blue': 0.14, 'vintara snapper': 0.17, 'mark of fury': 0.2, 'origin spellbomb': 0.11, 'viridian revel': 1.87, 'selesnya keyrune': 0.1, 'gilt-leaf winnower': 0.01, 'joven': 0.25, 'deploy': 0.08, 'subterranean hangar': 0.24, 'secrets of paradise': 0.12, 'infested roothold': 0.13, 'inheritance': 0.11, 'pilfered plans': 0.13, "farrel's zealot": 0.08, "karametra's favor": 0.12, 'crypt of the eternals': 0.15, 'rush of adrenaline': 0.08, "dream's grip": 0.46, 'hypnotic sprite': 0.05, 'toxic nim': 0.1, 'wild guess': 0.22, 'goldnight redeemer': 0.16, "marchesa's smuggler": 0.18, 'downdraft': 0.15, 'induced amnesia': 0.19, 'blood operative': 0.11, 'pitiless pontiff': 0.14, 'opaline unicorn': 0.14, "sidisi's faithful": 0.13, "selvala's enforcer": 0.08, 'night': 0.16, 'forbidden alchemy': 0.09, 'inexorable blob': 0.21, 'highspire infusion': 0.04, "nissa's judgment": 0.05, 'goblin spy': 0.12, 'inkfathom divers': 0.09, 'brink of disaster': 0.02, 'sibsig icebreakers': 0.06, 'induce paranoia': 0.2, 'whirler virtuoso': 0.11, 'goldenhide ox': 0.1, 'herald of kozilek': 0.23, 'herald of faith': 0.1, 'dichotomancy': 0.19, 'nivix barrier': 0.05, 'hinterland hermit': 0.12, 'hinterland scourge': 0.12, 'sage of the inward eye': 0.14, 'whirling catapult': 0.11, 'capashen unicorn': 0.15, 'juniper order druid': 0.11, 'kjeldoran pride': 0.1, 'gridlock': 0.07, 'frazzled editor': 0.27, 'tangle golem': 0.14, 'ghosts of the damned': 0.11, 'pitfall trap': 0.02, 'angelic favor': 0.13, 'assault zeppelid': 0.08, 'wall of resurgence': 0.1, 'dwarven vigilantes': 0.11, 'clockwork hydra': 0.03, 'stalking yeti': 0.1, 'seller of songbirds': 0.03, 'clockwork servant': 0.03, 'crocodile of the crossing': 0.05, 'ruham djinn': 0.14, 'vithian stinger': 0.1, 'granite shard': 0.11, 'corpseweft': 0.15, 'open into wonder': 0.19, 'glass casket': 0.06, 'captured by the consulate': 0.1, 'black poplar shaman': 0.15, 'demystify': 0.04, 'scythe tiger': 0.08, 'sundering stroke': 0.08, 'serra bestiary': 0.07, 'supernatural stamina': 0.06, "tasigur's cruelty": 0.08, 'apothecary initiate': 0.09, 'serra disciple': 0.02, 'tangle spider': 0.16, 'aberrant researcher': 0.06, 'bomber corps': 0.02, 'warped physique': 0.05, 'yargle, glutton of urborg': 0.18, 'triumph of ferocity': 0.18, 'tin street dodger': 0.1, 'scythe leopard': 0.1, 'blade of the sixth pride': 0.01, 'bioessence hydra': 0.17, 'trial': 0.1, 'sundering vitae': 0.05, 'bomat bazaar barge': 0.1, 'dross scorpion': 0.23, 'bat-': 0.1, 'ghost hounds': 0.16, "ezuri's archers": 0.08, 'spring': 0.14, 'stormcrag elemental': 0.04, 'sparring golem': 0.17, 'gingerbrute': 0.27, 'snapping gnarlid': 0.03, 'echoing ruin': 0.09, 'servo schematic': 0.15, 'servant of the scale': 0.11, 'sex appeal': 0.21, 'thoughtbound phantasm': 0.09, 'warrant': 0.1, 'assembled alphas': 0.14, 'vampire charmseeker': 0.09, 'snarling undorak': 0.12, 'awakener druid': 0.03, 'rancid rats': 0.17, 'tine shrike': 0.1, 'tin-wing chimera': 0.16, 'elven palisade': 0.11, 'atemsis, all-seeing': 0.23, 'sparktongue dragon': 0.01, 'taste for mayhem': 0.1, 'sentinel spider': 0.01, 'baloth cage trap': 0.08, 'selkie hedge-mage': 0.14, 'seashell cameo': 0.23, 'deathmark': 0.09, 'spitting sliver': 0.21, 'soul scourge': 0.09, 'azorius cluestone': 0.18, 'arctic foxes': 0.11, 'aquastrand spider': 0.14, 'arctic merfolk': 0.16, 'soul separator': 0.11, 'eel umbra': 0.05, 'wand of the elements': 0.17, 'storm sculptor': 0.08, 'sequestered stash': 0.13, 'angry mob': 0.02, 'soul strings': 0.08, 'aven liberator': 0.09, 'sunblade angel': 0.12, "death's approach": 0.03, 'thornbow archer': 0.11, "specter's shriek": 0.03, 'elite guardmage': 0.24, 'treacherous werewolf': 0.1, 'treacherous vampire': 0.16, 'stormscale anarch': 0.19, "bladewing's thrall": 0.1, 'razor swine': 0.09, 'barishi': 0.21, 'zarichi tiger': 0.05, 'razorfin abolisher': 0.22, 'amrou seekers': 0.02, 'wall of vines': 0.12, 'asphyxiate': 0.03, 'wall of runes': 0.03, 'gift horse': 0.23, 'seasonal ritual': 0.02, 'barbed-back wurm': 0.13, 'razor hippogriff': 0.04, 'glint-nest crane': 0.07, 'walking sponge': 0.14, 'droning bureaucrats': 0.19, 'ember beast': 0.01, 'dominator drone': 0.07, 'wand of vertebrae': 0.1, 'bant sojourners': 0.1, "arcum's weathervane": 0.21, 'wardscale dragon': 0.11, "ashiok's adept": 0.1, 'birthing boughs': 0.2, 'storm strike': 0.02, 'ravaging blaze': 0.11, 'solitary hunter': 0.11, 'stonewood invoker': 0.1, 'warden of the eye': 0.06, 'barbed shocker': 0.17, 'spontaneous combustion': 0.07, 'suncrusher': 0.22, 'recollect': 0.09, 'urborg elf': 0.25, 'tolarian sentinel': 0.01, 'boneshard slasher': 0.11, 'soldevi simulacrum': 0.1, "vraska's finisher": 0.01, 'soulblade renewer': 0.09, 'yavimaya ancients': 0.08, 'reclusive wight': 0.22, 'torch fiend': 0.03, 'warden': 0.1, 'elvish impersonators': 0.08, 'war falcon': 0.08, 'selfless cathar': 0.02, 'tattoo ward': 0.18, 'stop that': 0.23, 'ramroller': 0.09, 'sunbeam spellbomb': 0.14, "yawgmoth's edict": 0.12, 'rebuking ceremony': 0.13, 'wandering wolf': 0.11, 'wandering graybeard': 0.12, 'disowned ancestor': 0.09, 'elusive spellfist': 0.08, "traveler's amulet": 0.06, 'defender en-vec': 0.08, 'war-name aspirant': 0.08, 'tolarian drake': 0.12, 'split-tail miko': 0.12, 'abstract iguanart': 0.09, "serpent's gift": 0.11, 'storm shaman': 0.18, 'ravenous daggertooth': 0.07, 'thrill of the hunt': 0.01, 'bloodrage vampire': 0.16, 'wings of the guard': 0.08, 'traitorous instinct': 0.04, 'temporal spring': 0.21, 'entropic eidolon': 0.09, 'stamina': 0.19, 'goblin deathraiders': 0.12, 'deathknell kami': 0.08, 'adventuring gear': 0.13, 'augur il-vec': 0.15, 'sulam djinn': 0.15, 'teyo, the shieldmage': 0.23, 'tower of calamities': 0.21, 'armored skaab': 0.1, 'winged words': 0.1, 'sibsig muckdraggers': 0.05, 'dusk legion dreadnought': 0.11, 'skeletal crocodile': 0.11, 'dreamscape artist': 0.11, 'strength of arms': 0.01, 'rustmouth ogre': 0.07, 'rustspore ram': 0.1, 'ruthless disposal': 0.06, 'ruthless instincts': 0.1, 'sift through sands': 0.08, 'towering-wave mystic': 0.07, 'wing puncture': 0.08, 'wing storm': 0.14, 'spider climb': 0.11, 'test of faith': 0.09, 'tethmos high priest': 0.1, 'gnarled effigy': 0.1, 'sickle ripper': 0.06, 'whisperer of the wilds': 0.13, 'skittering surveyor': 0.08, 'swift spinner': 0.06, "wizards' school": 0.24, 'stern judge': 0.15, 'timberland ruins': 0.11, 'exemplar of strength': 0.08, 'stream of consciousness': 0.12, 'ghitu fire-eater': 0.13, 'without weakness': 0.05, 'salvager of ruin': 0.09, 'whipcorder': 0.17, 'ridge rannet': 0.11, 'vizkopa confessor': 0.07, 'spike drone': 0.08, 'ride down': 0.1, 'samite sanctuary': 0.27, 'battlegate mimic': 0.16, "samut's sprint": 0.09, 'riptide shapeshifter': 0.2, 'bloodshot trainee': 0.02, 'ghostly wings': 0.03, 'elder mastery': 0.17, 'deconstruct': 0.15, 'vivid revival': 0.09, 'righteous indignation': 0.18, 'shrouded lore': 0.2, 'swift warkite': 0.14, 'witching well': 0.09, "executioner's swing": 0.04, 'sailor of means': 0.01, 'glorious charge': 0.02, 'blistergrub': 0.09, 'rusted relic': 0.08, 'unhinge': 0.11, 'epicure of blood': 0.09, 'simic initiate': 0.07, 'silvercoat lion': 0.07, 'gloryscale viashino': 0.14, 'blood mist': 0.21, 'ruination guide': 0.15, 'stream of unconsciousness': 0.16, 'silverbeak griffin': 0.2, 'root spider': 0.2, 'tidal visionary': 0.12, 'silver-inlaid dagger': 0.12, 'dynacharge': 0.06, "dryad's favor": 0.08, 'trigon of infestation': 0.19, "djeru's renunciation": 0.02, 'swirl the mists': 0.25, 'status': 0.17, 'arrest': 0.1, 'village ironsmith': 0.13, 'royal herbalist': 0.1, 'simic cluestone': 0.11, 'rubbleback rhino': 0.05, 'rousing of souls': 0.09, 'rouse the mob': 0.07, 'statue': 0.17, 'rosethorn acolyte': 0.02, 'rotting legion': 0.05, 'rottenheart ghoul': 0.04, 'vile bile': 0.21, 'dryad greenseeker': 0.14, 'epic downfall': 0.3, 'terrain elemental': 0.13, 'tragic lesson': 0.06, 'village rites': 0.19, "ghoul's feast": 0.1, 'bloodfire dwarf': 0.18, 'angelic edict': 0.04, 'sphere of duty': 0.17, 'bloodfire kavu': 0.09, 'silkenfist order': 0.12, 'beanstalk giant': 0.14, 'silhana wayfinder': 0.05, 'deepfire elemental': 0.08, 'undying rage': 0.01, 'aerial volley': 0.07, 'rush of vitality': 0.14, 'auriok sunchaser': 0.1, 'aerial modification': 0.08, 'roar of the crowd': 0.17, 'roar of challenge': 0.15, 'glaring aegis': 0.01, 'rushing-tide zubera': 0.22, 'winding way': 0.15, 'beamsplitter mage': 0.08, 'doomed dissenter': 0.01, 'tide drifter': 0.13, 'angelic exaltation': 0.09, 'wild dogs': 0.14, 'singing bell strike': 0.04, "terashi's grasp": 0.09, 'rummaging goblin': 0.01, 'vines of the recluse': 0.15, 'silver drake': 0.13, 'vineweft': 0.03, 'violent impact': 0.05, 'anurid scavenger': 0.13, 'tidal wave': 0.1, 'silumgar sorcerer': 0.12, "dissenter's deliverance": 0.04, 'silumgar monument': 0.13, "alchemist's apprentice": 0.06, 'antler skulkin': 0.25, 'viridian betrayers': 0.1, 'blood frenzy': 0.14, 'elvish branchbender': 0.09, 'endemic plague': 0.17, 'vodalian hypnotist': 0.15, 'renounce the guilds': 0.1, 'aven sunstriker': 0.15, 'blight keeper': 0.02, 'worldly counsel': 0.09, 'repentant vampire': 0.29, 'surveilling sprite': 0.19, 'repentance': 0.1, 'repel the darkness': 0.04, 'vanishment': 0.11, 'avalanche': 0.14, 'scarab feast': 0.06, 'scarab of the unseen': 0.19, 'giant strength': 0.02, 'renegade map': 0.15, 'treetop rangers': 0.1, 'scarscale ritual': 0.21, 'reprobation': 0.04, 'dunerider outlaw': 0.01, 'disciple of malice': 0.05, 'unknown shores': 0.04, 'tempest drake': 0.23, 'error': 0.1, 'research the deep': 0.09, 'amass the components': 0.08, 'affa guard hound': 0.04, 'blighted gorge': 0.1, "varchild's crusader": 0.07, 'sharktocrab': 0.02, 'benthic infiltrator': 0.05, 'wayward disciple': 0.25, 'scale blessing': 0.05, 'wordmail': 0.2, 'unlikely alliance': 0.13, 'wrecking ogre': 0.12, 'smoldering spires': 0.1, 'smoldering tar': 0.15, 'goblin': 0.12, 'boggart birth rite': 0.15, 'gempalm avenger': 0.07, 'voracious typhon': 0.01, 'scour from existence': 0.2, 'trumpeting armodon': 0.11, 'scourge of geier reach': 0.09, 'the wanderer': 0.44, 'scourge servant': 0.06, 'reito lantern': 0.16, 'spectral shield': 0.1, 'shamble back': 0.1, 'smelt': 0.03, 'shape the sands': 0.05, 'spy kit': 0.21, 'angelic ascension': 0.12, 'geistflame': 0.09, 'elvish eulogist': 0.19, 'remorseless punishment': 0.15, 'avalanche tusker': 0.09, 'vampirism': 0.15, 'bog-strider ash': 0.08, 'sprouting renewal': 0.08, 'schismotivate': 0.09, 'smelt-ward gatekeepers': 0.02, 'scholar of the ages': 0.09, 'reliquary monk': 0.18, 'ageless sentinels': 0.26, 'aven smokeweaver': 0.17, 'scion summoner': 0.11, 'relief captain': 0.09, 'trial of knowledge': 0.1, 'benalish lancer': 0.1, 'vec townships': 0.1, "summoner's bond": 0.12, 'spell syphon': 0.21, 'emblazoned golem': 0.14, 'drudge sentinel': 0.01, 'skyshroud condor': 0.13, 'blindblast': 0.07, 'duh': 0.08, 'shockmaw dragon': 0.11, 'sanitarium skeleton': 0.01, 'woodborn behemoth': 0.07, 'thatcher revolt': 0.07, 'attune with aether': 0.08, 'stinkdrinker daredevil': 0.19, 'skyshroud ridgeback': 0.1, 'reviving vapors': 0.06, "woodcutter's grit": 0.04, 'reviving dose': 0.05, "endbringer's revel": 0.17, 'downpour': 0.05, 'venomous breath': 0.13, 'electrostatic pummeler': 0.11, 'staff of the mind magus': 0.1, 'sky terror': 0.23, 'whip sergeant': 0.1, 'blinding mage': 0.04, 'sanctum of tranquil light': 0.27, 'battlefield promotion': 0.03, 'timberpack wolf': 0.11, 'alpha myr': 0.12, 'spellgorger weird': 0.02, 'enthralling victor': 0.07, 'spike rogue': 0.16, 'vodalian zombie': 0.19, 'skyreach manta': 0.02, 'skyreaping': 0.07, 'syndic of tithes': 0.14, 'satyr hedonist': 0.04, 'body of jukai': 0.19, 'errantry': 0.05, 'retribution': 0.1, 'woodland wanderer': 0.13, 'sauté': 0.32, 'woodvine elemental': 0.1, 'sustenance': 0.14, 'slinn voda, the rising deep': 0.23, 'rethink': 0.13, 'vedalken dismisser': 0.06, 'restoration specialist': 0.24, 'torrent of stone': 0.08, 'vector asp': 0.15, 'torture': 0.05, 'ascended lawmage': 0.1, 'deathgazer': 0.06, 'welcome to the fold': 0.11, 'time ebb': 0.02, 'void grafter': 0.11, 'void snare': 0.15, 'battle-rattle shaman': 0.01, 'saproling migration': 0.18, 'shivan emissary': 0.09, 'blind fury': 0.11, 'slaying fire': 0.05, 'svyelunite priest': 0.12, 'aethershield artificer': 0.1, 'reverent hoplite': 0.1, 'aethersnipe': 0.06, 'enduring sliver': 0.1, 'gempalm sorcerer': 0.13, "kazuul's toll collector": 0.12, 'hag hedge-mage': 0.11, 'ironfang': 0.13, 'penumbra kavu': 0.15, 'marked by honor': 0.08, 'irontread crusher': 0.05, 'prowling caracal': 0.15, 'providence': 0.1, 'perfected form': 0.06, 'denied!': 0.16, 'collected conjuring': 0.13, 'change of heart': 0.11, 'crawling sensation': 0.24, "builder's bane": 0.09, 'creakwood ghoul': 0.07, 'myr mindservant': 0.16, 'mossdog': 0.09, 'guardians of meletis': 0.04, 'pull from the deep': 0.18, 'peel from reality': 0.02, 'keeneye aven': 0.1, 'crushing vines': 0.01, 'heart-piercer manticore': 0.05, 'carnivorous death-parrot': 0.12, 'merfolk traders': 0.17, 'psychic intrusion': 0.15, 'herbal poultice': 0.32, 'kasmina, enigmatic mentor': 0.18, 'obsessive skinner': 0.12, 'makindi patrol': 0.04, 'cardpecker': 0.2, 'mesa unicorn': 0.07, 'minotaur warrior': 0.15, 'ceaseless searblades': 0.1, 'phalanx formation': 0.09, 'minister of inquiries': 0.08, 'chronosavant': 0.2, 'malevolent whispers': 0.01, 'daring skyjek': 0.05, 'brutal suppression': 0.09, 'mire boa': 0.02, 'curse of chaos': 0.31, 'bubbling cauldron': 0.15, 'griffin rider': 0.05, 'krovikan whispers': 0.1, 'cephalid looter': 0.13, "nightmare's thirst": 0.07, 'nightmarish end': 0.04, 'convulsing licid': 0.11, 'haazda officer': 0.09, 'good-fortune unicorn': 0.45, 'markov patrician': 0.08, 'nimana sell-sword': 0.05, 'horned kavu': 0.11, "grenzo's cutthroat": 0.08, 'hikari, twilight guardian': 0.1, 'pardic firecat': 0.09, 'contentious plan': 0.25, 'failure': 0.17, 'fairgrounds trumpeter': 0.04, 'horned helm': 0.17, 'pyroconvergence': 0.06, 'call to serve': 0.09, 'goblin war paint': 0.03, 'harness the storm': 0.19, 'pardic dragon': 0.12, 'party crasher': 0.11, "merchant's dockhand": 0.1, 'merciless eternal': 0.05, 'pyre hound': 0.05, 'dauntless cathar': 0.03, 'granger guildmage': 0.11, 'howling wolf': 0.15, "kiku's shadow": 0.23, 'fiery hellhound': 0.32, 'killing glare': 0.1, 'inspiring roar': 0.01, 'qarsi sadist': 0.08, 'furnace scamp': 0.06, 'cobra trap': 0.11, 'qal sisma behemoth': 0.03, 'fourth bridge prowler': 0.07, "oko's accomplices": 0.1, 'chimeric sphere': 0.16, 'instill infection': 0.03, 'kraken hatchling': 0.07, 'nessian hornbeetle': 0.08, "golem's heart": 0.19, 'mistform mutant': 0.19, 'daggerdrome imp': 0.06, 'hollowhenge spirit': 0.06, 'keldon champion': 0.11, 'grotesque mutation': 0.05, 'chandler': 0.17, 'ogre menial': 0.07, 'ogre marauder': 0.2, 'furnace celebration': 0.01, 'hail storm': 0.12, 'punctuate': 0.14, 'patchwork gnomes': 0.01, 'nezumi ronin': 0.2, 'immediate action': 0.1, 'lifecraft awakening': 0.04, 'bullwhip': 0.19, 'hypothesizzle': 0.02, 'pearl shard': 0.1, "mishra's groundbreaker": 0.1, 'cavalry drillmaster': 0.01, 'fylamarid': 0.13, "lifecrafter's gift": 0.04, 'desecrator hag': 0.1, 'pygmy pyrosaur': 0.06, 'light of promise': 0.19, 'half-squirrel, half-': 0.07, 'lumbering battlement': 0.14, 'contradict': 0.05, "ogre's cleaver": 0.24, "kemba's skyguard": 0.11, "kemba's legion": 0.08, 'neurok replica': 0.03, 'invigorating falls': 0.14, "krark's other thumb": 0.25, 'marrow shards': 0.15, 'patron of the valiant': 0.01, 'devoted retainer': 0.27, 'burglar rat': 0.26, 'jund battlemage': 0.09, 'murderous compulsion': 0.02, 'lowland giant': 0.03, 'hazerider drake': 0.19, 'darksteel gargoyle': 0.1, 'candles of leng': 0.17, 'pine walker': 0.05, 'flurry of horns': 0.05, 'porcelain legionnaire': 0.13, "coursers' accord": 0.04, 'pious evangel': 0.25, 'courage in crisis': 0.1, 'briarberry cohort': 0.12, 'launch party': 0.05, 'fury charm': 0.14, 'pit raptor': 0.09, 'countervailing winds': 0.25, 'final-sting faerie': 0.14, 'broken fall': 0.17, 'poultrygeist': 0.08, 'gryff vanguard': 0.09, 'no-dachi': 0.22, 'heal the scars': 0.1, 'dark banishing': 0.05, 'junkyo bell': 0.23, 'power play': 0.18, 'manor skeleton': 0.07, 'juniper order advocate': 0.1, 'court archers': 0.11, 'might of the masses': 0.02, 'pillar of flame': 0.11, 'farmstead gleaner': 0.06, 'polluted dead': 0.07, 'clear the stage': 0.06, 'headless skaab': 0.05, 'cursebreak': 0.08, 'lavastep raider': 0.01, 'dazzling ramparts': 0.1, 'lawless broker': 0.01, 'brineborn cutthroat': 0.11, 'jeweled torque': 0.14, "cosi's ravager": 0.11, 'novice knight': 0.19, 'novellamental': 0.13, 'nourish': 0.1, 'manaforge cinder': 0.21, 'johtull wurm': 0.08, "jodah's avenger": 0.01, 'mind': 0.14, 'joraga bard': 0.08, 'pollenbright druid': 0.08, 'polis crusher': 0.1, 'fang of the pack': 0.21, 'jeskai banner': 0.12, 'canker abomination': 0.05, "gaea's skyfolk": 0.17, 'cinder wall': 0.04, 'clear shot': 0.01, 'noxious vapors': 0.23, 'first response': 0.01, 'dawnfeather eagle': 0.05, "mourner's shield": 0.13, 'comply': 0.17, 'gruesome menagerie': 0.13, 'nimbus wings': 0.08, 'mourning thrull': 0.09, 'primeval shambler': 0.1, 'kargan dragonrider': 0.26, 'fertile footsteps': 0.14, 'prism array': 0.13, 'browse': 0.07, 'festering mummy': 0.21, "leshrac's rite": 0.22, 'primal huntbeast': 0.04, 'lace with moonglove': 0.09, 'ninja of the new moon': 0.05, 'gruul cluestone': 0.08, 'mouth': 0.27, 'mana cylix': 0.12, 'highborn ghoul': 0.08, 'center soul': 0.06, "kuro's taken": 0.23, "huatli, the sun's heart": 0.24, 'icatian moneychanger': 0.1, 'kwende, pride of femeref': 0.14, 'kyren glider': 0.12, 'izzet cluestone': 0.23, 'copperhorn scout': 0.23, 'coral barrier': 0.09, 'brain pry': 0.16, 'funeral march': 0.05, 'high seas': 0.15, 'kyren legate': 0.14, 'crumbling colossus': 0.04, 'obelisk of jund': 0.12, 'nirkana assassin': 0.04, 'lagonna-band trailblazer': 0.16, 'mowu, loyal companion': 0.11, 'jade bearer': 0.05, 'phyrexian ironfoot': 0.19, "kaervek's purge": 0.2, "mutant's prey": 0.07, 'jaddi lifestrider': 0.09, 'leonin battlemage': 0.14, 'corpsehatch': 0.1, 'midnight oil': 0.15, 'centaur rootcaster': 0.17, 'gustcloak cavalier': 0.08, 'gust-skimmer': 0.02, 'oaken brawler': 0.08, "predator's howl": 0.43, 'centaur omenreader': 0.27, 'first-sphere gargantua': 0.02, 'celestial messenger': 0.14, 'gorehorn minotaurs': 0.07, "freyalise's radiance": 0.25, 'mindlock orb': 0.63, "heliod's emissary": 0.09, 'dead reckoning': 0.08, 'price of betrayal': 0.1, 'phyrexian broodlings': 0.13, 'leonin snarecaster': 0.05, 'crusher zendikon': 0.11, 'gore-house chainwalker': 0.03, 'mindreaver': 0.09, "pretender's claim": 0.16, 'hedron crawler': 0.2, 'press the advantage': 0.06, 'gruul keyrune': 0.09, 'phyrexian defiler': 0.09, 'corpse blockade': 0.05, 'funeral rites': 0.07, "olivia's dragoon": 0.05, 'clockwork swarm': 0.1, 'dance of the skywise': 0.06, 'orc sureshot': 0.13, 'honored crop-captain': 0.17, "cathar's shield": 0.18, 'painful lesson': 0.08, 'folk of the pines': 0.02, 'harbinger of spring': 0.09, 'devout harpist': 0.17, 'chained throatseeker': 0.07, 'borderland explorer': 0.1, 'ornery goblin': 0.01, 'griffin aerie': 0.2, 'gate colossus': 0.1, 'call of the full moon': 0.09, 'chief of the foundry': 0.12, 'nameless inversion': 0.14, 'dawnglow infusion': 0.24, 'clockwork beetle': 0.1, 'orcish veteran': 0.09, 'feed': 0.27, 'cabal paladin': 0.07, 'graceblade artisan': 0.11, 'nacre talisman': 0.16, 'grasping current': 0.11, 'mogg hollows': 0.1, 'opal guardian': 0.2, 'kolaghan monument': 0.11, 'coat with venom': 0.06, 'inferno trap': 0.05, 'hillcomber giant': 0.1, 'llanowar augur': 0.21, 'chief of the edge': 0.05, 'font of vigor': 0.08, 'nagao, bound by honor': 0.27, 'organ grinder': 0.08, 'civic saber': 0.12, 'oneirophage': 0.08, 'knight of cliffhaven': 0.12, 'ink dissolver': 0.14, 'moldgraf scavenger': 0.03, "mons's goblin waiters": 0.12, 'lys alana bowmaster': 0.01, 'inhumaniac': 0.04, 'infuse with the elements': 0.05, 'morkrut banshee': 0.03, 'flayer drone': 0.12, 'flayed nim': 0.13, 'pacification array': 0.09, 'moriok replica': 0.11, 'boros challenger': 0.05, 'master the way': 0.08, 'crook of condemnation': 0.08, 'freewind equenaut': 0.1, 'one of the pack': 0.11, 'improbable alliance': 0.09, "cathar's companion": 0.04, 'golgari decoy': 0.07, 'kitsune healer': 0.14, 'molder': 0.14, 'galvanic bombardment': 0.05, 'kolaghan forerunners': 0.1, 'cherished hatchling': 0.1, 'calcite snapper': 0.12, 'rage extractor': 0.05, 'grip of the roil': 0.1, 'one-eyed scarecrow': 0.18, 'melee': 0.12, 'defiant strike': 0.04, "knight of the pilgrim's road": 0.02, 'mobile fort': 0.21, 'ramosian lieutenant': 0.17, 'ovalchase dragster': 0.11, 'call the cavalry': 0.04, 'chimeric idol': 0.1, 'heat wave': 0.21, 'needletooth raptor': 0.24, 'inferno elemental': 0.13, 'ramosian captain': 0.17, 'lush growth': 0.12, 'morselhoarder': 0.1, 'god-favored general': 0.1, 'kjeldoran skycaptain': 0.09, "kozilek's pathfinder": 0.08, 'morsel theft': 0.24, 'gang of devils': 0.07, 'maw of the obzedat': 0.09, 'lightning elemental': 0.02, 'outnumber': 0.1, 'pallid mycoderm': 0.01, 'nakaya shade': 0.11, 'frost walker': 0.05, 'burst of strength': 0.1, 'flailing ogre': 0.15, "ral's outburst": 0.05, 'cateran enforcer': 0.25, 'crown of awe': 0.12, 'furious resistance': 0.02, 'horizon spellbomb': 0.1, 'moratorium stone': 0.21, 'felidar cub': 0.09, 'infernal harvest': 0.08, 'oppressive rays': 0.08, 'kjeldoran escort': 0.1, 'omen of the sea': 0.11, 'darksteel brute': 0.1, 'kin-tree invocation': 0.12, 'borderland ranger': 0.02, 'hunting kavu': 0.13, 'kami of the palace fields': 0.11, 's.n.o.t.': 0.27, 'haunter of nightveil': 0.07, 'thunderous snapper': 0.08, 'mindculling': 0.06, 'duskhunter bat': 0.04, 'ainok bond-kin': 0.08, 'bronzebeak moa': 0.05, 'seasoned tactician': 0.13, 'commune with nature': 0.09, "justiciar's portal": 0.11, 'laccolith warrior': 0.08, 'sheltered aerie': 0.09, 'oashra cultivator': 0.04, 'cytospawn shambler': 0.08, 'cache raiders': 0.1, 'thunderscape familiar': 0.26, 'shefet monitor': 0.15, 'secure the scene': 0.01, 'spire barrage': 0.05, 'disembowel': 0.13, 'thundersong trumpeter': 0.09, "shauku's minion": 0.13, 'ghastbark twins': 0.05, 'goblinslide': 0.21, 'orochi eggwatcher': 0.19, 'solemn offering': 0.05, 'thundering djinn': 0.02, 'graverobber spider': 0.1, 'shattered dreams': 0.07, 'wildgrowth walker': 0.07, 'hope tender': 0.1, 'tymaret, chosen from death': 0.08, 'toxic iguanar': 0.07, 'surge mare': 0.06, 'gustcloak sentinel': 0.11, 'balshan griffin': 0.16, 'dauntless river marshal': 0.1, 'sadistic glee': 0.25, 'fated conflagration': 0.09, 'oakgnarl warrior': 0.13, 'trade caravan': 0.1, 'soulcage fiend': 0.1, 'tanglewalker': 0.16, 'sabertooth cobra': 0.23, 'phthisis': 0.04, 'sabretooth tiger': 0.1, 'kabuto moth': 0.09, 'lancer sliver': 0.13, 'spire phantasm': 0.05, 'sheer drop': 0.01, 'two-headed cerberus': 0.04, 'ghazbán ogress': 0.28, 'goblin test pilot': 0.08, 'duskrider falcon': 0.09, 'apes of rath': 0.28, 'ornitharch': 0.04, 'safe passage': 0.06, 'seething pathblazer': 0.06, "joven's ferrets": 0.09, 'jousting dummy': 0.07, 'sunrise seeker': 0.01, 'totally lost': 0.01, 'taste of paradise': 0.05, 'vulshok berserker': 0.05, 'flying crane technique': 0.1, 'plague mare': 0.05, 'ballynock cohort': 0.08, 'watcher in the web': 0.09, 'tattermunge duo': 0.06, 'knowledge and power': 0.03, 'ahn-crop crasher': 0.1, 'rubblebelt maaka': 0.06, 'harbor serpent': 0.04, 'pith driller': 0.09, "farrel's mantle": 0.09, 'splendid agony': 0.08, 'folk of an-havva': 0.11, 'golgari locket': 0.05, 'humble': 0.06, 'soilshaper': 0.1, 'human frailty': 0.1, "tahngarth's rage": 0.16, 'thrive': 0.07, 'tormented thoughts': 0.06, 'segovian angel': 0.25, "hazoret's favor": 0.09, 'mind burst': 0.1, 'rotcrown ghoul': 0.05, 'eagle of the watch': 0.11, 'woodlot crawler': 0.05, 'tormentor exarch': 0.04, 'clam session': 0.16, 'rootwater hunter': 0.1, 'brindle boar': 0.09, 'lurking informant': 0.09, 'woodwraith corrupter': 0.25, 'blood vassal': 0.14, 'iceberg cancrix': 0.06, 'frozen solid': 0.06, 'dragonsoul knight': 0.11, 'jolt': 0.17, 'gavony unhallowed': 0.08, 'rotwidow pack': 0.09, 'seismic elemental': 0.11, 'descendant of kiyomaro': 0.09, 'widespread brutality': 0.19, 'spore swarm': 0.21, 'lawbringer': 0.08, 'goblin banneret': 0.08, 'seismic rupture': 0.04, 'supply-line cranes': 0.05, 'oreskos swiftclaw': 0.01, 'blademane baku': 0.13, 'angel of the god-pharaoh': 0.09, 'tormented angel': 0.15, 'shield of the ages': 0.09, 'centaur glade': 0.22, 'suppression bonds': 0.07, 'thud-for-duds': 0.22, 'runed servitor': 0.01, 'char-rumbler': 0.01, 'uncanny speed': 0.09, 'wild celebrants': 0.01, 'pick the brain': 0.04, "soul's grace": 0.1, 'lantern-lit graveyard': 0.24, 'elvish fury': 0.01, 'mana flair': 0.13, 'pierce strider': 0.06, 'knight of obligation': 0.11, 'loxodon lifechanter': 0.13, 'tower drake': 0.01, "gerrard's command": 0.15, 'see red': 0.06, 'blood feud': 0.06, 'mana geode': 0.3, 'throes of chaos': 0.1, 'mtenda herder': 0.07, 'cacophodon': 0.11, "grim captain's call": 0.04, 'suntail hawk': 0.06, 'attended knight': 0.08, 'pious kitsune': 0.15, 'fertile imagination': 0.23, 'lurking chupacabra': 0.03, 'totem-guide hartebeest': 0.12, 'seeker of insight': 0.05, 'wandering eye': 0.12, 'ruinous gremlin': 0.01, 'sunset pyramid': 0.01, 'moonglove changeling': 0.17, 'pinion feast': 0.02, 'dance with devils': 0.07, 'syr elenora, the discerning': 0.04, 'lymph sliver': 0.08, 'thrull surgeon': 0.05, 'vulturous aven': 0.1, 'uncontrolled infestation': 0.11, 'spiteful returned': 0.1, 'jungle delver': 0.02, 'run afoul': 0.02, 'gurmag drowner': 0.04, 'spinning wheel': 0.17, 'champion of the flame': 0.01, 'dronepack kindred': 0.07, 'palace guard': 0.09, 'fyndhorn brownie': 0.13, "scalebane's elite": 0.13, 'wild might': 0.07, 'hunted ghoul': 0.04, 'disciple of law': 0.13, 'krazy kow': 0.18, 'koskun keep': 0.16, 'painted bluffs': 0.11, 'scab-clan giant': 0.07, 'gone': 0.17, 'keldon vandals': 0.15, 'tajuru beastmaster': 0.03, 'tajuru pathwarden': 0.06, 'burning oil': 0.05, 'serene sunset': 0.25, "kenrith's transformation": 0.29, 'demolish': 0.01, 'gravegouger': 0.07, 'soratami seer': 0.17, 'pathway arrows': 0.1, 'trickery charm': 0.16, 'aradara express': 0.08, 'defend the hearth': 0.04, 'spear spewer': 0.11, 'feed the clan': 0.11, "chandra's fury": 0.05, 'sophic centaur': 0.07, 'savage offensive': 0.11, 'seven dwarves': 0.39, 'time of heroes': 0.12, 'savage swipe': 0.09, 'tromp the domains': 0.04, 'aurora champion': 0.04, 'keening apparition': 0.06, 'sphinx of new prahv': 0.05, 'trollhide': 0.05, 'maggot carrier': 0.13, 'sparring mummy': 0.01, 'kederekt creeper': 0.09, 'hammerhand': 0.08, 'deliver unto evil': 0.17, 'krosan constrictor': 0.08, 'peace and quiet': 0.22, 'ogre geargrabber': 0.04, 'sootstoke kindler': 0.1, 'hail of arrows': 0.07, 'peace talks': 0.14, 'sphere of truth': 0.18, 'arbor armament': 0.04, 'kird chieftain': 0.05, 'luminous wake': 0.11, 'horned turtle': 0.03, 'hypochondria': 0.11, 'bull-rush bruiser': 0.04, "mogis's marauder": 0.11, 'furious assault': 0.13, 'seraph of the masses': 0.13, 'mistfire adept': 0.04, 'halimar tidecaller': 0.08, 'bankrupt in blood': 0.18, 'titan of eternal fire': 0.06, 'ethereal usher': 0.23, 'panic spellbomb': 0.09, 'enlarge': 0.03, 'bishop of the bloodstained': 0.09, 'mobile garrison': 0.14, 'scorch spitter': 0.05, 'blazing hellhound': 0.11, 'scion of ugin': 0.1, 'deathbellow raider': 0.05, 'bursting beebles': 0.11, 'take inventory': 0.05, 'scrap': 0.11, 'watertrap weaver': 0.06, 'spectral gateguards': 0.08, 'kindslaver': 0.19, 'treetop bracers': 0.09, 'destructive digger': 0.01, "mortal's resolve": 0.05, 'deputized protester': 0.04, 'scourge devil': 0.06, 'hydromorph guardian': 0.13, 'paragon of gathering mists': 0.15, "bishop's soldier": 0.04, 'kragma butcher': 0.06, 'chakram slinger': 0.08, 'treefolk healer': 0.11, 'scourge of numai': 0.1, "titania's boon": 0.21, 'treefolk umbra': 0.03, 'treacherous link': 0.2, 'tinder farm': 0.15, 'horizon seed': 0.11, 'blessing of belzenlok': 0.07, 'araba mothrider': 0.22, 'act of heroism': 0.04, 'deep freeze': 0.08, 'wildwood scourge': 0.17, 'screeching harpy': 0.09, "sorcerer's broom": 0.03, 'wild onslaught': 0.09, "on serra's wings": 0.02, 'krallenhorde wantons': 0.12, 'spectral force': 0.23, 'khenra eternal': 0.03, 'departed deckhand': 0.14, 'serpentine basilisk': 0.14, 'serpentine': 0.24, 'scent of nightshade': 0.08, 'elvish berserker': 0.1, 'spell rupture': 0.06, 'hammer of ruin': 0.09, 'dream prowler': 0.03, 'burning-fist minotaur': 0.08, "takeno's cavalry": 0.1, 'keymaster rogue': 0.04, 'separatist voidmage': 0.05, 'offalsnout': 0.02, 'savage alliance': 0.09, 'anticipate': 0.02, 'tome of the guildpact': 0.29, 'karplusan giant': 0.09, 'kor hookmaster': 0.02, 'font of return': 0.11, 'talruum minotaur': 0.08, 'suture spirit': 0.23, 'ghost-lit warder': 0.27, 'fog patch': 0.12, 'fruit of the first tree': 0.13, 'wretched anurid': 0.14, 'tonic peddler': 0.11, 'bestial fury': 0.09, 'ferocious zheng': 0.08, 'ghost warden': 0.05, 'molting skin': 0.25, 'malach of the dawn': 0.2, 'oboro envoy': 0.17, 'malakir familiar': 0.09, 'oblivion strike': 0.06, 'soltari trooper': 0.09, 'walker of the grove': 0.05, 'herdchaser dragon': 0.11, 'phantasmal bear': 0.06, 'overgrowth elemental': 0.07, 'crystal slipper': 0.03, 'shambling goblin': 0.03, 'shaman of spring': 0.06, 'topple': 0.11, 'dynavolt tower': 0.13, 'wolfwillow haven': 0.3, 'berserk murlodont': 0.1, "survivors' encampment": 0.24, 'otherworldly outburst': 0.09, 'avacynian priest': 0.08, 'barging sergeant': 0.01, 'shared discovery': 0.14, "tibalt's rager": 0.09, 'calculated dismissal': 0.06, "pharika's chosen": 0.13, "ob nixilis's cruelty": 0.04, 'waking nightmare': 0.04, 'greenside watcher': 0.02, 'phantom general': 0.16, 'wormfang behemoth': 0.24, 'spined thopter': 0.06, 'mad dog': 0.08, 'giant oyster': 0.13, 'shapers of nature': 0.08, 'hope against hope': 0.08, "taigam's strike": 0.04, 'tragic poet': 0.02, 'death pulse': 0.13, 'kashi-tribe warriors': 0.07, 'divine favor': 0.04, 'ongoing investigation': 0.12, 'tall as a beanstalk': 0.01, 'make mischief': 0.09, 'true-faith censer': 0.06, 'kithkin mourncaller': 0.18, "chandra's revolution": 0.03, 'conclave cavalier': 0.05, 'built to last': 0.04, 'timberland guide': 0.01, 'hunt down': 0.06, 'saruli gatekeepers': 0.06, 'molderhulk': 0.12, 'scuzzback marauders': 0.06, 'sparring collar': 0.09, 'toil to renown': 0.13, 'dwell on the past': 0.27, 'forced worship': 0.01, 'sparkspitter': 0.05, 'acid-spewer dragon': 0.17, 'mirror golem': 0.1, 'satyr hoplite': 0.09, 'haggle': 0.07, 'goblin boom keg': 0.08, 'makeshift battalion': 0.01, 'morgue toad': 0.07, 'tombfire': 0.23, 'shake the foundations': 0.14, 'kitsune bonesetter': 0.09, 'cooperate': 0.05, 'sangrite backlash': 0.2, 'swarm of bloodflies': 0.18, 'kitsune loreweaver': 0.11, 'obsessive stitcher': 0.06, 'sandsteppe scavenger': 0.04, 'sengir bats': 0.11, 'pestilent haze': 0.02, 'pestilent souleater': 0.08, 'spike soldier': 0.1, 'spike tiller': 0.25, 'everbark shaman': 0.15, 'kruin striker': 0.07, 'saprazzan breaker': 0.08, 'mother of goons': 0.15, 'fatigue': 0.08, 'lurching rotbeast': 0.03, 'blind zealot': 0.1, 'harvester druid': 0.33, 'blind-spot giant': 0.12, 'timber shredder': 0.1, 'swashbuckling': 0.04, 'oxidda golem': 0.12, 'wave elemental': 0.13, 'obsidian giant': 0.12, 'believe': 0.18, "purphoros's intervention": 0.12, 'wings of hope': 0.13, 'field creeper': 0.06, 'borrowed grace': 0.06, 'slith bloodletter': 0.08, 'alloy golem': 0.17, 'remodel': 0.11, 'neutralizing blast': 0.04, 'heartfire immolator': 0.02, 'aerie bowmasters': 0.03, 'repel': 0.09, 'structural distortion': 0.03, 'lifespark spellbomb': 0.1, 'pursued whale': 0.14, 'fleshformer': 0.08, 'wings of hubris': 0.02, 'marrow bats': 0.09, 'voldaren duelist': 0.06, 'ire of kaminari': 0.14, 'slith strider': 0.1, "arenson's aura": 0.15, 'carrion crow': 0.03, 'wings of velis vel': 0.11, "markov's servant": 0.07, "venser's sliver": 0.24, 'abuna acolyte': 0.13, 'invulnerability': 0.5, 'argent mutation': 0.11, 'giant albatross': 0.12, 'renata, called to the hunt': 0.24, 'neurok commando': 0.09, 'fumarole': 0.09, 'merchant of secrets': 0.17, 'reins of the vinesteed': 0.07, 'flamekin bladewhirl': 0.1, 'stingscourger': 0.01, 'reinforced bulwark': 0.08, 'marshaling cry': 0.16, 'stromgald spy': 0.13, 'boiling earth': 0.03, 'nessian boar': 0.11, 'nessian asp': 0.1, 'daru mender': 0.16, 'bold defense': 0.04, "veteran's reflexes": 0.07, 'boros recruit': 0.14, 'driver of the dead': 0.02, 'slinking serpent': 0.11, 'mystic melting': 0.17, 'gloomwidow': 0.05, 'relentless skaabs': 0.09, 'merciless resolve': 0.03, 'vessel of ephemera': 0.04, 'stronghold discipline': 0.08, 'beast hunt': 0.04, 'vessel of nascency': 0.17, 'boggart arsonists': 0.06, 'warden of the chained': 0.02, 'divine verdict': 0.01, 'creeping trailblazer': 0.18, 'imperial aerosaur': 0.09, 'zhur-taa swine': 0.02, 'lightning blast': 0.03, 'merchant of the vale': 0.07, 'vengeful vampire': 0.1, 'tel-jilad wolf': 0.08, 'silhana starfletcher': 0.11, 'crashing centaur': 0.09, 'illuminated folio': 0.18, 'flamekin spitfire': 0.09, 'suffocation': 0.12, 'nightshade schemers': 0.24, 'reveille squad': 0.23, 'board the weatherlight': 0.09, 'winnower patrol': 0.08, 'ghitu slinger': 0.06, 'daily regimen': 0.14, 'silkwing scout': 0.09, 'vaporous djinn': 0.1, 'fissure vent': 0.07, 'return to nature': 0.07, 'nightmare void': 0.11, 'vastwood animist': 0.09, 'ivory crane netsuke': 0.19, "vampire's zeal": 0.04, 'gluttonous slug': 0.05, 'highland berserker': 0.08, 'crash landing': 0.1, 'foul emissary': 0.07, 'balduvian conjurer': 0.09, 'nim shambler': 0.1, 'telekinetic bonds': 0.22, 'double take': 0.15, 'beckon apparition': 0.08, 'looming spires': 0.06, 'ley line': 0.18, 'flowstone salamander': 0.12, 'aviary mechanic': 0.07, 'start your engines': 0.08, "arcum's sleigh": 0.12, 'vastwood gorger': 0.18, 'flower': 0.04, 'resounding silence': 0.09, 'fight': 0.13, 'deem worthy': 0.08, 'flourish': 0.04, 'steam vines': 0.16, 'ilysian caryatid': 0.25, 'beastbreaker of bala ged': 0.07, 'venerated teacher': 0.09, 'simian grunts': 0.09, 'slithering shade': 0.1, 'fists of the anvil': 0.14, 'goblin piker': 0.03, 'sturdy hatchling': 0.09, 'steamflogger service rep': 0.1, 'elvish skysweeper': 0.12, 'steamfloggery': 0.1, 'vengeful devil': 0.03, 'iron lance': 0.12, 'night terrors': 0.03, 'akoum flameseeker': 0.01, 'longshot squad': 0.09, 'prying blade': 0.26, 'grove rumbler': 0.12, 'epitaph golem': 0.02, 'protective bubble': 0.25, 'flowstone crusher': 0.12, 'heart warden': 0.25, 'crawling filth': 0.06, 'resuscitate': 0.21, 'proud mentor': 0.06, 'fists of flame': 0.04, 'silverchase fox': 0.04, 'howlpack of estwald': 0.11, 'qarsi high priest': 0.06, 'master of pearls': 0.12, 'territorial baloth': 0.03, "liliana's defeat": 0.08, 'infectious horror': 0.02, 'cathedral sanctifier': 0.17, 'crosstown courier': 0.04, 'childhood horror': 0.13, 'entirely normal armchair': 0.11, 'stonehorn chanter': 0.03, "gloomwidow's feast": 0.21, 'ray of distortion': 0.01, 'sixth sense': 0.23, 'stonewing antagonizer': 0.07, 'crosswinds': 0.15, "liliana's shade": 0.11, 'dark maze': 0.08, 'induce despair': 0.14, 'rakdos cluestone': 0.2, 'ghostly touch': 0.09, 'living tsunami': 0.06, 'genju of the falls': 0.1, "nature's chant": 0.04, 'grixis grimblade': 0.17, 'azorius justiciar': 0.12, 'deadly grub': 0.01, 'deadly designs': 0.1, 'crookclaw transmuter': 0.01, 'hinterland logger': 0.1, 'crop sigil': 0.14, 'inferno fist': 0.05, 'hipparion': 0.08, "hoarder's greed": 0.11, 'catapult squad': 0.16, 'rain of embers': 0.09, 'rain of revelation': 0.06, 'deadhead': 0.29, 'artful maneuver': 0.06, 'limestone golem': 0.13, 'storm elemental': 0.09, 'galvanic juggernaut': 0.1, "arrester's zeal": 0.04, 'stormfront pegasus': 0.17, 'galvanic key': 0.15, 'maze behemoth': 0.06, 'storm fleet aerialist': 0.09, 'matsu-tribe birdstalker': 0.13, 'warren pilferers': 0.11, 'ramosian revivalist': 0.18, 'nantuko tracer': 0.12, 'hired giant': 0.12, 'rampaging cyclops': 0.02, 'mausoleum guard': 0.1, 'enter the unknown': 0.2, 'rampaging hippo': 0.08, 'skyshroud blessing': 0.14, 'skyship plunderer': 0.09, 'freejam regent': 0.12, 'sky theater strix': 0.01, 'incendiary': 0.13, 'skywing aven': 0.01, 'crow storm': 0.27, 'stonybrook angler': 0.14, 'meddle': 0.14, 'measure of wickedness': 0.23, 'bone to ash': 0.02, 'nantuko calmer': 0.1, 'eyeless watcher': 0.09, 'akroan skyguard': 0.13, 'rattleblaze scarecrow': 0.17, 'rats of rath': 0.09, 'azorius first-wing': 0.07, 'eyes in the skies': 0.07, 'facevaulter': 0.06, 'skysnare spider': 0.18, 'skyline cascade': 0.09, "teroh's faithful": 0.09, 'rageform': 0.05, 'grizzled outcasts': 0.12, 'martyred rusalka': 0.16, 'llanowar scout': 0.23, 'faerie mechanist': 0.02, 'impetuous sunchaser': 0.06, 'stoic rebuttal': 0.24, 'volcanic awakening': 0.22, 'volatile claws': 0.07, 'thallid soothsayer': 0.18, "dryad's caress": 0.09, 'recover': 0.04, 'street spasm': 0.08, 'bonded construct': 0.05, 'hobgoblin dragoon': 0.1, 'heartwarming redemption': 0.09, 'heartwood dryad': 0.09, 'skarrgan skybreaker': 0.04, 'regal bloodlord': 0.17, 'refuse': 0.05, 'chosen of markov': 0.07, 'refresh': 0.08, 'quakefoot cyclops': 0.02, 'skaab goliath': 0.03, 'frenzied raptor': 0.01, 'strip bare': 0.06, 'bolt hound': 0.22, 'emberhorn minotaur': 0.01, 'quarry colossus': 0.08, 'mephitic ooze': 0.22, 'nemesis of mortals': 0.07, 'stitched drake': 0.05, 'stitched mangler': 0.09, 'abominable treefolk': 0.19, 'abnormal endurance': 0.13, "warriors' lesson": 0.13, 'village survivors': 0.06, 'lightning shrieker': 0.02, 'slayer of the wicked': 0.08, 'radiant essence': 0.12, 'vineshaper mystic': 0.03, 'gavony ironwright': 0.03, 'howling chorus': 0.2, 'galvanic alchemist': 0.08, 'infuse': 0.09, 'reave soul': 0.05, 'reason': 0.18, 'viridian acolyte': 0.1, 'rage weaver': 0.06, 'villagers of estwald': 0.11, 'lightning hounds': 0.11, 'quiet contemplation': 0.11, 'mending hands': 0.11, 'crimson mage': 0.02, 'coalition flag': 0.18, 'warmonger': 0.21, 'gift of the woods': 0.14, 'vildin-pack outcast': 0.07, 'inner-flame acolyte': 0.14, 'coalhauler swine': 0.12, 'quirion sentinel': 0.09, 'naga vitalist': 0.1, 'carbonize': 0.03, 'rip-clan crasher': 0.13, 'riot spikes': 0.08, 'dazzling reflection': 0.05, 'anchor to the aether': 0.1, 'smoldering butcher': 0.09, 'prepare': 0.13, 'echoing courage': 0.04, 'bloodstone goblin': 0.05, 'execute': 0.14, 'goblin furrier': 0.06, 'thoughtflare': 0.06, 'geist of the lonely vigil': 0.05, 'heed the mists': 0.18, 'demonspine whip': 0.14, 'chariot of the sun': 0.11, 'dragon scales': 0.13, 'heal': 0.04, "didn't say please": 0.24, "urza's hot tub": 0.28, 'leonin iconoclast': 0.09, 'dead': 0.17, 'bright reprisal': 0.03, "geomancer's gambit": 0.04, 'sun clasp': 0.1, 'marauding boneslasher': 0.03, 'smoke shroud': 0.08, 'amorphous axe': 0.01, 'horror of the broken lands': 0.12, 'pridemalkin': 0.04, 'cowed by wisdom': 0.14, 'captured sunlight': 0.1, 'war dance': 0.23, 'igneous pouncer': 0.15, 'brassclaw orcs': 0.05, 'roil spout': 0.07, 'fanatical fever': 0.15, 'midnight charm': 0.11, 'aven surveyor': 0.01, 'aven trailblazer': 0.08, 'aven fisher': 0.04, "jace's defeat": 0.04, 'greater sandwurm': 0.01, 'thoughtpicker witch': 0.24, 'guardian of solitude': 0.11, "witch's mist": 0.22, "executioner's hood": 0.1, 'manaplasm': 0.13, "prey's vengeance": 0.07, 'clever combo': 0.14, 'sickleslicer': 0.03, 'combust': 0.03, 'thought distortion': 0.06, 'mighty leap': 0.01, 'voyaging satyr': 0.08, 'double deal': 0.13, 'hidden ancients': 0.2, 'dragon mantle': 0.01, 'untamed might': 0.1, 'eron the relentless': 0.16, 'ponyback brigade': 0.07, 'ghitu war cry': 0.08, 'crumbling vestige': 0.19, "whitesun's passage": 0.05, 'stab wound': 0.04, 'demonic vigor': 0.1, 'court homunculus': 0.08, 'shrine of piercing vision': 0.11, 'shrike harpy': 0.04, 'shrill howler': 0.2, 'squirrel dealer': 0.3, 'detainment spell': 0.13, 'murder of crows': 0.01, 'sunder from within': 0.14, 'frilled deathspitter': 0.13, 'river darter': 0.02, 'sunder shaman': 0.13, 'famished paladin': 0.17, 'canyon wildcat': 0.05, 'forked-branch garami': 0.19, 'fork in the road': 0.05, 'staff of the death magus': 0.2, 'rock badger': 0.14, 'ancestral vengeance': 0.02, 'anarchist': 0.08, 'golden hind': 0.06, 'covert operative': 0.1, 'aven sentry': 0.01, 'festerhide boar': 0.08, 'excavating anurid': 0.03, 'healer of the glade': 0.03, 'jamuraan lion': 0.1, 'fungal plots': 0.23, 'urbis protector': 0.08, 'might of alara': 0.14, 'bloodlust inciter': 0.07, 'pondering mage': 0.04, 'forsake the worldly': 0.27, 'noble banneret': 0.06, 'urborg shambler': 0.14, 'balduvian war-makers': 0.08, 'jaya, venerated firemage': 0.22, 'thraben valiant': 0.08, 'exhumer thrull': 0.11, 'crag puca': 0.08, 'first come, first served': 0.18, "vraska's conquistador": 0.16, 'zahid, djinn of the lamp': 0.09, 'blood-toll harpy': 0.06, 'glyph keeper': 0.1, 'sunhome stalwart': 0.1, 'plated pegasus': 0.17, 'jetting glasskite': 0.06, 'akki drillmaster': 0.11, 'caravan escort': 0.07, 'snare thopter': 0.06, 'griffin dreamfinder': 0.04, 'stampeding rhino': 0.1, 'prismatic wardrobe': 0.17, 'ignorant bliss': 0.2, 'cradle to grave': 0.1, 'ancient brontodon': 0.09, 'lead-belly chimera': 0.15, 'aspiring aeronaut': 0.03, 'yavimaya sapherd': 0.11, 'unlikely aid': 0.01, 'zanam djinn': 0.1, 'tel-jilad chosen': 0.07, 'unleash fury': 0.36, 'valiant guard': 0.1, 'healing hands': 0.05, 'prismatic boon': 0.12, 'wasp lancer': 0.18, 'bloodcrazed neonate': 0.07, 'rhox oracle': 0.02, 'cloak of invisibility': 0.1, 'flowstone shambler': 0.09, 'guardians of koilos': 0.01, 'orcish farmer': 0.04, 'cemetery gate': 0.15, 'lose calm': 0.06, 'roots': 0.03, 'ancient animus': 0.02, 'sighted-caste sorcerer': 0.11, 'aven wind mage': 0.03, 'goblin gaveleer': 0.09, 'sprout': 0.16, 'ignoble soldier': 0.15, 'primal druid': 0.1, 'thraben gargoyle': 0.07, 'utvara scalper': 0.06, 'ambush party': 0.04, 'stampede driver': 0.07, 'headstone': 0.14, 'exotic curse': 0.1, 'manaforce mace': 0.1, 'frost lynx': 0.01, 'horizon scholar': 0.01, 'astrolabe': 0.07, 'fyndhorn druid': 0.08, 'elder pine of jukai': 0.14, 'sensor splicer': 0.11, 'tithebearer giant': 0.08, 'defile': 0.25, 'lead by example': 0.03, 'moroii': 0.03, 'thought prison': 0.14, 'cone of flame': 0.07, 'belle of the brawl': 0.06, 'shimmering wings': 0.12, 'narcissism': 0.12, 'lunge': 0.13, 'deathless ancient': 0.04, 'luminous guardian': 0.11, 'nomadic elf': 0.12, 'senseless rage': 0.1, 'diving griffin': 0.13, 'sleep paralysis': 0.02, 'lazotep reaver': 0.12, 'skirsdag cultist': 0.04, 'once and future': 0.1, 'thalakos scout': 0.08, 'sentinel of the eternal watch': 0.11, 'assassinate': 0.01, 'fiery conclusion': 0.06, 'skyrider patrol': 0.07, 'lightning mare': 0.05, 'shimmering efreet': 0.2, 'latch seeker': 0.1, 'grave strength': 0.1, 'glittering lion': 0.14, 'elite vanguard': 0.1, "horobi's whisper": 0.07, 'death frenzy': 0.06, 'crystalline nautilus': 0.07, 'not forgotten': 0.11, 'hound of the farbogs': 0.02, 'select for inspection': 0.1, 'floating shield': 0.08, 'narrow escape': 0.05, 'soul rend': 0.12, 'moonlit strider': 0.08, 'lay waste': 0.09, 'cleaver riot': 0.1, 'selective snare': 0.05, 'nantuko shaman': 0.01, "geistcatcher's rig": 0.08, "sentinel's eyes": 0.08, "sentinel's mark": 0.09, 'murasa behemoth': 0.01, "witch's familiar": 0.06, 'territorial gorger': 0.08, 'daggerback basilisk': 0.03, 'self-assembler': 0.1, 'leave in the dust': 0.09, 'sky weaver': 0.05, 'fleeting distraction': 0.1, 'lingering death': 0.13, 'moorland inquisitor': 0.02, 'cloistered youth': 0.08, 'lavafume invoker': 0.06, 'flight of fancy': 0.04, 'lavakin brawler': 0.02, 'cleanfall': 0.21, 'fleeting aven': 0.1, 'cateran kidnappers': 0.19, 'torii watchward': 0.1, "skywhaler's shot": 0.01, 'naiad of hidden coves': 0.05, 'skyway sniper': 0.02, 'hour of glory': 0.1, 'aerial formation': 0.02, "liliana's devotee": 0.03, 'leafkin avenger': 0.07, 'grasp of phantoms': 0.02, 'three-headed goblin': 0.34, 'warpath': 0.1, 'slab hammer': 0.09, "taigam's scheming": 0.06, 'hunting drake': 0.08, 'echoing boon': 0.06, 'oran-rief invoker': 0.06, 'oppressive will': 0.07, 'kolaghan stormsinger': 0.04, 'enhanced surveillance': 0.11, 'lore weaver': 0.13, 'gilt-leaf ambush': 0.2, "artificer's epiphany": 0.09, 'tectonic rift': 0.01, 'bash to bits': 0.17, 'skywise teachings': 0.12, 'ahn-crop champion': 0.07, 'humble the brute': 0.04, 'more or less': 0.1, "hunter's edge": 0.02, 'wandering stream': 0.1, 'dread specter': 0.16, 'howling banshee': 0.1, 'loss': 0.07, 'lightning volley': 0.12, 'shinechaser': 0.03, 'grave peril': 0.09, 'enraged revolutionary': 0.04, 'onward': 0.1, 'tooth of chiss-goria': 0.26, 'thraben purebloods': 0.08, 'cloudseeder': 0.01, 'skulking ghost': 0.05, 'skyhunter patrol': 0.1, 'belltoll dragon': 0.24, 'sokenzan renegade': 0.14, 'battle-mad ronin': 0.12, 'open the gates': 0.11, 'lose hope': 0.12, 'winds of rebuke': 0.27, 'beacon behemoth': 0.09, 'shredding winds': 0.02, 'skizzik surger': 0.05, 'temporary insanity': 0.1, 'skittish valesk': 0.13, 'slaughterhorn': 0.02, 'opal lake gatekeepers': 0.01, 'living destiny': 0.06, "gideon's triumph": 0.04, 'sight beyond sight': 0.06, 'sightless brawler': 0.07, 'carnival': 0.07, 'disorder': 0.12, "barrin's unmaking": 0.1, 'gimme five': 0.09, 'arcane flight': 0.05, 'battle display': 0.07, 'conclave equenaut': 0.08, 'krovikan fetish': 0.03, "wolfrider's saddle": 0.06, 'sluggishness': 0.1, 'laccolith rig': 0.09, 'shadow lance': 0.14, 'oddly uneven': 0.19, 'liege of the axe': 0.13, 'fleetfeather cockatrice': 0.1, 'hunt the hunter': 0.07, 'gift of growth': 0.04, 'shadowbane': 0.11, 'lammastide weave': 0.1, 'thorn-thrash viashino': 0.21, 'clinging mists': 0.07, 'lucky clover': 0.08, 'loxodon peacekeeper': 0.2, 'cephalid scout': 0.11, 'beetleform mage': 0.08, 'settle beyond reality': 0.02, 'carrier pigeons': 0.11, 'cephalid sage': 0.1, 'severed legion': 0.09, 'sifter wurm': 0.01, 'erdwal illuminator': 0.22, 'epic confrontation': 0.14, "leovold's operative": 0.1, 'mossfire egg': 0.22, 'feral instinct': 0.09, 'dagger caster': 0.09, 'time of ice': 0.1, 'arc mage': 0.13, 'ocular halo': 0.08, 'shaper parasite': 0.02, 'cephalid aristocrat': 0.07, 'thirsting shade': 0.01, "muzzio's preparations": 0.11, 'geist-fueled scarecrow': 0.06, 'shambling attendants': 0.09, 'colossal heroics': 0.09, 'smash': 0.06, 'flowstone hellion': 0.08, 'nimbus naiad': 0.07, 'tel-jilad justice': 0.12, 'gobhobbler rats': 0.07, 'tidy conclusion': 0.02, 'thirst for meaning': 0.03, 'shaper apprentice': 0.01, 'tide skimmer': 0.03, 'bedeck': 0.09, 'assemble the rank and vile': 0.06, 'bedazzle': 0.09, 'earthen goo': 0.1, 'nimble-blade khenra': 0.02, 'ashen monstrosity': 0.12, 'ainok guide': 0.04, 'esper battlemage': 0.08, 'krovikan plague': 0.12, 'thermal navigator': 0.13, 'somberwald dryad': 0.05, 'silumgar scavenger': 0.06, 'ticking gnomes': 0.05, 'benthicore': 0.15, 'erase': 0.06, 'thermal glider': 0.13, 'loxodon wayfarer': 0.08, 'carnage': 0.07, 'shadowcloak vampire': 0.03, "tiana, ship's caretaker": 0.02, 'elfhame druid': 0.09, 'elixir of vitality': 0.13, 'loyal gyrfalcon': 0.09, 'silumgar butcher': 0.01, 'silkbind faerie': 0.16, 'gilt-leaf seer': 0.09, 'war-spike changeling': 0.08, 'callous dismissal': 0.07, 'shaleskin bruiser': 0.1, 'nightshade seer': 0.11, 'krumar bond-kin': 0.03, 'lightning dart': 0.13, 'field surgeon': 0.18, 'hedron alignment': 0.11, 'dawnglare invoker': 0.08, 'cobbled wings': 0.05, 'noble steeds': 0.13, 'omen of the hunt': 0.05, 'thunder of hooves': 0.11, 'omen of the sun': 0.04, 'wander in death': 0.09, "cauldron's gift": 0.02, 'six-y beast': 0.06, 'desert cerodon': 0.11, 'birthing hulk': 0.11, "demon's herald": 0.1, "bear's companion": 0.1, 'shepherd of the flock': 0.07, "ephara's radiance": 0.04, 'shepherd of the lost': 0.13, "behemoth's herald": 0.07, 'the binding of the titans': 0.1, 'larger than life': 0.08, 'flowstone thopter': 0.13, 'geist of the moors': 0.02, 'take down': 0.02, 'ward of piety': 0.1, 'enraging licid': 0.16, 'caught in the brights': 0.02, "wanderer's strike": 0.05, 'clergy en-vec': 0.18, 'ghastly discovery': 0.09, 'cunning survivor': 0.01, 'greenhilt trainee': 0.06, 'thallid omnivore': 0.08, 'aeronaut admiral': 0.1, 'lashweed lurker': 0.09, 'frostburn weird': 0.05, 'gnarlid pack': 0.08, "kozilek's channeler": 0.15, 'arcane spyglass': 0.09, 'thunder brute': 0.04, 'flickering spirit': 0.06, 'titanic brawl': 0.1, 'fleetwheel cruiser': 0.23, 'willow faerie': 0.15, 'lash of thorns': 0.01, 'skatewing spy': 0.11, 'smuggler captain': 0.06, 'coerced confession': 0.09, 'common bond': 0.03, 'wojek halberdiers': 0.09, 'thornhide wolves': 0.02, 'soldevi steam beast': 0.1, 'mortus strider': 0.06, 'goblin artillery': 0.1, 'elemental uprising': 0.04, 'frost breath': 0.01, "teferi's honor guard": 0.12, 'neurok transmuter': 0.19, "elspeth's devotee": 0.11, 'captive flame': 0.11, 'soratami mindsweeper': 0.24, 'woodcloaker': 0.09, 'lifecraft cavalry': 0.02, 'biogenic upgrade': 0.09, 'mysteries of the deep': 0.07, 'windborne charge': 0.04, 'thunderheads': 0.13, 'murmuring phantasm': 0.14, 'elgaud shieldmate': 0.11, 'dread warlock': 0.07, 'netcaster spider': 0.02, 'dreadwing': 0.1, "tishana's wayfinder": 0.05, 'destroy the evidence': 0.05, 'cartouche of ambition': 0.05, 'nettletooth djinn': 0.17, 'tapestry of the ages': 0.08, "d'avenant trapper": 0.01, "serra's boon": 0.12, 'warden of the beyond': 0.04, 'winged shepherd': 0.04, 'aggression': 0.16, 'lumengrid sentinel': 0.1, 'oaken boon': 0.02, 'fleshpulper giant': 0.05, 'orcish conscripts': 0.03, "knight's pledge": 0.08, 'brazen buccaneers': 0.02, 'igneous cur': 0.02, 'riot piker': 0.01, 'an-havva inn': 0.18, 'stalker hag': 0.2, 'riptide crab': 0.04, 'rimrock knight': 0.05, 'break of day': 0.05, 'durable handicraft': 0.13, 'righteous blow': 0.01, 'usher to safety': 0.07, 'amplifire': 0.1, 'aven trooper': 0.08, "urza's tome": 0.1, 'breaching hippocamp': 0.12, 'uncomfortable chill': 0.02, 'welding sparks': 0.01, 'urborg panther': 0.12, 'rite of the serpent': 0.05, 'stadium vendors': 0.03, 'ritual of rejuvenation': 0.08, "flamespeaker's will": 0.07, 'urban burgeoning': 0.11, 'gorilla berserkers': 0.1, 'bloodletter': 0.11, 'bloodied ghost': 0.12, 'sun-crowned hunters': 0.12, 'dark dabbling': 0.1, 'excoriate': 0.06, 'jagged poppet': 0.16, 'urborg uprising': 0.03, 'primal cocoon': 0.07, 'ambuscade shaman': 0.09, 'illusionary armor': 0.05, 'ghostfire': 0.06, 'bounty of might': 0.09, 'vampire sovereign': 0.1, 'gruesome deformity': 0.07, 'profit': 0.07, 'vampire opportunist': 0.17, 'dreamspoiler witches': 0.09, 'deadly wanderings': 0.06, 'revenge of ravens': 0.48, 'prophecy': 0.13, 'vaporkin': 0.04, 'returned centaur': 0.06, 'avid reclaimer': 0.15, 'returned phalanx': 0.01, 'mesa falcon': 0.05, 'mardu banner': 0.15, 'dreamshaper shaman': 0.1, 'rhystic syphon': 0.15, 'valakut predator': 0.04, 'ikiral outrider': 0.09, 'generous stray': 0.1, 'diligent excavator': 0.09, 'cradle of the accursed': 0.12, 'stampeding elk herd': 0.05, 'double header': 0.14, 'ivy seer': 0.12, 'ivy dancer': 0.11, 'balduvian frostwaker': 0.19, 'processor assault': 0.08, 'prized elephant': 0.2, 'prison realm': 0.08, 'prismite': 0.01, 'metathran transport': 0.1, 'zealot of the god-pharaoh': 0.16, 'rhox charger': 0.11, 'sultai skullkeeper': 0.02, 'death-mask duplicant': 0.1, 'pouncing lynx': 0.02, 'river hoopoe': 0.11, 'goblin sky raider': 0.07, 'fungal rebirth': 0.08, 'unerring sling': 0.11, 'jorubai murk lurker': 0.12, 'mind raker': 0.05, 'plague dogs': 0.12, 'circle of elders': 0.07, 'dauthi marauder': 0.08, 'jubilant mascot': 0.03, 'sunscape apprentice': 0.09, "rowan's battleguard": 0.09, 'charging bandits': 0.13, "planeswalker's scorn": 0.23, 'sporecap spider': 0.01, 'rot shambler': 0.11, 'unholy fiend': 0.08, 'corrupted zendikon': 0.14, 'rouse': 0.12, 'plague witch': 0.04, 'cinder shade': 0.12, 'diamond knight': 0.08, "splicer's skill": 0.02, 'undead slayer': 0.06, 'run away together': 0.01, 'superior numbers': 0.11, 'farrelite priest': 0.17, 'undergrowth scavenger': 0.14, 'juju bubble': 0.18, 'ruin rat': 0.1, 'double cross': 0.13, 'ruination wurm': 0.02, 'pistus strike': 0.12, 'empty-shrine kannushi': 0.24, 'squealing devil': 0.11, 'rock slide': 0.08, 'jelenn sphinx': 0.06, "mangara's equity": 0.14, 'plunder': 0.2, 'briarbridge patrol': 0.13, "courier's capsule": 0.12, "squire's devotion": 0.05, "river's grasp": 0.11, 'excavator': 0.12, 'hidden herbalists': 0.09, 'squelching leeches': 0.1, 'riverwheel aerialists': 0.04, 'untethered express': 0.25, 'yoke of the damned': 0.1, 'courageous outrider': 0.11, 'portal of sanctuary': 0.09, 'goblin secret agent': 0.11, 'weight of memory': 0.06, 'countermand': 0.11, 'goblin elite infantry': 0.04, 'tah-crop elite': 0.02, 'spreading flames': 0.09, 'cosmotronic wave': 0.05, 'minamo scrollkeeper': 0.06, 'rootrunner': 0.1, 'ichor explosion': 0.06, 'rootwater alligator': 0.06, 'crush contraband': 0.2, 'miming slime': 0.19, 'bloodcrazed goblin': 0.05, 'foriysian brigade': 0.09, 'aven cloudchaser': 0.09, 'sunhome enforcer': 0.16, 'rolling temblor': 0.01, 'root cage': 0.13, 'pledge of unity': 0.31, 'ronin houndmaster': 0.14, 'springjack knight': 0.07, 'boulder rush': 0.05, 'choking restraints': 0.02, "imps' taunt": 0.12, 'improvised armor': 0.15, 'frantic inventory': 0.04, 'chief of the scale': 0.03, 'memorial to glory': 0.1, 'rag dealer': 0.1, 'violet pall': 0.11, 'meletis astronomer': 0.05, 'inferno jet': 0.07, 'infernal scarring': 0.02, 'aether theorist': 0.03, 'viscerid armor': 0.08, 'voices from the void': 0.1, 'crossbow ambush': 0.09, 'strangling soot': 0.01, 'frenetic ogre': 0.19, 'frenetic raptor': 0.14, 'gristleback': 0.1, 'down': 0.12, 'inferno hellion': 0.05, 'flame elemental': 0.13, 'inner-flame igniter': 0.03, 'vigorspore wurm': 0.01, 'quilled slagwurm': 0.05, 'chorus of might': 0.03, 'flameborn hellion': 0.05, 'reclusive artificer': 0.09, 'mask of law and grace': 0.24, 'vigil for the lost': 0.1, 'inner struggle': 0.03, 'deeptread merrow': 0.11, 'alabaster wall': 0.09, 'flame-kin zealot': 0.12, 'implode': 0.15, 'village cannibals': 0.09, 'akroan hoplite': 0.1, "great teacher's decree": 0.09, 'razorjaw oni': 0.1, 'vigean intuition': 0.16, 'matopi golem': 0.15, 'grim roustabout': 0.03, 'incremental growth': 0.16, 'glaive of the guildpact': 0.05, "vivien's crocodile": 0.11, 'incursion specialist': 0.04, 'matca rioters': 0.08, 'chillerpillar': 0.05, "rakshasa's secret": 0.04, 'incite war': 0.07, 'deadeye rig-hauler': 0.03, 'maximize altitude': 0.04, 'face of fear': 0.07, 'maximize velocity': 0.06, 'rambunctious mutt': 0.01, 'rallying roar': 0.04, 'rally for the throne': 0.05, 'boonweaver giant': 0.19, 'decomposition': 0.19, 'meditation puzzle': 0.01, "medomai's prophecy": 0.08, 'strafe': 0.13, 'strands of undeath': 0.12, 'strandwalker': 0.07, 'infectious rage': 0.1, 'visions of brutality': 0.12, 'ray of erasure': 0.07, 'akroan line breaker': 0.1, 'griptide': 0.06, 'chill to the bone': 0.1, 'chitinous cloak': 0.06, 'ravenous harpy': 0.04, 'stonework puma': 0.1, 'voice of grace': 0.21, 'rakdos firewheeler': 0.06, 'frazzle': 0.09, 'deadly poison sampler': 0.16, 'stomping slabs': 0.08, 'mark of eviction': 0.11, 'invoke the divine': 0.01, 'steelclaw lance': 0.01, 'rending vines': 0.16, 'venture deeper': 0.13, "iona's blessing": 0.05, 'puncturing light': 0.07, 'defy gravity': 0.13, 'renegade wheelsmith': 0.14, "renegade's getaway": 0.03, 'foul-tongue shriek': 0.13, 'puncture bolt': 0.1, 'whispergear sneak': 0.11, 'relic runner': 0.01, 'invert': 0.14, 'invert the skies': 0.12, 'volcanic rush': 0.04, 'volcanic spray': 0.15, 'bogardan dragonheart': 0.01, 'stench of evil': 0.14, 'purify the grave': 0.02, 'invigorating surge': 0.34, 'goblin outlander': 0.1, 'foul-tongue invocation': 0.12, 'resounding scream': 0.06, 'resounding wave': 0.1, 'stealth mission': 0.06, 'vedalken infuser': 0.02, 'mark of the vampire': 0.05, 'illusionary terrain': 0.19, 'goblin glory chaser': 0.14, 'resolute survivors': 0.05, 'resolute rider': 0.04, "altar's light": 0.11, 'steamflogger of the month': 0.18, 'repeating barrage': 0.1, 'repel intruders': 0.16, 'merfolk secretkeeper': 0.13, 'falkenrath reaver': 0.09, 'merfolk spy': 0.09, 'reroute': 0.21, 'imagecrafter': 0.15, 'steamclaw': 0.19, 'zenith seeker': 0.07, 'aetherflame wall': 0.09, "aliban's tower": 0.11, 'martyrdom': 0.13, 'embereth shieldbreaker': 0.07, 'extra arms': 0.13, 'viashino sandscout': 0.1, 'graf mole': 0.1, 'when fluffy bunnies attack': 0.19, "dragon's eye sentry": 0.05, 'inspiring cleric': 0.09, 'martyr for the cause': 0.03, 'striped riverwinder': 0.39, 'stir the pride': 0.13, 'regenerate': 0.14, "veteran's voice": 0.07, "stitcher's apprentice": 0.04, 'viashino warrior': 0.05, 'bogardan rager': 0.06, 'strider harness': 0.02, 'view from above': 0.14, 'streetbreaker wurm': 0.07, "dovin's acuity": 0.11, 'victory': 0.1, 'stoic ephemera': 0.09, 'vicious offering': 0.06, 'whirlpool whelm': 0.12, 'boggart brute': 0.01, 'explosive revelation': 0.1, 'galloping lizrog': 0.11, 'relentless raptor': 0.11, 'steppe glider': 0.02, 'invent': 0.14, "inventor's apprentice": 0.04, 'cheap ass': 0.24, 'expose evil': 0.05, 'flaccify': 0.2, 'graf rats': 0.07, 'pyromania': 0.11, 'pyroclast consul': 0.07, 'spiteflame witch': 0.16, 'gorging vulture': 0.02, 'patagia golem': 0.08, 'blessed wine': 0.09, "gaea's bounty": 0.18, 'bant battlemage': 0.1, 'customs depot': 0.16, 'drakewing krasis': 0.03, 'scion of glaciers': 0.04, 'kheru lich lord': 0.13, 'bleak coven vampires': 0.1, 'pardic arsonist': 0.13, 'scattering stroke': 0.11, 'scatter arc': 0.04, 'mistfolk': 0.07, 'dwarven scorcher': 0.12, 'champion of arashin': 0.03, 'trickster mage': 0.12, "honor's reward": 0.07, 'goliath spider': 0.22, 'dauthi jackal': 0.08, 'parch': 0.06, 'paranoid delusions': 0.08, 'sandsower': 0.04, 'feat of resistance': 0.01, 'burst of energy': 0.17, 'grim contest': 0.09, 'panacea': 0.18, 'kingfisher': 0.09, 'mogg bombers': 0.07, "kingpin's pet": 0.08, "kinjalli's caller": 0.19, 'screams from within': 0.25, 'wild wurm': 0.16, 'ethereal whiskergill': 0.08, 'blazing volley': 0.03, 'panther warriors': 0.07, 'kiln walker': 0.08, 'mnemonic nexus': 0.26, 'scornful aether-lich': 0.1, 'treespring lorian': 0.05, 'keldon halberdier': 0.01, 'endoskeleton': 0.17, 'trumpet blast': 0.04, 'mirran spy': 0.18, 'daring buccaneer': 0.11, 'built to smash': 0.11, 'kaya, bane of the dead': 0.15, "chandra's pyrohelix": 0.01, 'dwarven grunt': 0.23, "sarkhan's rage": 0.07, 'convincing mirage': 0.1, 'deepwood tantiv': 0.13, 'trusty companion': 0.02, 'trusty packbeast': 0.01, 'kavu climber': 0.02, 'swat': 0.1, 'dwarven berserker': 0.1, 'kathari screecher': 0.05, 'tuinvale treefolk': 0.02, 'gore swine': 0.03, 'channel harm': 0.09, 'sandsteppe outcast': 0.07, 'make a wish': 0.09, "sphinx's disciple": 0.06, 'keeper of the flame': 0.2, 'pay no heed': 0.08, 'blightcaster': 0.07, 'wild mammoth': 0.09, "kefnet's last word": 0.15, 'triton cavalry': 0.04, 'triton tactics': 0.09, 'peace strider': 0.04, 'dense canopy': 0.29, 'triumph of gerrard': 0.09, 'trove of temptation': 0.11, 'keening banshee': 0.12, 'mischievous chimera': 0.03, 'aurora eidolon': 0.08, 'aurora griffin': 0.1, 'hagra sharpshooter': 0.06, 'majestic heliopterus': 0.23, 'drainpipe vermin': 0.06, 'dross hopper': 0.03, 'travel preparations': 0.09, 'way of the thief': 0.02, 'orzhov racketeers': 0.06, 'eternal taskmaster': 0.05, 'drag under': 0.09, 'monastery flock': 0.08, 'seasoned hallowblade': 0.14, 'font of fortunes': 0.07, 'hope and glory': 0.1, 'barbed lightning': 0.1, 'syndicate enforcer': 0.08, 'outrider en-kor': 0.02, 'outrider of jhess': 0.09, 'cabal surgeon': 0.1, 'hand of silumgar': 0.09, 'ornamental courage': 0.04, 'secret summoning': 0.13, 'secretkeeper': 0.1, 'claim of erebos': 0.04, 'soul sear': 0.09, 'moonhold': 0.15, 'seismic stomp': 0.03, 'engineered might': 0.03, 'syr faren, the hengehammer': 0.04, 'moonblade shinobi': 0.12, "syr alin, the lion's claw": 0.04, 'secrets of the golden city': 0.1, 'seeds of strength': 0.09, 'bladed bracers': 0.08, 'monstrous onslaught': 0.02, 'seed guardian': 0.13, 'crystal golem': 0.14, 'eternal isolation': 0.02, 'cessation': 0.12, 'soulstinger': 0.08, 'painbringer': 0.18, 'spawnbinder mage': 0.02, 'ghost-lit nourisher': 0.1, 'waylay': 0.2, 'gate hound': 0.11, 'pack guardian': 0.15, 'granitic titan': 0.04, 'aether burst': 0.14, 'citadel castellan': 0.07, 'mogg squad': 0.1, 'scrounge': 0.1, 'magma hellion': 0.06, 'trapped in the tower': 0.03, 'aether chaser': 0.04, "specter's wail": 0.11, 'kithkin daggerdare': 0.05, 'soulsworn spirit': 0.06, 'felhide brawler': 0.02, 'override': 0.1, 'sound the call': 0.07, 'molting harpy': 0.14, 'trained pronghorn': 0.08, 'enervate': 0.06, 'deathbloom thallid': 0.01, "greel's caress": 0.08, 'cyclone sire': 0.03, 'hana kami': 0.11, 'kithkin spellduster': 0.07, 'barbarian riftcutter': 0.09, 'auger spree': 0.06, 'sea monster': 0.02, 'mole worms': 0.12, 'gatherer of graces': 0.07, 'rustrazor butcher': 0.12, "karona's zealot": 0.05, 'ulvenwald captive': 0.23, 'phantom nomad': 0.08, 'twigwalker': 0.13, 'brood keeper': 0.09, 'ulvenwald bear': 0.1, 'ulvenwald abomination': 0.23, "chaplain's blessing": 0.11, 'disappear': 0.14, 'wailing ghoul': 0.1, 'mindeye drake': 0.03, 'corpse traders': 0.1, 'rusting golem': 0.12, 'phantom ninja': 0.1, 'brush with death': 0.07, 'rush of blood': 0.11, 'fat ass': 0.23, 'firefist striker': 0.06, 'firefly': 0.14, 'wail of the nim': 0.16, 'encampment keeper': 0.02, 'phantom flock': 0.13, 'wretched gryff': 0.1, 'rust scarab': 0.1, 'brushstrider': 0.04, 'just the wind': 0.05, 'dirty': 0.12, 'twin bolt': 0.04, 'kapsho kitefins': 0.06, "sage's row denizen": 0.04, "pharika's mender": 0.1, 'balshan collaborator': 0.1, 'giant opportunity': 0.04, 'phyrexian bloodstock': 0.1, 'aetherstorm roc': 0.12, 'two-headed giant': 0.15, 'twitch': 0.06, 'coralhelm guide': 0.02, 'sure strike': 0.01, "ugin's conjurant": 0.08, 'waker of waves': 0.29, 'goblin striker': 0.11, 'phantom whelp': 0.15, 'angelic armaments': 0.01, 'encircling fissure': 0.04, 'gutless ghoul': 0.16, 'phantom wurm': 0.03, 'wurmskin forger': 0.07, 'mindswipe': 0.18, 'blink of an eye': 0.19, 'aetherstream leopard': 0.05, 'wrench-rigger': 0.11, 'samurai enforcers': 0.15, 'minotaur aggressor': 0.06, 'curious killbot': 0.2, 'unchained berserker': 0.04, 'forerunner of slaughter': 0.11, 'gleaming barrier': 0.1, 'coordinated barrage': 0.13, 'graveyard shovel': 0.08, 'tunneler wurm': 0.13, 'angelic purge': 0.11, "minion's return": 0.1, 'samite pilgrim': 0.09, 'minotaur sureshot': 0.02, 'makindi sliderunner': 0.02, 'rush of battle': 0.04, 'samite ministration': 0.21, 'super-duper death ray': 0.08, 'luxa river shrine': 0.03, 'artillerize': 0.07, 'spotted griffin': 0.07, 'barkshell blessing': 0.09, 'azra smokeshaper': 0.07, 'heroism': 0.2, 'mindmelter': 0.11, 'llanowar knight': 0.14, 'mind extraction': 0.12, 'moonglove extract': 0.07, 'sparkcaster': 0.16, 'skyshroud sentinel': 0.06, 'mausoleum turnkey': 0.06, 'aysen bureaucrats': 0.05, 'enigma eidolon': 0.05, 'empyreal voyager': 0.05, 'lunarch mantle': 0.02, 'spire patrol': 0.06, 'clambassadors': 0.17, 'string of disappearances': 0.02, 'slaying mantis': 0.07, 'golgari raiders': 0.08, 'azorius ploy': 0.12, 'aven battle priest': 0.01, 'lotleth giant': 0.06, "basri's acolyte": 0.01, 'targeting rocket': 0.2, 'maggot therapy': 0.14, 'flailing drake': 0.13, 'defiant ogre': 0.04, 'windcaller aven': 0.03, 'llanowar visionary': 0.2, 'wild aesthir': 0.06, 'hired poisoner': 0.03, 'horrible hordes': 0.24, 'embereth paladin': 0.01, 'spiteful shadows': 0.05, 'dragon appeasement': 0.14, 'charging monstrosaur': 0.16, 'strength of isolation': 0.15, 'spire tracer': 0.08, 'tendrils of despair': 0.08, 'spirit flare': 0.13, 'hopping automaton': 0.11, 'glorifier of dusk': 0.06, 'webweaver changeling': 0.1, 'ember weaver': 0.04, 'ghitu firebreathing': 0.11, 'azorius arrester': 0.04, "martyrs' tomb": 0.13, 'storm fleet sprinter': 0.27, 'azra bladeseeker': 0.02, 'cinder seer': 0.13, 'live fast': 0.05, 'nacatl outlander': 0.09, 'lunar avenger': 0.1, 'skyshroud vampire': 0.07, 'sunspire gatekeepers': 0.02, 'splatter thug': 0.04, 'baloth null': 0.1, 'furious rise': 0.02, 'barge in': 0.03, 'artful looter': 0.12, 'macetail hystrodon': 0.11, 'monastery loremaster': 0.11, 'drifting shade': 0.05, 'tarpan': 0.05, 'atarka pummeler': 0.04, 'windgrace acolyte': 0.02, "davriel's shadowfugue": 0.02, 'sunscourge champion': 0.08, 'basalt golem': 0.22, 'centaur healer': 0.04, 'stoneshock giant': 0.14, 'soldevi heretic': 0.06, 'spirit weaver': 0.1, 'heirs of stromkirk': 0.09, 'ceta disciple': 0.06, 'aerie worshippers': 0.06, 'slash panther': 0.06, 'stonewright': 0.05, 'heckling fiends': 0.09, 'enfeeblement': 0.07, 'mana leech': 0.22, 'baloth gorger': 0.01, 'symbiotic beast': 0.14, 'spontaneous mutation': 0.01, 'mind maggots': 0.11, 'medicine runner': 0.09, 'snubhorn sentry': 0.05, 'mind games': 0.25, 'golgari rotwurm': 0.04, 'straw golem': 0.13, 'arrows of justice': 0.05, 'tainted monkey': 0.14, 'barbed foliage': 0.11, 'soul of the rapids': 0.02, 'soul-strike technique': 0.01, 'barkhide mauler': 0.06, "nahiri's machinations": 0.13, 'melt terrain': 0.14, 'moment of craving': 0.1, 'mind ravel': 0.09, 'elven rite': 0.07, 'master decoy': 0.02, 'dispossess': 0.12, 'slaughterhouse bouncer': 0.07, 'cinderbones': 0.15, 'morbid plunder': 0.07, 'emissary of sunrise': 0.07, 'loam larva': 0.04, 'cease-fire': 0.07, 'starved rusalka': 0.16, 'weldfast engineer': 0.05, 'march of the drowned': 0.15, 'encrust': 0.02, 'looming hoverguard': 0.09, 'murderous spoils': 0.16, 'chronostutter': 0.08, 'emergent growth': 0.04, 'banewasp affliction': 0.07, 'avenging arrow': 0.01, 'wild jhovall': 0.08, 'autumnal gloom': 0.1, 'filigree fracture': 0.13, 'battle brawler': 0.1, 'aether meltdown': 0.06, 'endure': 0.09, 'fighting drake': 0.06, 'subtle strike': 0.02, 'flamekin brawler': 0.12, 'temp of the damned': 0.15, 'wet willie of the damned': 0.19, 'succumb to temptation': 0.19, 'long-finned skywhale': 0.03, 'cave tiger': 0.11, 'chronatog totem': 0.14, 'chronicler of heroes': 0.04, 'awaken the bear': 0.06, 'longtusk cub': 0.05, 'defiant stand': 0.15, "centaur's herald": 0.05, "chandra's defeat": 0.03, 'mardu heart-piercer': 0.06, 'midnight recovery': 0.05, 'sweep away': 0.04, 'honor guard': 0.03, 'hideous visage': 0.09, 'hideous laughter': 0.12, 'swathcutter giant': 0.09, 'stalwart aven': 0.02, 'well': 0.08, "teferi's curse": 0.12, 'wind strider': 0.01, 'aven soulgazer': 0.11, 'swift reckoning': 0.05, "teferi's protege": 0.01, 'somber hoverguard': 0.06, 'spidery grasp': 0.03, 'emissary of despair': 0.08, 'dream thrush': 0.11, 'cursed ronin': 0.12, 'mantle of webs': 0.05, 'welkin tern': 0.04, 'spiked baloth': 0.06, 'weatherseed totem': 0.14, 'summit apes': 0.11, 'mirran mettle': 0.05, 'soltari lancer': 0.07, 'claustrophobia': 0.02, 'flames of the raze-boar': 0.09, 'standing troops': 0.06, 'assembly-worker': 0.02, 'sultai flayer': 0.07, "chandra's pyreling": 0.02, 'wind shear': 0.13, 'metathran soldier': 0.1, 'soliton': 0.1, 'metathran zombie': 0.09, 'minister of impediments': 0.11, 'staff of the flame magus': 0.1, 'mother bear': 0.06, 'tel-jilad archers': 0.07, 'make obsolete': 0.06, 'staff of the letter magus': 0.11, "chandra's triumph": 0.09, 'emberwilde augur': 0.1, 'axegrinder giant': 0.05, 'final payment': 0.06, 'mob': 0.01, 'aetherborn marauder': 0.07, 'magmatic chasm': 0.03, 'wild wanderer': 0.05, "heliod's punishment": 0.03, 'lofty denial': 0.09, 'stensia innkeeper': 0.02, 'cloaked siren': 0.04, 'stensia banquet': 0.1, 'spectral shepherd': 0.11, 'slipstream eel': 0.03, 'tempest owl': 0.08, 'aven farseer': 0.1, 'agent of shauku': 0.07, 'aura of dominion': 0.26, 'fugitive wizard': 0.09, 'marsh hulk': 0.04, 'mist intruder': 0.06, 'marshdrinker giant': 0.1, 'magma rift': 0.07, 'lost in thought': 0.1, 'mockery of nature': 0.14, 'aura barbs': 0.23, 'sprinting warbrute': 0.02, 'still life': 0.21, 'magma vein': 0.11, 'divergent growth': 0.09, 'marsh boa': 0.14, 'dauntless aven': 0.04, 'warthog': 0.15, 'sword dancer': 0.11, 'steamcore weird': 0.06, 'auriok transfixer': 0.08, 'mammoth spider': 0.01, 'hematite talisman': 0.2, 'aurochs': 0.03, 'market festival': 0.2, 'market': 0.02, 'myr quadropod': 0.28, 'hero of the nyxborn': 0.03, 'will-forged golem': 0.07, 'ghirapur guide': 0.06, 'weapon surge': 0.02, 'swooping talon': 0.13, 'mist raven': 0.1, 'merfolk seer': 0.08, "sorcerer's wand": 0.15, 'wicked akuba': 0.07, 'student of ojutai': 0.04, 'take into custody': 0.02, 'tandem tactics': 0.05, 'claws of valakut': 0.2, 'enduring victory': 0.02, 'steel sabotage': 0.03, 'chaos charm': 0.1, 'spell shrivel': 0.07, 'herald of the dreadhorde': 0.04, 'minotaur skullcleaver': 0.02, 'bulwark giant': 0.02, 'dragon fangs': 0.19, 'forbidding spirit': 0.09, 'protect': 0.05, 'scholar of athreos': 0.08, 'protection of the hekma': 0.07, 'pardic swordsmith': 0.07, 'halt order': 0.07, 'burning-tree vandal': 0.03, 'galestrike': 0.02, 'scent of ivy': 0.12, 'trespassing souleater': 0.05, 'contingency plan': 0.11, 'contraband kingpin': 0.1, 'retromancer': 0.11, 'disciple of phenax': 0.03, 'retributive wand': 0.05, 'tresserhorn skyknight': 0.15, 'acolyte of the inferno': 0.04, 'prosperous pirates': 0.01, 'burning-eye zubera': 0.14, 'vedalken entrancer': 0.1, 'kinsbaile skirmisher': 0.03, 'hammerfest boomtacular': 0.1, 'screams of the damned': 0.12, 'veiled apparition': 0.11, 'ironfist crusher': 0.19, 'anointer priest': 0.1, 'fall of the gavel': 0.05, 'scribe of the mindful': 0.05, 'feebleness': 0.01, 'dinosaur hunter': 0.01, 'air servant': 0.07, 'trap runner': 0.14, 'goblin war party': 0.04, 'scrapper champion': 0.05, 'kindle': 0.04, 'dross ripper': 0.02, 'blazing torch': 0.08, 'restoration gearsmith': 0.05, 'tread upon': 0.04, 'blazing hope': 0.03, 'defender of law': 0.14, 'trial of strength': 0.06, 'contract killing': 0.09, 'resounding thunder': 0.07, 'expel from orazca': 0.28, 'savage conception': 0.1, 'crashing tide': 0.03, 'pegasus courser': 0.01, 'evanescent intellect': 0.04, 'peema aether-seer': 0.07, 'savage silhouette': 0.03, 'savage smash': 0.03, 'disciple of grace': 0.05, 'savage surge': 0.04, 'evaporate': 0.14, 'akki underling': 0.08, 'crashing drawbridge': 0.53, 'blightsoil druid': 0.06, "vampire's bite": 0.14, 'peppersmoke': 0.11, "kaya's ghostform": 0.4, 'walking dream': 0.12, 'satyr nyx-smith': 0.09, 'satyr piper': 0.06, 'hyrax tower scout': 0.03, 'dwarven mine': 0.17, 'dazzling beauty': 0.1, 'darkling stalker': 0.1, 'trigon of corruption': 0.11, 'patrol hound': 0.11, 'crypt ripper': 0.06, 'burn away': 0.08, 'gravel-hide goblin': 0.02, 'grow from the ashes': 0.5, 'deft duelist': 0.1, 'scarred vinebreeder': 0.08, 'burn trail': 0.05, 'wrap in flames': 0.06, 'return to the earth': 0.03, 'peak eruption': 0.04, 'blightbeetle': 0.23, "vanguard's shield": 0.12, 'narnam cobra': 0.04, 'saving grace': 0.08, 'sawtooth ogre': 0.06, 'blight-breath catoblepas': 0.02, 'pause for reflection': 0.02, 'zealous strike': 0.02, 'scale of chiss-goria': 0.12, 'consuming bonfire': 0.07, 'falkenrath torturer': 0.05, 'dawnstrike paladin': 0.05, 'oreskos sun guide': 0.07, 'touch of the void': 0.03, 'haphazard bombardment': 0.08, "dragon's presence": 0.08, 'ordinary pony': 0.07, 'cackling witch': 0.12, 'touch and go': 0.16, 'sedge scorpion': 0.09, 'wall of fortune': 0.07, 'puppet conjurer': 0.07, 'hurly-burly': 0.03, 'hanweir lancer': 0.02, 'immobilizing ink': 0.12, "gaea's balance": 0.24, 'second guess': 0.04, 'wall of forgotten pharaohs': 0.03, 'towering thunderfist': 0.01, 'harbor guardian': 0.12, 'ordeal of thassa': 0.1, 'orcish vandal': 0.01, 'absorb vis': 0.06, 'pyre charger': 0.14, 'apothecary geist': 0.02, 'vessel of paramnesia': 0.05, 'tor giant': 0.05, 'zhalfirin knight': 0.07, 'reminisce': 0.16, 'goblin battle jester': 0.07, 'tortoise formation': 0.05, 'woolly loxodon': 0.03, 'allied reinforcements': 0.07, 'putrid warrior': 0.1, 'alley evasion': 0.04, 'consign to dream': 0.18, 'torpor dust': 0.04, 'alive': 0.08, 'grazing whiptail': 0.04, 'scrounger of souls': 0.02, 'experimental aviator': 0.11, 'scuzzback scrapper': 0.13, 'kitesail': 0.09, 'cryptwailing': 0.09, 'ether well': 0.13, 'public execution': 0.05, 'workshop assistant': 0.01, 'puffer extract': 0.15, 'kithkin harbinger': 0.24, 'consult the necrosages': 0.14, 'ethereal ambush': 0.05, 'altar of the lost': 0.07, "kiora's dambreaker": 0.02, 'transluminant': 0.09, 'ironclad slayer': 0.02, 'iron-barb hellion': 0.08, 'rescue': 0.08, 'alpine watchdog': 0.05, 'gallant cavalry': 0.03, 'buzzing whack-a-doodle': 0.11, 'work a double': 0.08, 'kjeldoran gargoyle': 0.43, 'renegade warlord': 0.07, 'frontline devastator': 0.03, 'over my dead bodies': 0.3, 'outwit': 0.08, 'kitsune riftwalker': 0.09, 'zephyr spirit': 0.07, 'consulate turret': 0.06, 'outland boar': 0.06, 'cabal torturer': 0.07, 'trained armodon': 0.03, 'kithkin shielddare': 0.09, 'kithkin zealot': 0.06, 'oxidda scrapmelter': 0.06, 'faithful squire': 0.09, 'seagraf skaab': 0.02, 'by gnome means': 0.16, 'overwhelm': 0.09, 'venomspout brackus': 0.14, 'kavu runner': 0.13, 'brackwater elemental': 0.09, 'topan freeblade': 0.09, 'bring low': 0.02, 'farm': 0.02, 'jackalope herd': 0.08, 'riptide chronologist': 0.12, 'idle thoughts': 0.1, 'gravity negator': 0.04, 'rooting kavu': 0.15, 'grim harvest': 0.19, 'rootwater commando': 0.06, 'rootwater mystic': 0.07, 'unholy indenture': 0.07, 'jousting lance': 0.03, "joven's tools": 0.16, 'rimebound dead': 0.23, 'ruination rioter': 0.02, 'pious warrior': 0.14, 'rime tender': 0.09, 'amrou scout': 0.03, 'goblin dynamo': 0.17, 'rimehorn aurochs': 0.17, 'idyllic grange': 0.05, 'igneous elemental': 0.01, 'ancient of the equinox': 0.1, 'dusk imp': 0.07, 'rubblebelt rioters': 0.06, 'ringwarden owl': 0.02, 'prescient chimera': 0.08, 'yavimaya barbarian': 0.11, 'blood ogre': 0.04, 'underhanded designs': 0.11, 'corrosive ooze': 0.06, 'covenant of blood': 0.05, 'universal solvent': 0.01, 'angel of renewal': 0.11, 'risen sanctuary': 0.04, 'power of fire': 0.07, "jedit's dragoons": 0.1, 'rockshard elemental': 0.24, 'rites of refusal': 0.2, 'guard duty': 0.06, 'demotion': 0.08, 'grim initiate': 0.08, 'robber fly': 0.28, 'voyager drake': 0.1, 'ancestral blade': 0.01, 'jaws of stone': 0.04, 'yoked plowbeast': 0.1, 'unyaro bee sting': 0.13, 'goblin s.w.a.t. team': 0.07, 'jangling automaton': 0.07, 'riverwise augur': 0.03, 'garrison griffin': 0.1, 'portent of betrayal': 0.01, 'pollen remedy': 0.07, 'bloodcrazed hoplite': 0.05, 'rona, disciple of gix': 0.08, 'bloodrock cyclops': 0.09, 'ronom serpent': 0.09, 'root greevil': 0.09, 'root out': 0.06, 'yavimaya scion': 0.12, 'frightcrawler': 0.07, 'pledge of loyalty': 0.22, 'unseen walker': 0.13, 'poison the well': 0.14, 'urborg skeleton': 0.12, 'durkwood baloth': 0.01, 'unruly mob': 0.01, "guardian's magemark": 0.08, 'unquenchable thirst': 0.01, 'bloom hulk': 0.09, 'sage of the falls': 0.07, 'exile into darkness': 0.13, 'ill-gotten inheritance': 0.1, 'salt road quartermasters': 0.04, 'saltwater stalwart': 0.05, 'samite alchemist': 0.12, 'samite blessing': 0.11, 'phantom beast': 0.05, 'turn to dust': 0.05, 'turn the tide': 0.03, "pharika's cure": 0.06, 'pheres-band raiders': 0.07, 'kami of the tended garden': 0.1, 'zap': 0.14, "pharika's libation": 0.05, 'blisterpod': 0.12, 'gutter skulk': 0.05, 'zealot il-vec': 0.12, 'phantom wings': 0.07, 'twin-silk spider': 0.02, 'cranial archive': 0.1, 'rhox meditant': 0.09, 'foul familiar': 0.06, 'pestilent kathari': 0.09, 'sandstone deadfall': 0.2, 'deal damage': 0.33, 'tuktuk grunts': 0.04, 'double stroke': 0.19, 'petalmane baku': 0.11, 'hackrobat': 0.07, 'dungeon shade': 0.07, 'everdream': 0.05, 'turbo-thwacking auto-hammer': 0.21, 'karplusan strider': 0.03, 'rhet-crop spearmaster': 0.02, 'tumble magnet': 0.01, 'dazzling lights': 0.02, 'braidwood sextant': 0.15, 'karplusan wolverine': 0.06, 'zealous guardian': 0.12, "brago's favor": 0.12, 'rhystic lightning': 0.09, 'valeron wardens': 0.03, 'undead minotaur': 0.03, 'pheres-band tromper': 0.02, 'die young': 0.02, 'angel of the dawn': 0.03, 'junktroller': 0.09, "umezawa's charm": 0.02, 'academy raider': 0.11, 'gust walker': 0.03, 'ignite the beacon': 0.17, 'bronze sword': 0.01, 'pride of conquerors': 0.09, "yamabushi's flame": 0.08, 'goblin replica': 0.09, 'ice cage': 0.02, 'goblin slingshot': 0.16, 'vorstclaw': 0.02, "angel's herald": 0.08, 'phyrexian snowcrusher': 0.22, 'sadistic augermage': 0.04, 'dire wolves': 0.11, 'dead reveler': 0.03, 'phyrexian debaser': 0.11, 'brass gnat': 0.13, 'saddleback lagac': 0.01, "kami of fire's roar": 0.13, 'two-headed zombie': 0.03, 'dire fleet neckbreaker': 0.24, 'ambuscade': 0.1, 'sacred white deer': 0.05, 'brood monitor': 0.15, 'sabertooth alley cat': 0.11, 'ruthless invasion': 0.03, 'jwar isle avenger': 0.05, 'gravetiller wurm': 0.1, 'goblin spelunkers': 0.09, 'frog tongue': 0.17, 'tyrranax': 0.04, 'angelfire crusader': 0.08, 'frogify': 0.18, 'phyrexian hulk': 0.03, 'forfend': 0.05, 'ore gorger': 0.17, "nissa's defeat": 0.03, 'era of innovation': 0.06, 'sigiled behemoth': 0.13, 'thopter arrest': 0.09, 'healing leaves': 0.15, 'viscerid drone': 0.05, 'razorfoot griffin': 0.02, 'grisly survivor': 0.05, 'lesser masticore': 0.11, 'capture sphere': 0.01, 'reaper of night': 0.01, 'eye collector': 0.02, 'siege wurm': 0.01, 'grixis battlemage': 0.12, 'reality hemorrhage': 0.08, 'erdwal ripper': 0.06, 'leonin squire': 0.13, 'boreal griffin': 0.08, 'crown of flames': 0.17, 'thieving sprite': 0.14, "razaketh's rite": 0.48, 'howlpack wolf': 0.05, 'warbringer': 0.1, 'zulaport chainmage': 0.04, 'ekundu cyclops': 0.12, 'inaction injunction': 0.04, 'carnage gladiator': 0.08, 'cold-water snapper': 0.03, 'silverstorm samurai': 0.16, 'crossway vampire': 0.1, 'simian brawler': 0.09, 'coiling woodworm': 0.17, 'eidolon of philosophy': 0.01, 'colorful feiyi sparrow': 0.15, 'infectious host': 0.06, 'equal treatment': 0.26, 'silent submersible': 0.21, 'inevitable end': 0.01, 'thermal blast': 0.06, 'war-wing siren': 0.07, 'dromoka captain': 0.07, 'colos yearling': 0.09, 'grixis illusionist': 0.07, 'combine guildmage': 0.07, 'simic basilisk': 0.12, 'quillmane baku': 0.14, 'errand of duty': 0.07, 'descendant of masumaro': 0.17, 'canyon lurkers': 0.02, 'zombie brute': 0.13, 'thoughtweft gambit': 0.16, 'fervent denial': 0.01, 'reckless pangolin': 0.04, 'war behemoth': 0.06, 'canopy stalker': 0.02, 'golden egg': 0.12, 'fluxcharger': 0.08, 'bellowing elk': 0.01, 'deathmark prelate': 0.15, 'furor of the bitten': 0.01, 'quicksmith genius': 0.1, 'notion rain': 0.11, 'cudgel troll': 0.08, 'echo circlet': 0.11, "witches' eye": 0.09, 'wanted scoundrels': 0.02, 'dromoka warrior': 0.04, 'fervent strike': 0.01, 'topan ascetic': 0.1, 'leeching licid': 0.15, 'noble templar': 0.06, 'goblin medics': 0.14, "legion's judgment": 0.01, 'thought eater': 0.1, 'rebellion of the flamekin': 0.17, 'wispweaver angel': 0.1, 'reaver drone': 0.05, 'combo attack': 0.04, 'exuberant firestoker': 0.1, 'shrewd negotiation': 0.07, 'archon of absolution': 0.16, 'village elder': 0.07, "initiate's companion": 0.04, 'nomad decoy': 0.09, 'command of unsummoning': 0.15, 'noggle bandit': 0.07, "gideon's sacrifice": 0.05, 'nocturnal raid': 0.19, 'lay bare': 0.09, 'lightning javelin': 0.02, 'armory guard': 0.04, 'deadeye harpooner': 0.09, 'cateran brute': 0.13, 'rank officer': 0.03, 'skull saucer': 0.04, 'cloudchaser eagle': 0.16, 'territorial boar': 0.02, 'boon of erebos': 0.04, 'battlegrowth': 0.09, 'grimclaw bats': 0.13, "arnjlot's ascent": 0.06, 'armored wolf-rider': 0.06, 'heartwood shard': 0.15, 'naya sojourners': 0.06, 'naya battlemage': 0.08, 'coal stoker': 0.01, 'howling giant': 0.02, 'entourage of trest': 0.01, 'beacon hawk': 0.1, 'free-range chicken': 0.09, 'dismantle': 0.03, 'battlefield percher': 0.1, 'windrider eel': 0.1, 'liquify': 0.11, "nath's elite": 0.06, 'incite insight': 0.19, 'vodalian mystic': 0.16, 'arrow volley trap': 0.08, 'dizzying gaze': 0.07, 'deepwood wolverine': 0.1, 'sky skiff': 0.08, 'deadeye quartermaster': 0.2, 'battlefield scavenger': 0.04, 'terra ravager': 0.08, 'fabrication module': 0.09, 'windrider patrol': 0.04, 'book burning': 0.15, 'lionheart maverick': 0.06, 'catacomb slug': 0.01, 'heartfire': 0.05, 'vizier of the anointed': 0.05, 'eyeblight assassin': 0.03, 'ravenous bloodseeker': 0.08, 'gift of strength': 0.01, 'sinister possession': 0.05, 'armament corps': 0.04, 'armament of nyx': 0.03, 'grip of desolation': 0.09, 'dragon wings': 0.17, "arlinn's wolf": 0.06, 'garbage fire': 0.1, "demon's jester": 0.1, 'carrion imp': 0.01, 'cogwork tracker': 0.09, 'hearthcage giant': 0.13, 'cogwork spy': 0.06, 'zulaport enforcer': 0.06, 'ravenous intruder': 0.02, 'siren of the fanged coast': 0.07, "thassa's bounty": 0.04, 'vivisection': 0.01, "thassa's emissary": 0.1, 'necromantic thirst': 0.06, 'armor of thorns': 0.07, 'frostling': 0.16, 'eyes of the watcher': 0.23, "thassa's devourer": 0.04, "vivien's grizzly": 0.04, 'rathi fiend': 0.09, 'incendiary dissent': 0.06, 'flood of recollection': 0.05, 'heartstabber mosquito': 0.08, 'nephalia moondrakes': 0.09, 'crippling blight': 0.01, 'krosan groundshaker': 0.18, 'bold impaler': 0.07, 'sewn-eye drake': 0.05, 'harvest fear': 0.01, "shade's breath": 0.14, 'odious trow': 0.09, 'imperious oligarch': 0.11, 'callaphe, beloved of the sea': 0.1, 'earth-origin yak': 0.03, 'essence depleter': 0.12, 'kraul warrior': 0.01, 'serve': 0.05, 'ogre leadfoot': 0.02, 'goblin haberdasher': 0.06, 'setessan oathsworn': 0.04, 'setessan petitioner': 0.02, 'regenesis': 0.05, 'time to reflect': 0.08, 'krosan archer': 0.07, "giant's skewer": 0.04, 'krovikan sorcerer': 0.04, "debtor's pulpit": 0.05, 'kyscu drake': 0.14, 'laboratory brute': 0.02, 'viashino sandsprinter': 0.03, 'goham djinn': 0.17, 'goatnapper': 0.16, 'fractured loyalty': 0.11, 'reef pirates': 0.11, 'frenzied rage': 0.03, 'kurgadon': 0.14, 'shambling suit': 0.11, 'tightening coils': 0.03, "dragon's herald": 0.07, 'earthlore': 0.05, 'harvestguard alseids': 0.13, 'compulsory rest': 0.03, 'alarum': 0.11, 'fountain of ichor': 0.1, 'confidence from strength': 0.09, 'draconic roar': 0.18, 'sensory deprivation': 0.02, 'oni possession': 0.18, 'boggart loggers': 0.07, 'tolarian emissary': 0.19, 'sentinel of the pearl trident': 0.04, 'ondu war cleric': 0.03, 'opal gargoyle': 0.07, 'kor aeronaut': 0.12, 'kor castigator': 0.01, 'opal caryatid': 0.12, 'kor sky climber': 0.01, 'zhur-taa goblin': 0.08, 'woodland druid': 0.13, 'onyx talisman': 0.11, 'serene remembrance': 0.13, 'bitterblade warrior': 0.04, 'boros mastiff': 0.06, 'essence feed': 0.08, "oketra's attendant": 0.1, "godo's irregulars": 0.18, 'serra inquisitors': 0.11, "ojutai's summons": 0.02, "ojutai's breath": 0.03, 'arachnoid': 0.13, 'tireless missionaries': 0.05, 'drooling groodion': 0.09, 'essence flare': 0.05, 'rejuvenation chamber': 0.12, 'omenspeaker': 0.01, 'omen of the forge': 0.02, 'omen of the dead': 0.04, 'errant minion': 0.06, 'shinka gatekeeper': 0.06, 'shield mare': 0.06, 'vicious kavu': 0.21, 'havoc': 0.17, 'quench': 0.02, 'insatiable souleater': 0.06, 'three tragedies': 0.14, 'lava zombie': 0.14, 'shining armor': 0.01, 'launch': 0.15, 'last thoughts': 0.05, 'commando raid': 0.1, 'last kiss': 0.06, 'throwing knife': 0.07, "arcanist's owl": 0.06, 'dual doomsuits': 0.2, 'haze frog': 0.13, 'shinewend': 0.14, 'lancers en-kor': 0.11, 'implement of examination': 0.03, 'crowned ceratok': 0.06, 'havengul skaab': 0.07, 'lairwatch giant': 0.1, 'hundred-talon strike': 0.12, "hazoret's undying fury": 0.12, 'wojek siren': 0.09, 'drowsing tyrannodon': 0.02, 'lamplighter of selhoff': 0.02, 'go to jail': 0.07, 'noxious dragon': 0.01, 'vampire warlord': 0.13, 'vigilant baloth': 0.03, "inquisitor's ox": 0.01, 'forsaken drifters': 0.03, 'volcanic upheaval': 0.01, "mary o'kill": 0.17, 'whimwader': 0.05, 'verdant field': 0.12, 'imperial ceratops': 0.11, 'strongarm thug': 0.15, 'into the fray': 0.11, 'craven knight': 0.09, 'craterize': 0.08, "inquisitor's snare": 0.1, 'ill-tempered cyclops': 0.06, 'ivory charm': 0.08, 'ghostly possession': 0.04, 'alley grifters': 0.12, 'ghosthelm courier': 0.09, 'allure of the unknown': 0.11, 'urban utopia': 0.04, 'vodalian arcanist': 0.01, 'vigorous charge': 0.15, 'innocence kami': 0.12, 'crown of empires': 0.15, 'stronghold taskmaster': 0.1, 'struggle': 0.07, 'urborg drake': 0.02, 'stormchaser chimera': 0.04, 'framed!': 0.11, 'drowned rusalka': 0.14, 'drekavac': 0.06, 'grayscaled gharial': 0.09, 'frightful delusion': 0.08, 'incited rabble': 0.06, 'aviation pioneer': 0.04, 'vesper ghoul': 0.1, 'hollow warrior': 0.13, 'urgent exorcism': 0.07, 'decision paralysis': 0.03, 'verdigris': 0.06, 'illusion': 0.1, 'hired muscle': 0.11, 'implement of improvement': 0.08, 'stormcloud djinn': 0.02, 'holy justiciar': 0.04, 'duergar assailant': 0.1, 'fortifying provisions': 0.01, 'aven warhawk': 0.12, "volrath's curse": 0.06, 'venerable lammasu': 0.03, 'vial of dragonfire': 0.02, 'frenzied arynx': 0.04, 'illusory demon': 0.07, 'irradiate': 0.05, 'chivalrous chevalier': 0.1, 'infiltrator il-kor': 0.01, 'illusionary wall': 0.06, 'stormwatch eagle': 0.07, 'subterranean scout': 0.02, 'fortuitous find': 0.08, 'frantic purification': 0.11, 'akki rockspeaker': 0.09, 'cho-arrim legate': 0.19, 'valley dasher': 0.06, 'viashino slasher': 0.08, 'druid of the cowl': 0.06, 'valeron outlander': 0.07, 'crafty pathmage': 0.06, 'dual shot': 0.03, 'druid of the sacred beaker': 0.09, 'veiling oddity': 0.02, 'inspiring captain': 0.09, 'glade watcher': 0.04, 'viashino outrider': 0.1, 'utopia vow': 0.01, 'vedalken certarch': 0.06, 'vectis silencers': 0.07, "iona's judgment": 0.02, 'ghoulsteed': 0.08, 'incendiary sabotage': 0.02, 'covetous urge': 0.04, 'crash the ramparts': 0.02, 'initiate of blood': 0.09, 'akoum boulderfoot': 0.06, 'strength of cedars': 0.12, 'avenging druid': 0.15, 'imposing visage': 0.08, 'vivify': 0.1, 'marble chalice': 0.09, 'alpine grizzly': 0.07, 'markov warlord': 0.06, "marauder's axe": 0.02, 'inspirit': 0.16, 'inspired charge': 0.02, 'vaultbreaker': 0.08, 'imaginary threats': 0.09, 'fresh volunteers': 0.1, 'akki raider': 0.15, 'amphibious kavu': 0.12, 'amphin pathmage': 0.03, 'fretwork colony': 0.05, 'churning eddy': 0.08, 'ingenious skaab': 0.04, 'gearsmith prodigy': 0.01, 'sultai banner': 0.1, "iroas's champion": 0.1, 'inescapable blaze': 0.08, "terashi's verdict": 0.09, 'loxodon anchorite': 0.14, "laquatus's disdain": 0.12, 'lapis lazuli talisman': 0.18, 'eaten by spiders': 0.11, 'hundred-talon kami': 0.1, 'hornet cannon': 0.1, 'tanglebloom': 0.1, 'companion of the trials': 0.11, 'deathcult rogue': 0.14, 'comparative analysis': 0.05, 'laccolith whelp': 0.08, 'earthshaker': 0.1, 'hungering yeti': 0.06, 'tidal bore': 0.18, 'complete disregard': 0.03, 'tidewalker': 0.09, 'wanderbrine rootcutters': 0.03, 'loyal cathar': 0.1, "latulla's orders": 0.13, "teacher's pet": 0.14, 'thraben militia': 0.08, 'thraben sentry': 0.08, 'lost in the mist': 0.08, 'lost legion': 0.01, "assassin's strike": 0.02, 'ebony rhino': 0.06, 'watcher in the mist': 0.06, 'lavacore elemental': 0.13, 'lava-field overlord': 0.09, 'lava storm': 0.1, 'grave servitude': 0.07, 'thriving rhino': 0.02, 'humbler of mortals': 0.08, 'wandering champion': 0.02, 'talruum champion': 0.1, "tilonalli's crown": 0.05, 'knight of the stampede': 0.23, 'waterwhirl': 0.05, "hunter's ambush": 0.04, 'atarka beastbreaker': 0.02, 'tooth collector': 0.05, 'crystal seer': 0.06, 'conifer strider': 0.05, 'tormented pariah': 0.13, 'folk medicine': 0.13, 'lurking arynx': 0.06, 'wavecrash triton': 0.04, 'clamor shaman': 0.05, 'knight watch': 0.01, 'tolarian kraken': 0.04, 'air bladder': 0.05, "giant's ire": 0.12, 'talon of pain': 0.14, 'fledgling djinn': 0.06, 'gingerbread cabin': 0.06, 'conclave phalanx': 0.12, "conclave's blessing": 0.09, 'kris mage': 0.14, 'divine light': 0.1, 'earth servant': 0.07, 'talas merchant': 0.13, 'kraul foragers': 0.03, 'aquus steed': 0.03, 'take up arms': 0.05, 'tajuru stalwart': 0.03, 'leafcrown dryad': 0.05, 'teardrop kami': 0.11, 'leafkin druid': 0.05, 'daru sanctifier': 0.08, "warlord's axe": 0.06, 'coastal hornclaw': 0.05, 'aggressive urge': 0.04, 'gift of the fae': 0.04, 'elder cathar': 0.09, 'loam dweller': 0.24, 'flicker of fate': 0.06, 'loch dragon': 0.04, 'locthwain gargoyle': 0.01, 'the fallen apart': 0.21, 'clock of doooooooooooom!': 0.11, 'lightbringer': 0.11, 'lifted by clouds': 0.07, 'cult guildmage': 0.06, 'arena athlete': 0.03, 'ardent soldier': 0.11, "warlord's fury": 0.18, 'hulking devil': 0.03, 'warped researcher': 0.14, 'frostwind invoker': 0.05, 'cunning bandit': 0.16, 'terraformer': 0.04, 'arsenal thresher': 0.14, 'grasp of the hieromancer': 0.07, 'cultivator drone': 0.06, 'flight spellbomb': 0.09, 'grasping thrull': 0.02, 'cloudchaser kestrel': 0.18, 'cloudheath drake': 0.06, 'cloudreach cavalry': 0.13, 'cloudskate': 0.07, 'flint golem': 0.15, 'warning': 0.06, 'grappler spider': 0.1, 'warcry phoenix': 0.09, 'warclamp mastiff': 0.09, 'clinging anemones': 0.02, 'thorned moloch': 0.01, 'agoraphobia': 0.05, 'leonin bola': 0.16, 'leonin bladetrap': 0.08, 'flesh allergy': 0.05, 'flowstone wall': 0.08, 'war horn': 0.1, 'thought harvester': 0.13, "gideon's reproach": 0.01, 'archon of falling stars': 0.01, 'leeching bite': 0.01, 'tectonic fiend': 0.06, 'leashling': 0.1, 'waste away': 0.04, "teferi's time twist": 0.14, 'gift of granite': 0.11, 'warchanter of mogis': 0.05, 'tempest caller': 0.16, 'tempered veteran': 0.02, 'lonesome unicorn': 0.02, "lookout's dispersal": 0.17, 'looming altisaur': 0.05, 'thick-skinned goblin': 0.01, 'leyline phantom': 0.08, 'edifice of authority': 0.04, 'think tank': 0.17, 'loose lips': 0.2, 'thirst': 0.07, 'tel-jilad outrider': 0.05, 'tel-jilad lifebreather': 0.03, 'lesser gargadon': 0.1, 'knight of the tusk': 0.03, 'knight of the skyward eye': 0.02, 'aethertow': 0.02, 'survive': 0.07, 'greenwood sentinel': 0.01, 'kami of twisted reflection': 0.1, 'twisted justice': 0.16, 'twisted reflection': 0.02, 'man of measure': 0.12, 'drown in shapelessness': 0.08, "kamahl's sledge": 0.08, 'duskrider peregrine': 0.03, "tyrant's machine": 0.01, 'uktabi efreet': 0.06, 'just desserts': 0.09, 'jungle wurm': 0.06, 'supersize': 0.13, 'trusted forcemage': 0.05, 'convolute': 0.01, 'makeshift mauler': 0.09, 'makindi aeronaut': 0.01, "kasmina's transmutation": 0.09, 'foreboding fruit': 0.1, 'makindi shieldmate': 0.08, 'giant scorpion': 0.08, 'tundra kavu': 0.07, 'flash conscription': 0.1, 'malefic scythe': 0.03, 'turn into a pumpkin': 0.04, 'turntimber grove': 0.1, 'uncovered clues': 0.03, "jolrael's favor": 0.1, 'vulpine goliath': 0.04, 'jinx': 0.25, 'graxiplon': 0.1, 'elvish lookout': 0.1, 'counsel of the soratami': 0.12, 'unnatural predation': 0.06, 'unnatural speed': 0.09, 'jeskai windscout': 0.04, 'aven eternal': 0.05, 'drelnoch': 0.09, 'aven fogbringer': 0.11, 'untamed hunger': 0.1, 'courier hawk': 0.07, 'aven gagglemaster': 0.01, 'unhallowed cathar': 0.1, 'curry favor': 0.03, 'unexplained vision': 0.06, 'elvish handservant': 0.09, 'homing lightning': 0.06, 'undead leotau': 0.07, 'jund sojourners': 0.06, "undercity's embrace": 0.02, 'jukai messenger': 0.14, 'elvish healer': 0.06, 'underworld charger': 0.01, 'judge unworthy': 0.02, 'vulshok gauntlets': 0.02, 'circle of affliction': 0.22, 'joust': 0.03, 'dusk feaster': 0.03, 'unearthly blizzard': 0.09, 'kithkin healer': 0.11, 'magefire wings': 0.09, 'tranquil garden': 0.16, 'kitesail scout': 0.03, 'magic word': 0.07, 'transcendent envoy': 0.04, "kirtar's desire": 0.16, 'granite grip': 0.11, 'frontier mastodon': 0.01, 'hush': 0.14, 'wall of distortion': 0.09, 'honorable scout': 0.09, 'kinsbaile balloonist': 0.09, 'anointed chorister': 0.02, 'trufflesnout': 0.01, 'kithkin zephyrnaut': 0.08, 'knight of new benalia': 0.02, 'dross golem': 0.1, 'frontline rebel': 0.01, 'town gossipmonger': 0.06, 'anvilwrought raptor': 0.02, 'kjeldoran warrior': 0.08, 'machinate': 0.07, 'synod centurion': 0.06, 'mad science fair project': 0.12, 'traitorous greed': 0.06, 'audacious infiltrator': 0.01, 'airdrop aeronauts': 0.04, 'consuming vortex': 0.1, 'aura finesse': 0.09, 'kindled fury': 0.02, 'tricks of the trade': 0.1, 'gravel slinger': 0.06, 'giant spectacle': 0.02, 'deny existence': 0.03, 'controlled instincts': 0.07, 'hypnotic swirly disc': 0.18, 'flash of defiance': 0.09, 'give no ground': 0.06, 'flash foliage': 0.12, 'crushing pain': 0.12, 'crushing canopy': 0.02, 'swift maneuver': 0.07, 'honor the god-pharaoh': 0.03, 'swelter': 0.1, 'truefire captain': 0.22, 'trueheart duelist': 0.09, 'trueheart twins': 0.03, 'switcheroo': 0.06, 'dross prowler': 0.08, 'depths of desire': 0.09, 'kill-suit cultist': 0.09, 'kill shot': 0.07, 'animus of predation': 0.08, 'dwarven trader': 0.18, 'khenra scrapper': 0.02, 'ghor-clan savage': 0.05, 'trespasser il-vec': 0.02, 'trestle troll': 0.03, 'affa protector': 0.01, 'animating faerie': 0.04, 'hyena pack': 0.02, 'vodalian serpent': 0.1, 'offering to asha': 0.09, 'salvage drone': 0.05, 'accursed centaur': 0.09, 'saltblast': 0.02, 'writ of passage': 0.14, 'phantom tiger': 0.12, 'pharagax giant': 0.04, "pharika's disciple": 0.08, 'sagu archer': 0.06, 'gutwrencher oni': 0.1, "sagittars' volley": 0.02, 'death of a thousand stings': 0.09, 'sandblast': 0.02, 'final reward': 0.02, 'sand golem': 0.13, 'sanctum guardian': 0.1, "cenn's heir": 0.11, 'snowfall': 0.13, 'socketed sprocketer': 0.1, 'so tiny': 0.01, 'soaring hope': 0.09, 'blinding spray': 0.05, 'willing test subject': 0.12, 'somberwald vigilante': 0.05, 'gustcloak harrier': 0.06, 'accessories to murder': 0.19, 'sacellum archers': 0.08, 'sabertooth mauler': 0.02, 'phyrexian denouncer': 0.1, 'accelerated mutation': 0.09, 'mosstodon': 0.08, 'rusted sentinel': 0.01, 'sage aven': 0.05, 'brown ouphe': 0.09, 'phobian phantasm': 0.09, 'gustcloak skirmisher': 0.19, 'barrow witches': 0.01, 'phosphorescent feast': 0.1, 'goblin swine-rider': 0.09, 'mournwhelk': 0.11, 'phyrexian battleflies': 0.12, 'heliophial': 0.1, 'blockbuster': 0.13, 'sandcrafter mage': 0.03, 'blinding fog': 0.09, 'burning-tree bloodscale': 0.07, 'cavern lampad': 0.05, 'enslaved dwarf': 0.21, 'sluiceway scorpion': 0.02, 'pattern matcher': 0.03, 'battle cry': 0.15, 'half-kitten, half-': 0.24, 'gloomlance': 0.1, 'filigree crawler': 0.03, 'scaleguard sentinels': 0.07, 'drake familiar': 0.09, 'acolyte of affliction': 0.09, 'slinking giant': 0.1, 'delighted killbot': 0.21, 'fiery intervention': 0.02, 'mystic familiar': 0.13, 'scarwood treefolk': 0.03, 'slippery scoundrel': 0.23, 'burning prophet': 0.15, 'scare tactics': 0.1, 'burlfist oak': 0.02, 'sandstone bridge': 0.07, 'hedron rover': 0.06, 'wreak havoc': 0.15, 'bathe in dragonfire': 0.06, 'mummy paramount': 0.02, 'bastion inventor': 0.05, 'battering krasis': 0.05, 'sangrophage': 0.01, 'sandstorm eidolon': 0.08, 'snarespinner': 0.01, 'dagger of the worthy': 0.05, "satyr's cunning": 0.01, 'smite': 0.03, 'smitten swordmaster': 0.03, 'peema outrider': 0.03, 'savage hunger': 0.06, 'sauroform hybrid': 0.02, 'pendrell drake': 0.12, 'blind creeper': 0.05, 'saruli caretaker': 0.19, 'gloom sower': 0.01, 'filthy cur': 0.09, 'soothing balm': 0.13, 'soratami cloud chariot': 0.25, 'dragonstalker': 0.1, 'fire-field ogre': 0.09, 'brightwood tracker': 0.01, 'abzan banner': 0.1, 'desperate sentry': 0.04, 'rollick of abandon': 0.03, 'abzan advantage': 0.03, "yeva's forcemage": 0.03, "chainer's torment": 0.11, 'fire-omen crane': 0.08, 'barbarian guides': 0.08, 'breezekeeper': 0.07, 'rolling spoil': 0.11, 'glimpse of freedom': 0.02, 'molten ravager': 0.11, 'plasma elemental': 0.12, 'rootbreaker wurm': 0.04, 'furious reprisal': 0.02, 'spark harvest': 0.01, 'root-kin ally': 0.07, 'plated wurm': 0.11, 'goblin shortcutter': 0.01, 'glimmering angel': 0.1, 'soratami mirror-guard': 0.09, 'mistform shrieker': 0.14, 'ritual of the returned': 0.09, 'spell snuff': 0.02, 'spell contortion': 0.07, 'bloodpyre elemental': 0.05, 'banishment decree': 0.04, 'dawn evangel': 0.01, 'riverfall mimic': 0.05, 'spectral flight': 0.1, 'cutthroat il-dal': 0.01, 'portcullis vine': 0.03, 'yoked ox': 0.02, 'spectral reserves': 0.05, 'river serpent': 0.11, 'mistral singer': 0.01, 'enemy of enlightenment': 0.01, "river heralds' boon": 0.04, 'pouncing wurm': 0.19, 'breathstealer': 0.1, 'farbog boneflinger': 0.04, 'molting snakeskin': 0.07, 'soulshriek': 0.07, 'rumbling ruin': 0.03, 'despondent killbot': 0.23, 'soul charmer': 0.18, 'pincer spider': 0.09, 'gus': 0.13, 'pinecrest ridge': 0.18, 'pillar of light': 0.08, 'moriok scavenger': 0.1, 'cyclopean snare': 0.1, 'morgue burst': 0.05, 'piston-fist cyclops': 0.01, 'ceremonial guard': 0.03, 'mosquito guard': 0.13, 'soratami rainshaper': 0.13, 'rushwood dryad': 0.05, "gerrard's irregulars": 0.11, 'pilgrim of the fires': 0.12, 'eviscerate': 0.02, 'wildwood rebirth': 0.03, 'brontotherium': 0.17, 'barrel down sokenzan': 0.15, 'barrage of boulders': 0.07, 'goblin smuggler': 0.01, 'pit imp': 0.05, 'soul of magma': 0.11, 'moniker mage': 0.11, 'guest list': 0.14, 'plague beetle': 0.06, 'bring to life': 0.04, 'rousing read': 0.01, 'farewell to arms': 0.16, 'soulgorger orgg': 0.16, 'rotting fensnake': 0.06, 'brine shaman': 0.06, 'dispatch dispensary': 0.23, 'moonbow illusionist': 0.12, 'hellkite punisher': 0.05, 'death rattle': 0.09, 'pitchburn devils': 0.01, 'soul parry': 0.08, 'pitiless gorgon': 0.03, 'pitiless horde': 0.12, 'hellkite whelp': 0.07, 'mystic penitent': 0.13, 'passwall adept': 0.02, 'silkweaver elite': 0.02, 'escape velocity': 0.02, 'dampen thought': 0.09, 'shadowstorm vizier': 0.05, 'nightsoil kami': 0.1, 'esper cormorants': 0.09, 'shadowfeed': 0.14, 'silent-chant zubera': 0.08, 'feral lightning': 0.2, 'oculus': 0.04, 'caregiver': 0.06, 'nightwing shade': 0.04, 'calming licid': 0.09, 'nim shrieker': 0.03, 'caravan hurda': 0.02, 'hate weaver': 0.1, 'nimbus champion': 0.06, 'ferocity': 0.13, 'ferocious pup': 0.04, 'hatchet bully': 0.13, 'silent dart': 0.02, 'dakmor bat': 0.12, 'devouring hellion': 0.03, 'shackles': 0.04, 'hearth kami': 0.1, 'aegis automaton': 0.03, 'nettling curse': 0.12, 'biting tether': 0.13, 'adaptive snapjaw': 0.01, 'fend off': 0.09, 'dreadmalkin': 0.08, 'devotee of strength': 0.02, 'essence bottle': 0.13, 'severed strands': 0.04, 'nightguard patrol': 0.09, 'nightfire giant': 0.05, 'silverback shaman': 0.02, 'odunos river trawler': 0.06, "nightbird's clutches": 0.04, 'heart-piercer bow': 0.01, 'silverflame squire': 0.01, 'sever soul': 0.09, 'setessan training': 0.01, 'ogre recluse': 0.05, 'ogre savant': 0.05, 'feast of flesh': 0.05, 'null champion': 0.13, 'hazy homunculus': 0.07, 'cannibalize': 0.06, 'beloved princess': 0.05, 'benalish emissary': 0.14, 'shipwreck moray': 0.05, 'gnat alley creeper': 0.09, 'furtive homunculus': 0.04, 'shrieking grotesque': 0.07, 'golden urn': 0.1, 'numai outcast': 0.12, 'fervent paincaster': 0.03, 'shivan fire': 0.03, 'shimmer of possibility': 0.09, 'shoal serpent': 0.04, 'shore keeper': 0.01, 'belligerent brontodon': 0.1, 'belligerent hatchling': 0.13, 'adorable kitten': 0.12, 'short sword': 0.01, 'gnomeball machine': 0.23, 'witness of tomorrows': 0.01, 'siege striker': 0.02, 'erratic visionary': 0.01, 'gnarled sage': 0.01, 'oakheart dryads': 0.03, 'benefaction of rhonas': 0.05, 'sigardian priest': 0.05, 'wolfkin bond': 0.02, 'ferrovore': 0.03, 'goatnap': 0.05, 'ninja': 0.14, 'captivating glance': 0.22, 'devourer of memory': 0.02, 'nurturer initiate': 0.09, 'no escape': 0.02, 'goldmeadow dodger': 0.09, 'shifting loyalties': 0.14, "nylea's huntmaster": 0.01, 'shieldhide dragon': 0.17, 'shielded aether thief': 0.09, 'havoc devils': 0.01, 'benalish missionary': 0.06, "healer's headdress": 0.1, 'benalish trapper': 0.06, 'nyxborn rollicker': 0.05, 'on alert': 0.01, 'cartouche of zeal': 0.06, 'cabal inquisitor': 0.08, 'skyhunter prowler': 0.1, 'feisty stegosaurus': 0.1, 'seafloor debris': 0.14, 'seacoast drake': 0.11, "nath's buffoon": 0.07, 'hammerhead shark': 0.06, 'skyrider trainee': 0.02, 'daybreak charger': 0.01, 'overgrown armasaur': 0.08, 'orochi ranger': 0.06, 'goblin bird-grabber': 0.02, "orim's touch": 0.08, 'bay falcon': 0.08, 'battlewise aven': 0.06, 'cached defenses': 0.05, 'searing barrage': 0.01, 'sky-eel school': 0.02, 'pack mastiff': 0.01, "ghalma's warden": 0.06, 'sleep of the dead': 0.01, 'scour all possibilities': 0.05, 'nafs asp': 0.07, 'mystic veil': 0.1, 'hallowed healer': 0.07, 'scuttlegator': 0.03, 'goblin brawler': 0.07, 'pain kami': 0.13, 'nantuko disciple': 0.05, 'scrapdiver serpent': 0.01, 'screamreach brawler': 0.04, 'geyser glider': 0.05, 'scrapskin drake': 0.08, 'bladetusk boar': 0.01, "orim's cure": 0.1, "nature's kiss": 0.04, 'optical optimizer': 0.24, 'skeletal kathari': 0.1, 'opportunist': 0.11, 'needlebug': 0.09, 'calciderm': 0.01, 'hardened-scale armor': 0.08, 'opaline bracers': 0.1, 'femeref healer': 0.06, 'glory seeker': 0.08, 'catacomb crocodile': 0.01, 'hardened berserker': 0.03, 'cackling imp': 0.13, 'nessian wanderer': 0.07, 'ondu rising': 0.03, 'siren lookout': 0.04, 'one with the stars': 0.01, 'sentinels of glen elendra': 0.12, 'nesting wurm': 0.13, 'nephalia seakite': 0.02, 'woodland guidance': 0.14, 'devoted crop-mate': 0.07, 'necrogen scudder': 0.03, 'orazca relic': 0.06, "god-pharaoh's faithful": 0.06, 'seismic shift': 0.01, 'woodwraith strangler': 0.11, 'blade juggler': 0.05, 'bladeback sliver': 0.09, 'seer of the last tomorrow': 0.01, 'skittish kavu': 0.14, 'skophos warleader': 0.01, 'bladed sentinel': 0.02, 'skitter eel': 0.01, 'orcish mine': 0.15, 'skinwing': 0.03, 'defang': 0.09, 'devilthorn fox': 0.03, 'woodlurker mimic': 0.07, 'skirk outrider': 0.07, 'entrancing lyre': 0.03, "navigator's ruin": 0.07, 'woodripper': 0.17, 'seizures': 0.09, 'break open': 0.09, 'finish': 0.11, 'wild leotau': 0.04, "hierophant's chalice": 0.11, 'abstruse interference': 0.02, 'grotesque demise': 0.02, 'purge': 0.06, 'midnight covenant': 0.08, 'emissary of hope': 0.1, 'staff of the wild magus': 0.12, 'encase in ice': 0.05, 'glass golem': 0.12, 'renegade demon': 0.09, 'might makes right': 0.13, 'stabbing pain': 0.04, 'renewal': 0.18, 'stamp of approval': 0.1, 'pus kami': 0.22, 'put away': 0.1, 'bolt bend': 0.48, 'quag sickness': 0.03, 'start': 0.11, 'dimir locket': 0.11, 'reknit': 0.2, 'relentless advance': 0.05, 'relentless hunter': 0.02, 'star-crowned stag': 0.01, 'metamorphose': 0.25, 'gateway shade': 0.07, 'standing army': 0.13, 'defensive maneuvers': 0.05, 'metathran elite': 0.14, 'stand firm': 0.17, 'glass asp': 0.08, 'relic ward': 0.15, 'pulse of the dross': 0.2, 'splitting headache': 0.1, 'expendable troops': 0.07, 'gaze of pain': 0.07, 'grovetender druids': 0.06, 'bog down': 0.09, 'cursed flesh': 0.02, 'returned reveler': 0.12, 'revealing wind': 0.04, 'spiteful blow': 0.06, 'mind swords': 0.22, 'revelsong horn': 0.07, 'goremand': 0.01, 'fires of undeath': 0.05, 'glaze fiend': 0.03, 'revenant patriarch': 0.07, 'proper laboratory attire': 0.11, 'wild colos': 0.12, 'zephyr net': 0.05, 'restore the peace': 0.07, 'renowned weaver': 0.05, 'ballista charger': 0.1, 'experimental overload': 0.11, 'pulsating illusion': 0.14, 'goblin patrol': 0.06, 'grounded': 0.04, 'spurred wolverine': 0.03, 'millennial gargoyle': 0.01, 'wicked reward': 0.02, 'resounding roar': 0.09, 'prying questions': 0.03, 'prowling pangolin': 0.03, 'restless dead': 0.12, 'steadfast armasaur': 0.1, 'ravenous giant': 0.01, "melira's keepers": 0.03, 'rakdos drake': 0.04, 'razor barrier': 0.15, 'menagerie liberator': 0.04, 'mending touch': 0.03, 'stomp and howl': 0.14, 'gristle grinner': 0.02, 'ember-eye wolf': 0.06, 'reality': 0.13, "chemister's trick": 0.03, 'boreal centaur': 0.09, 'ember-fist zubera': 0.15, 'stoic builder': 0.02, 'raging redcap': 0.01, 'deadlock trap': 0.1, 'maw of kozilek': 0.02, 'maw of the mire': 0.08, 'gossamer phantasm': 0.01, 'rampaging werewolf': 0.13, 'rampaging monument': 0.06, 'storm fleet swashbuckler': 0.1, 'chime of night': 0.1, 'rakshasa gravecaller': 0.1, 'faceless devourer': 0.03, 'chillbringer': 0.02, 'deadeye brawler': 0.1, 'deadeye tormentor': 0.02, 'stony strength': 0.08, 'eyes everywhere': 0.11, "rats' feast": 0.11, 'eyekite': 0.01, "raven's run dragoon": 0.07, 'stonefury': 0.01, 'glamer spinners': 0.1, 'aether tide': 0.07, 'stonefare crocodile': 0.1, 'reduce to ashes': 0.02, 'embolden': 0.09, 'steeple roc': 0.02, 'quilled wolf': 0.06, 'merfolk observer': 0.05, 'quicksmith rebel': 0.09, 'highway robber': 0.05, 'merfolk seastalkers': 0.06, 'steam-powered': 0.11, 'recruit the worthy': 0.01, 'bond of discipline': 0.09, 'quickchange': 0.11, 'bombard': 0.02, 'merrow bonegnawer': 0.15, 'grizzled wolverine': 0.05, 'redcap raiders': 0.02, 'merrow grimeblotter': 0.1, 'merrow levitator': 0.1, 'redeem the lost': 0.1, 'dega disciple': 0.07, 'embodiment of spring': 0.13, 'embermage goblin': 0.16, 'emberstrike duo': 0.09, 'rebuke': 0.02, 'faerie guidemother': 0.04, 'racecourse fury': 0.04, 'gorilla titan': 0.23, 'rabid wolverines': 0.06, 'rabid rats': 0.18, 'extricator of sin': 0.1, 'rabid bite': 0.02, 'extricator of flesh': 0.1, 'steward of solidarity': 0.07, 'reckless imp': 0.05, 'zombie cannibal': 0.11, 'bonded horncrest': 0.05, 'prickleboar': 0.03, 'cursed minotaur': 0.03, 'goblin rimerunner': 0.08, "zada's commando": 0.02, "sphinx's herald": 0.09, 'direct current': 0.01, 'spiderwig boggart': 0.09, 'rise again': 0.01, 'brazen wolves': 0.06, 'spike, tournament grinder': 0.3, 'rider in need': 0.02, 'endless scream': 0.14, 'hero of the games': 0.01, 'herald of the sun': 0.03, 'fallen askari': 0.06, 'dire fleet interloper': 0.02, 'riot ringleader': 0.03, 'brawl-bash ogre': 0.02, 'zealous inquisitor': 0.1, 'mire kavu': 0.13, 'band together': 0.04, 'brace for impact': 0.1, 'brain weevil': 0.1, 'spireside infiltrator': 0.01, 'goblin freerunner': 0.03, 'spire serpent': 0.06, 'chaotic backlash': 0.15, 'rhizome lurcher': 0.06, 'rhox bodyguard': 0.07, 'revered elder': 0.14, 'growth spurt': 0.08, 'brazen scourge': 0.03, 'riparian tiger': 0.02, 'dead drop': 0.11, 'wild hunger': 0.06, 'dire fleet hoarder': 0.04, 'rhystic deluge': 0.11, 'hero of the pride': 0.01, 'dream thief': 0.17, 'gone missing': 0.03, "chandra's magmutt": 0.01, 'mine bearer': 0.05, 'spike worker': 0.06, 'onyx goblet': 0.11, 'seraph of the suns': 0.09, 'ignite disorder': 0.05, 'wall of one thousand cuts': 0.02, 'toll of the invasion': 0.03, 'drooling ogre': 0.1, 'appetite for the unnatural': 0.04, 'poisonbelly ogre': 0.07, 'sentry of the underworld': 0.04, 'toils of night and day': 0.1, 'dark betrayal': 0.07, 'priest of iroas': 0.01, 'crippling chill': 0.03, 'kor scythemaster': 0.03, 'harmless assault': 0.06, 'zombie boa': 0.13, "fencer's magemark": 0.08, 'ondu greathorn': 0.02, 'essence filter': 0.05, "oketra's avenger": 0.04, 'infused arrows': 0.1, 'harrier griffin': 0.09, 'ohran yeti': 0.11, 'krark-clan stoker': 0.08, 'adarkar unicorn': 0.07, 'void squall': 0.1, 'crown-hunter hireling': 0.06, 'griffin sentinel': 0.01, 'ogre sentry': 0.02, 'setessan battle priest': 0.05, 'feral abomination': 0.01, 'vindictive mob': 0.11, "koth's courier": 0.04, 'titanium golem': 0.14, 'senate courier': 0.02, 'serpent skin': 0.13, 'fylgja': 0.12, 'zombie goliath': 0.03, 'akki avalanchers': 0.07, 'countless gears renegade': 0.03, 'old-fashioned vampire': 0.1, "kozilek's translator": 0.05, "grifter's blade": 0.12, 'votary of the conclave': 0.05, 'greater stone spirit': 0.07, 'goblin barrage': 0.09, 'viashino shanktail': 0.03, 'abomination of gudul': 0.06, 'vacuumelt': 0.09, 'segmented krotiq': 0.04, 'viashino weaponsmith': 0.09, 'seismic shudder': 0.05, 'cradle guard': 0.12, 'aphetto vulture': 0.17, 'torpid moloch': 0.09, "queen's commission": 0.07, 'quarry hauler': 0.03, 'gruul beastmaster': 0.05, 'constricting tendrils': 0.04, 'track down': 0.13, 'inspiring unicorn': 0.05, 'eternal of harsh truths': 0.12, 'second thoughts': 0.03, 'fell the pheasant': 0.03, 'towering baloth': 0.12, 'plated rootwalla': 0.05, 'crude rampart': 0.11, 'yavimaya kavu': 0.17, 'viashino runner': 0.08, 'bolt of keranos': 0.03, 'knight of old benalia': 0.02, 'knight of sursi': 0.01, 'devouring rage': 0.05, 'orcish hellraiser': 0.05, 'implement of ferocity': 0.04, 'selesnya locket': 0.07, 'quicksilver geyser': 0.01, 'jeskai student': 0.02, 'jeskai sage': 0.08, 'torch drake': 0.03, 'quiet purity': 0.11, 'quill-slinger boggart': 0.09, 'essence backlash': 0.05, 'topple the statue': 0.05, 'primal boost': 0.13, 'caligo skin-witch': 0.07, 'woodland sleuth': 0.07, 'rigging runner': 0.08, 'cagemail': 0.13, 'roofstalker wight': 0.08, 'quick-stick lick trick': 0.11, 'knightly valor': 0.01, 'consecrated by blood': 0.05, 'ronom hulk': 0.08, 'orcish bloodpainter': 0.05, 'plow through reito': 0.12, 'hard cover': 0.03, 'orchard spirit': 0.03, 'insatiable harpy': 0.03, 'unnerving assault': 0.14, "conjurer's ban": 0.1, 'foriysian interceptor': 0.06, 'setessan skirmisher': 0.01, 'frightshroud courier': 0.12, 'nurturing licid': 0.15, 'urborg mindsucker': 0.09, 'powerstone shard': 0.15, 'throttle': 0.02, 'bonebreaker giant': 0.04, 'ravaged highlands': 0.12, "crowd's favor": 0.03, 'hundroog': 0.08, 'commanding presence': 0.03, 'numbing dose': 0.03, 'jade guardian': 0.03, 'zuran enchanter': 0.06, 'shimmering mirage': 0.25, 'shimmerscale drake': 0.03, 'prakhata club security': 0.01, 'shimmerwing chimera': 0.02, "shinen of fury's fire": 0.06, 'fertile thicket': 0.13, "nylea's forerunner": 0.02, 'shieldmage elder': 0.15, "wolf's quarry": 0.02, 'vivid flying fish': 0.07, 'benevolent ancestor': 0.03, 'shed weakness': 0.01, 'oaken power suit': 0.15, 'shellephant': 0.1, "urza's engine": 0.11, 'decompose': 0.05, 'thunder strike': 0.05, 'havoc jester': 0.03, 'deepwood drummer': 0.08, 'nyx herald': 0.02, 'power taint': 0.12, 'shielded passage': 0.03, 'urborg emissary': 0.13, "shinen of stars' light": 0.11, 'shining aerosaur': 0.02, 'shipwreck dowser': 0.1, 'decorated griffin': 0.03, 'thrashing mudspawn': 0.07, 'thrashing mossdog': 0.06, 'bellowing saddlebrute': 0.04, 'head banger': 0.12, 'vizkopa vampire': 0.05, 'rally the forces': 0.01, 'thran war machine': 0.13, 'boomflinger': 0.1, 'book devourer': 0.04, 'gale swooper': 0.02, 'rise to glory': 0.02, 'gnathosaur': 0.03, 'rise of eagles': 0.04, 'nosy goblin': 0.08, 'greater basilisk': 0.05, 'rampant elephant': 0.1, "predator's gambit": 0.06, 'raptor companion': 0.02, 'vizier of the true': 0.02, 'jade idol': 0.11, 'shipwreck looter': 0.02, 'withering hex': 0.11, 'rakdos trumpeter': 0.03, 'gale force': 0.08, 'thresher lizard': 0.02, "commander's authority": 0.1, 'rashka the slayer': 0.18, 'bloodscale prowler': 0.05, 'noxious groodion': 0.03, 'canopy claws': 0.09, 'jaded response': 0.1, 'bloodshed fever': 0.06, 'bellows lizard': 0.02, 'law-rune enforcer': 0.02, 'wandermare': 0.02, 'ritual of restoration': 0.11, 'raka disciple': 0.07, 'ogre jailbreaker': 0.02, 'ichthyomorphosis': 0.02, 'presence of the wise': 0.08, 'bone shaman': 0.05, 'harvest mage': 0.06, "jaya's greeting": 0.04, 'shadow slice': 0.04, 'bloodhaze wolverine': 0.02, 'unworthy dead': 0.13, 'krovikan rot': 0.1, 'bewilder': 0.01, 'shattered crypt': 0.14, 'abbey griffin': 0.07, 'ringskipper': 0.13, 'feral maaka': 0.02, 'shadowstorm': 0.05, "tilonalli's knight": 0.02, 'raiding party': 0.22, 'zombie outlander': 0.12, 'adder-staff boggart': 0.08, 'zombified': 0.11, 'sewerdreg': 0.1, 'raging kronch': 0.03, 'krosan avenger': 0.18, 'roar of jukai': 0.06, 'pressure point': 0.01, 'ogre gatecrasher': 0.06, 'press for answers': 0.05, 'ogre berserker': 0.09, 'reap the seagraf': 0.05, 'hired heist': 0.05, 'anurid swarmsnapper': 0.21, 'off balance': 0.09, 'bloodtallow candle': 0.02, 'raging gorilla': 0.08, 'earthbrawn': 0.07, 'grisly transformation': 0.05, 'razor golem': 0.13, 'bloodstoke howler': 0.06, 'razing snidd': 0.12, 'berserkers of blood ridge': 0.04, 'ferocity of the wilds': 0.1, 'gibbering kami': 0.08, 'inescapable brute': 0.07, 'lackey recycler': 0.11, 'compelling argument': 0.1, 'ersatz gnomes': 0.26, 'haunting apparition': 0.12, 'raving oni-slave': 0.08, 'oakhame ranger': 0.04, 'vital surge': 0.09, 'shambling ghoul': 0.02, 'kujar seedsculptor': 0.04, "dromoka's gift": 0.05, 'kuldotha ringleader': 0.03, 'godtracker of jund': 0.07, 'razortip whip': 0.01, 'crossbow infantry': 0.05, "ertai's trickery": 0.1, 'shaper guildmage': 0.11, 'crossroads consecrator': 0.01, 'rainbow crow': 0.09, 'an-havva township': 0.22, 'razorfield rhino': 0.04, 'shard of broken glass': 0.07, 'kjeldoran skyknight': 0.09, 'sanctum spirit': 0.02, "abuna's chant": 0.07, 'resistance fighter': 0.05, 'ruin in their wake': 0.08, 'phalanx tactics': 0.02, 'psychic miasma': 0.06, 'pewter golem': 0.21, 'giant caterpillar': 0.08, 'karstoderm': 0.1, 'reservoir walker': 0.02, 'petrahydrox': 0.06, 'dutiful return': 0.02, 'dhund operative': 0.01, 'irreverent revelers': 0.01, 'restrain': 0.06, "ironwright's cleansing": 0.02, 'fathom fleet firebrand': 0.03, 'vedalken outlander': 0.06, 'fathom fleet cutthroat': 0.02, 'restless bones': 0.06, 'turn against': 0.08, 'turf wound': 0.13, 'sandstorm charger': 0.04, "true love's kiss": 0.02, 'iron bully': 0.02, 'perilous shadow': 0.02, 'favor of the woods': 0.03, 'falconer adept': 0.02, 'prismwake merrow': 0.22, 'satyr grovedancer': 0.06, 'pendrell flux': 0.09, 'rhino-': 0.11, 'pitiless vizier': 0.01, 'hagra crocodile': 0.06, 'savage gorilla': 0.06, 'saprazzan raider': 0.09, 'saprazzan outrigger': 0.13, 'psychic symbiont': 0.06, 'haazda snare squad': 0.01, 'dehydration': 0.03, 'pteron ghost': 0.08, 'kavu chameleon': 0.19, 'sap sucker': 0.09, 'kavu glider': 0.11, "buccaneer's bravado": 0.05, 'dire fleet captain': 0.2, 'blind with anger': 0.18, 'daring demolition': 0.02, 'fault riders': 0.06, 'trumpeting herd': 0.03, 'icatian crier': 0.03, 'disappearing act': 0.1, 'expedition raptor': 0.01, "angel's mercy": 0.11, 'vanquish': 0.05, 'run wild': 0.13, 'ukud cobra': 0.09, 'fatal mutation': 0.15, 'dune diviner': 0.03, 'vapor snare': 0.07, 'uktabi faerie': 0.08, 'diplomacy of the wastes': 0.04, 'kaleidostone': 0.11, 'forge armor': 0.1, 'blur of blades': 0.02, 'forever young': 0.12, 'sacred prey': 0.2, 'abzan runemark': 0.04, 'foul imp': 0.04, 'vampiric touch': 0.1, 'growth cycle': 0.02, 'prophet of the peak': 0.02, 'fatal attraction': 0.08, 'bountiful harvest': 0.05, 'rune-cervin rider': 0.07, 'expedition envoy': 0.09, 'rust tick': 0.06, "yamabushi's storm": 0.09, 'phyrexian reaper': 0.1, 'promised kannushi': 0.12, 'jwari scuttler': 0.09, 'blood aspirant': 0.08, 'deadly visit': 0.05, 'dust corona': 0.15, 'undercity shade': 0.1, 'twinstrike': 0.12, 'undercity troll': 0.05, 'coral reef': 0.14, 'undercity uprising': 0.02, 'dinosaur stampede': 0.09, 'dust of moments': 0.12, "kamahl's desire": 0.08, 'retaliation': 0.23, 'dukhara scavenger': 0.02, 'resupply': 0.02, 'underdome': 0.03, 'twiddlestick charger': 0.12, 'vault skyward': 0.1, 'ivory giant': 0.03, 'downsize': 0.04, 'saddled rimestag': 0.02, 'blizzard strix': 0.03, 'bog hoodlums': 0.05, 'sadistic skymarcher': 0.08, 'kami of empty graves': 0.1, 'return from extinction': 0.1, 'goblin dirigible': 0.09, 'box of free-range goblins': 0.1, 'safehold sentry': 0.08, 'rumbling baloth': 0.1, 'bound by moonsilver': 0.05, 'rumbling aftershocks': 0.06, 'pheres-band brawler': 0.02, 'bouncing beebles': 0.12, 'painwracker oni': 0.11, 'scrounging bandar': 0.02, 'painiac': 0.05, 'relentless pursuit': 0.02, 'gate smasher': 0.07, 'buzz buggy': 0.12, 'goblin brigand': 0.06, "pack's favor": 0.02, 'release the ants': 0.1, 'blaster mage': 0.12, 'scroll of griselbrand': 0.09, 'goblin war wagon': 0.06, 'hammer jammer': 0.11, 'scourgemark': 0.04, 'kindly cognician': 0.09, 'hydrolash': 0.05, 'kinetic augur': 0.01, 'king cheetah': 0.11, 'bogardan lancer': 0.05, 'brine giant': 0.01, 'screeching buzzard': 0.06, 'pale wayfarer': 0.1, 'screeching griffin': 0.03, 'screeching silcaw': 0.08, 'wall of corpses': 0.09, 'hussar patrol': 0.1, 'farbog revenant': 0.05, 'kitesail corsair': 0.01, 'bramble creeper': 0.05, 'insufferable syphon': 0.16, 'absolver thrull': 0.06, 'dangerous': 0.1, 'outmuscle': 0.04, 'frilled sea serpent': 0.01, 'outflank': 0.02, 'cabal trainee': 0.1, 'valakut fireboar': 0.1, 'primal visitation': 0.01, "alchemist's gift": 0.02, 'regress': 0.14, 'byway courier': 0.03, 'dimir informant': 0.05, 'eternity snare': 0.03, 'kithkin greatheart': 0.05, 'boggart sprite-chaser': 0.08, 'boros locket': 0.09, "sea god's revenge": 0.03, 'pyrophobia': 0.01, 'hammerheim deadeye': 0.07, 'imperial lancer': 0.07, 'sea snidd': 0.1, 'sea troll': 0.16, 'crested craghorn': 0.07, 'ancient crab': 0.02, 'kitsune diviner': 0.09, 'etherium abomination': 0.06, 'guild globe': 0.07, 'verdant automaton': 0.01, 'ancient kavu': 0.13, 'scaled hulk': 0.03, 'rubble slinger': 0.02, 'giant ambush beetle': 0.11, 'rubble reading': 0.02, 'hypervolt grasp': 0.09, 'rhox maulers': 0.02, 'fortress crab': 0.01, 'drownyard explorers': 0.03, 'pure': 0.14, 'burning shield askari': 0.07, 'exiled boggart': 0.03, 'goblin champion': 0.02, 'buoyancy': 0.1, 'bull rush': 0.03, 'prismatic ward': 0.08, 'zealots en-dal': 0.1, 'keeper of kookus': 0.07, 'gravelgill axeshark': 0.05, 'keeper of the light': 0.16, "venser's diffusion": 0.18, 'keeper of the sacred word': 0.16, 'joyride rigger': 0.07, 'triton shorethief': 0.02, 'exploding borders': 0.08, 'halam djinn': 0.08, 'renegade freighter': 0.1, 'deepwater hypnotist': 0.07, 'bleeding edge': 0.07, 'bog wreckage': 0.1, 'scorching dragonfire': 0.02, 'burning-yard trainer': 0.01, 'foundry hornet': 0.07, 'wormfang turtle': 0.19, 'hammer helper': 0.09, 'burrenton bombardier': 0.08, 'scour the laboratory': 0.08, 'containment membrane': 0.02, 'burrenton shield-bearers': 0.03, 'paperfin rascal': 0.07, 'rotting mastodon': 0.04, 'disciple of the old ways': 0.01, 'blessed light': 0.03, 'trial of solidarity': 0.07, 'force away': 0.07, 'plague spores': 0.08, 'dusk charger': 0.02, 'volcanic submersion': 0.06, 'plague wight': 0.01, 'fearsome temper': 0.04, "acolyte's reward": 0.11, 'bring back': 0.04, 'disciple of tevesh szat': 0.05, "purphoros's emissary": 0.02, 'school of piranha': 0.06, 'invigorating boon': 0.13, 'rhox veteran': 0.02, 'treetop ambusher': 0.01, 'embalmed brawler': 0.09, 'rampart smasher': 0.02, 'clutch of undeath': 0.1, 'tethered skirge': 0.11, 'cleansing screech': 0.05, 'mantle of tides': 0.01, 'mantle of leadership': 0.18, 'soar': 0.07, 'drill-skimmer': 0.07, 'midnight scavengers': 0.09, 'auriok siege sled': 0.1, 'skophos maze-warden': 0.01, 'skulking fugitive': 0.07, 'floating-dream zubera': 0.2, 'tattered drake': 0.06, 'nearheath stalker': 0.06, 'nearheath chaplain': 0.05, "tezzeret's ambition": 0.01, 'lightning stormkin': 0.05, 'glen elendra pranksters': 0.26, 'taste of blood': 0.05, "deserter's quarters": 0.05, 'lightning talons': 0.05, 'meteorite': 0.03, 'skirsdag flayer': 0.08, 'stallion of ashmouth': 0.02, 'mistform wall': 0.05, "sun's bounty": 0.07, 'banners raised': 0.06, 'aerial assault': 0.03, 'snapsail glider': 0.02, 'heavenly qilin': 0.09, 'charging slateback': 0.05, 'squad captain': 0.01, 'skullmane baku': 0.08, 'battlefield scrounger': 0.11, 'manta riders': 0.09, 'spy eye': 0.12, 'weight of conscience': 0.08, "lim-dûl's cohort": 0.05, 'sky scourer': 0.03, 'fireborn knight': 0.03, 'sphere of reason': 0.14, "chandra's embercat": 0.04, 'snare the skies': 0.02, 'asphodel wanderer': 0.02, 'fierce witchstalker': 0.02, 'manta ray': 0.11, 'dromad purebred': 0.05, 'maniacal rage': 0.01, 'welcome home': 0.05, 'sundering fork': 0.21, 'squeaking pie grubfellows': 0.07, 'bayou dragonfly': 0.12, 'ghor-clan bloodscale': 0.11, 'misshapen fiend': 0.1, 'battlewise valor': 0.02, 'neck snap': 0.06, 'necra disciple': 0.1, 'tears of valakut': 0.07, "sivvi's ruse": 0.11, 'chainwhip cyclops': 0.01, 'staunch shieldmate': 0.01, 'nessian demolok': 0.05, 'daggerclaw imp': 0.02, 'swordwise centaur': 0.03, 'wingbeat warrior': 0.06, 'solar blast': 0.05, 'lowland oaf': 0.07, 'skarrg guildmage': 0.06, 'necra sanctuary': 0.15, 'centaur safeguard': 0.03, 'sinking feeling': 0.1, 'sinuous striker': 0.04, 'affectionate indrik': 0.02, 'assault griffin': 0.02, 'loxodon mender': 0.09, 'centaur nurturer': 0.03, 'armed': 0.1, 'frost raptor': 0.12, 'fistful of force': 0.08, 'siren reaver': 0.07, 'mardu warshrieker': 0.04, 'floodbringer': 0.16, 'siren song lyre': 0.04, 'coastal drake': 0.08, 'mudbrawler raiders': 0.07, 'skeletonize': 0.02, 'balduvian fallen': 0.12, 'charmed stray': 0.07, "necromancer's magemark": 0.09, 'skillful lunge': 0.04, 'glarewielder': 0.12, 'coastal discovery': 0.08, 'devkarin dissident': 0.01, 'task force': 0.17, 'thalakos sentry': 0.09, 'devious cover-up': 0.02, 'sultai runemark': 0.02, 'cobalt golem': 0.07, 'bartered cow': 0.03, "messenger's speed": 0.07, 'moat piranhas': 0.01, 'watchful naga': 0.04, 'watchful giant': 0.01, 'starlit mantle': 0.01, 'wild swing': 0.11, 'metallic mastery': 0.07, 'armor of faith': 0.02, 'necrotic wound': 0.08, 'enemy of the guildpact': 0.08, 'challenger troll': 0.08, 'cobblebrute': 0.01, 'avarax': 0.02, 'llanowar empath': 0.04, 'temple thief': 0.02, 'flaming sword': 0.1, 'surging aether': 0.06, 'elegant edgecrafters': 0.02, 'dripping-tongue zubera': 0.11, 'llanowar envoy': 0.02, 'telepathic spies': 0.12, 'aerial toastmaster': 0.1, 'firecannon blast': 0.03, 'surging might': 0.08, 'makindi griffin': 0.13, 'fiery finish': 0.01, 'chant of the skifsang': 0.03, 'swarm surge': 0.04, 'enatu golem': 0.05, 'gaze of justice': 0.12, 'lizard warrior': 0.06, 'spirit of the spires': 0.04, "mire's grasp": 0.02, 'enchanted carriage': 0.05, 'smelt-ward minotaur': 0.1, 'firemaw kavu': 0.03, 'balshan beguiler': 0.12, 'temporal eddy': 0.04, 'flamewright': 0.11, 'surge of thoughtweft': 0.15, 'devastate': 0.06, 'surrakar banisher': 0.06, 'firefiend elemental': 0.04, 'caustic hound': 0.02, 'weave fate': 0.26, 'minotaur abomination': 0.06, 'suspicious nanny': 0.12, 'loam dryad': 0.11, 'spined megalodon': 0.05, 'grappling sundew': 0.06, 'avacynian missionaries': 0.07, 'spindrift drake': 0.06, 'slith ascendant': 0.01, 'flaring flame-kin': 0.09, "desert's hold": 0.04, 'aethertorch renegade': 0.05, 'firefist adept': 0.04, 'spire winder': 0.01, 'spiketail drakeling': 0.01, 'swaggering corsair': 0.01, 'spire monitor': 0.02, "demon's grasp": 0.02, 'teller of tales': 0.11, 'mystic restraints': 0.06, 'lobe lobber': 0.17, "artisan's sorrow": 0.07, 'cavern crawler': 0.02, 'loch korrigan': 0.05, 'slingshot goblin': 0.1, 'spire mangler': 0.07, 'wild ceratok': 0.01, 'gorger wurm': 0.1, 'natural unity': 0.06, 'cathartic adept': 0.16, 'liquid fire': 0.08, 'cinder hellion': 0.01, 'drag down': 0.05, 'final death': 0.01, 'skymarch bloodletter': 0.03, 'wasteland scorpion': 0.05, 'eldrazi skyspawner': 0.11, 'spore burst': 0.12, 'agonizing demise': 0.1, 'liturgy of blood': 0.04, 'mind peel': 0.11, 'aven augur': 0.05, 'aerial guide': 0.01, 'aspect of lamprey': 0.01, 'hexplate golem': 0.03, "glassblower's puzzleknot": 0.05, 'balloon peddler': 0.04, 'mischief and mayhem': 0.03, 'snake of the golden grove': 0.04, 'manacles of decay': 0.11, "terashi's cry": 0.09, 'spontaneous artist': 0.01, 'aerial maneuver': 0.01, 'clinging darkness': 0.12, 'swell of growth': 0.04, 'clip wings': 0.03, 'elgaud inquisitor': 0.04, 'spitfire handler': 0.12, 'smogsteed rider': 0.1, 'disposal mummy': 0.01, 'mirozel': 0.08, 'artful takedown': 0.02, 'desperate castaways': 0.01, 'skywatcher adept': 0.15, "sphinx's insight": 0.03, 'dripping dead': 0.09, 'gaze of the gorgon': 0.14, 'heavy infantry': 0.01, 'house guildmage': 0.09, 'ballynock trapper': 0.09, 'swift response': 0.04, 'smolder initiate': 0.06, 'weed strangle': 0.1, 'skyshroud troll': 0.05, 'skyshroud troopers': 0.08, 'entangling vines': 0.06, 'mana skimmer': 0.05, 'smokespew invoker': 0.08, 'widget contraption': 0.24, 'tenacity': 0.06, 'tenacious hunter': 0.03, 'sunseed nurturer': 0.08, 'loxodon mystic': 0.04, 'gliding licid': 0.11, 'martyr of spores': 0.08, 'mortipede': 0.08, 'stomper cub': 0.02, 'wishful merfolk': 0.04, 'mortis dogs': 0.05, 'mad prophet': 0.03, 'azorius skyguard': 0.05, 'captivating gyre': 0.04, 'street savvy': 0.07, 'ghitu journeymage': 0.02, 'strength of unity': 0.16, 'wishcoin crab': 0.02, 'thornado': 0.02, 'hubris': 0.05, 'siegebreaker giant': 0.07, 'siegecraft': 0.04, 'fire shrine keeper': 0.02, 'moment of triumph': 0.06, 'hindering touch': 0.1, 'leonin armorguard': 0.11, "sidisi's pet": 0.07, 'gearsmith guardian': 0.01, 'mass of ghouls': 0.02, 'barony vampire': 0.03, "erebos's emissary": 0.06, 'defiant salvager': 0.01, 'fire juggler': 0.07, 'wildslayer elves': 0.14, 'azimaet drake': 0.07, 'flaxen intruder': 0.05, 'dragon bell monk': 0.03, 'audacious thief': 0.03, 'water servant': 0.06, 'nim replica': 0.09, 'fire whip': 0.24, 'chrome steed': 0.04, 'spare from evil': 0.09, 'stinging shot': 0.03, 'nim lasher': 0.06, 'spark reaper': 0.08, 'equestrian skill': 0.02, 'grave exchange': 0.06, 'silent observer': 0.02, 'nim grotesque': 0.09, 'spark spray': 0.05, 'war oracle': 0.06, "martyr's soul": 0.01, 'defeat': 0.03, 'symbiosis': 0.08, 'domineer': 0.08, 'festering march': 0.13, 'martyr of bones': 0.03, "erase (not the urza's legacy one)": 0.15, 'civic guildmage': 0.06, 'lucent liminid': 0.05, 'lethargy trap': 0.04, 'nine-ringed bo': 0.11, 'stir the sands': 0.07, 'sigiled skink': 0.07, 'atzocan archer': 0.05, 'wayfaring giant': 0.13, 'flame-kin war scout': 0.1, 'moon heron': 0.07, 'hitchclaw recluse': 0.01, 'leapfrog': 0.04, "witch's cauldron": 0.04, 'ledev champion': 0.07, 'chimney imp': 0.08, 'certain death': 0.1, 'moodmark painter': 0.01, "adriana's valor": 0.06, 'thoughtcutter agent': 0.18, 'dreamwinder': 0.09, 'chittering host': 0.05, 'morgue thrull': 0.08, 'thousand-legged kami': 0.14, 'headlong rush': 0.11, 'fervent cathar': 0.05, 'war chariot': 0.12, 'headless specter': 0.01, 'thraben heretic': 0.09, 'maulfist doorbuster': 0.03, 'horizon drake': 0.09, 'storm fleet arsonist': 0.08, 'shoreline raider': 0.13, 'ember gale': 0.15, 'side quest': 0.1, 'stratozeppelid': 0.05, 'hope charm': 0.1, 'monkey-': 0.13, 'capashen knight': 0.05, 'monkey monkey monkey': 0.13, 'flowstone surge': 0.13, 'stratus walk': 0.02, 'aether swooper': 0.04, 'griffin protector': 0.01, 'sibsig host': 0.03, 'sicken': 0.13, 'festergloom': 0.04, 'chain of silence': 0.09, 'aether tradewinds': 0.02, 'legion conquistador': 0.02, 'cyclopean giant': 0.06, 'shriekdiver': 0.01, "belbe's percher": 0.09, 'monstrify': 0.06, 'hoar shade': 0.07, 'strange inversion': 0.1, 'glade gnarr': 0.1, 'flummoxed cyclops': 0.01, 'lunarch inquisitors': 0.07, 'slithery stalker': 0.14, 'stromkirk patrol': 0.03, 'niblis of the mist': 0.03, 'silverstrike': 0.05, 'whispering snitch': 0.05, 'carnivorous moss-beast': 0.12, 'steel leaf paladin': 0.1, 'daggersail aeronaut': 0.01, 'steamflogger temp': 0.1, 'solfatara': 0.09, 'mournful zombie': 0.11, 'wingsteed rider': 0.04, 'mourning': 0.1, 'arena trickster': 0.01, "mogis's favor": 0.01, 'the triumph of anax': 0.02, 'night market lookout': 0.14, 'life goes on': 0.04, 'spatial binding': 0.14, 'flowstone charger': 0.11, 'flowstone blade': 0.04, 'dark temper': 0.05, 'fledgling griffin': 0.04, 'flowering lumberknot': 0.03, 'mothrider samurai': 0.11, 'dogpile': 0.15, 'merfolk of the depths': 0.06, 'barricade breaker': 0.09, 'fulgent distraction': 0.03, 'lifespring druid': 0.03, 'neurok familiar': 0.05, 'merrow wavebreakers': 0.04, "ephara's warden": 0.02, 'field of reality': 0.06, 'singe': 0.09, 'singe-mind ogre': 0.08, 'steady aim': 0.02, 'warden of geometries': 0.2, 'mogg toady': 0.07, 'steadfast guard': 0.12, 'destructive tampering': 0.01, 'carrion grub': 0.03, 'carrion howler': 0.11, 'warded battlements': 0.01, 'loxodon stalwart': 0.16, 'bala ged scorpion': 0.03, 'loxodon restorer': 0.02, 'elaborate firecannon': 0.03, "cogworker's puzzleknot": 0.04, 'tangle hulk': 0.05, 'simple': 0.14, 'stern dismissal': 0.05, 'mounted archers': 0.05, 'demolition stomper': 0.09, 'stern mentor': 0.08, 'ego erasure': 0.15, "arcum's whistle": 0.15, 'library larcenist': 0.01, 'five-finger discount': 0.13, 'silkenfist fighter': 0.07, 'adventurous impulse': 0.01, 'talonrend': 0.12, 'careless celebrant': 0.03, 'whisper agent': 0.04, 'talons of wildwood': 0.03, 'giltgrove stalker': 0.02, 'liberated dwarf': 0.13, 'fettergeist': 0.05, 'igneous golem': 0.1, 'spark jolt': 0.04, 'joraga invocation': 0.05, 'rogue kavu': 0.09, 'spike colony': 0.04, 'excavation elephant': 0.01, 'demoralize': 0.1, 'glimmerdust nap': 0.07, 'youthful scholar': 0.04, 'blossom dryad': 0.07, 'weatherseed faeries': 0.11, 'sylvan echoes': 0.08, "mageta's boon": 0.08, 'precise strike': 0.01, 'rix maadi guildmage': 0.1, 'hooded brawler': 0.02, 'plague fiend': 0.06, 'jhessian lookout': 0.05, 'crush dissent': 0.03, 'yawning fissure': 0.05, 'hooded horror': 0.05, 'sworn companions': 0.03, 'rock jockey': 0.08, 'spikewheel acrobat': 0.02, 'moon-eating dog': 0.08, 'falter': 0.04, 'herd gnarr': 0.04, 'ronin cavekeeper': 0.1, 'fangren pathcutter': 0.1, 'mage il-vec': 0.04, 'bloodbriar': 0.03, 'spinal parasite': 0.06, 'spell suck': 0.1, 'ridgeline rager': 0.04, 'mage-ring bully': 0.06, 'bloodfire expert': 0.02, 'moonlight geist': 0.02, 'abzan guide': 0.05, 'rubblebelt runner': 0.02, 'divebomber griffin': 0.11, 'spell snip': 0.07, 'soulbound guardians': 0.06, 'jamming device': 0.18, 'port inspector': 0.08, 'auriok bladewarden': 0.1, 'glimpse the sun god': 0.09, 'ambush': 0.14, 'swallowing plague': 0.11, 'fan favorite': 0.02, 'rising populace': 0.02, 'robo-': 0.14, 'spellkeeper weird': 0.01, 'dire fleet warmonger': 0.02, 'underworld rage-hound': 0.02, 'custodi peacekeeper': 0.05, 'minotaur illusionist': 0.12, 'roc charger': 0.04, 'goblin firebug': 0.11, 'joyous respite': 0.1, 'rites of reaping': 0.03, 'durkwood tracker': 0.08, 'wild instincts': 0.05, "death's-head buzzard": 0.02, 'crush': 0.03, 'cut the earthly bond': 0.16, "roil's retribution": 0.06, 'rootwalla': 0.13, 'gruul nodorog': 0.06, 'pouncing kavu': 0.11, 'gruul locket': 0.05, 'unholy hunger': 0.02, 'chameleon blur': 0.05, 'syndicate messenger': 0.02, 'pouncing cheetah': 0.08, 'brazen freebooter': 0.01, 'ripscale predator': 0.01, 'soulreaper of mogis': 0.01, 'premature burial': 0.02, 'weaselback redcap': 0.01, 'famished ghoul': 0.08, 'molder beast': 0.01, 'glimpse the future': 0.06, 'soulsurge elemental': 0.09, 'breach': 0.13, 'auto-key': 0.09, 'circle of protection: shadow': 0.07, 'wilderness hypnotist': 0.1, 'banehound': 0.09, 'gruul scrapper': 0.05, 'rosemane centaur': 0.03, 'magma burst': 0.06, 'bloodsoaked altar': 0.03, 'corrupting licid': 0.1, 'barbarian outcast': 0.05, 'unyielding krumar': 0.02, 'swell of courage': 0.1, 'magnetic flux': 0.03, 'bloodscent': 0.11, 'unexplained disappearance': 0.04, 'daunting defender': 0.15, "mire's malice": 0.04, 'bloodthirsty ogre': 0.14, 'bloodthorn taunter': 0.05, 'river kaijin': 0.05, 'fangren hunter': 0.07, 'ana battlemage': 0.18, 'jeskai runemark': 0.04, 'augmenting automaton': 0.02, 'dictation quillograph': 0.08, 'corrupted harvester': 0.08, 'swift kick': 0.02, 'unfriendly fire': 0.02, 'updraft elemental': 0.03, 'afflict': 0.09, 'inquisitive puppet': 0.03, 'chasm drake': 0.02, 'hollowhenge scavenger': 0.08, 'axebane stag': 0.02, 'steeple creeper': 0.02, 'steeling stance': 0.07, 'embraal bruiser': 0.03, 'merfolk mesmerist': 0.11, 'backwoods survivalists': 0.02, 'vigilant sentry': 0.09, 'bad ass': 0.28, 'insatiable appetite': 0.01, 'vigilance': 0.09, 'record store': 0.19, 'quicksilver behemoth': 0.08, 'reckless racer': 0.08, 'mercurial kite': 0.09, 'chrome replicator': 0.02, 'mer man': 0.05, 'whisk away': 0.03, 'stinging lionfish': 0.05, 'rabid bloodsucker': 0.03, 'decoction module': 0.1, 'vine snare': 0.01, 'reckless air strike': 0.04, 'vine kami': 0.09, 'reckless brute': 0.02, 'stinging barrier': 0.14, 'declare dominance': 0.04, 'villainous ogre': 0.08, 'zombie cutthroat': 0.1, 'marsh threader': 0.06, "garruk's gorehorn": 0.01, 'stronghold confessor': 0.02, 'markov crusader': 0.1, 'insolence': 0.1, 'viashino grappler': 0.1, 'viashino firstblade': 0.06, 'reflexes': 0.09, 'viashino bladescout': 0.1, 'emerald oryx': 0.02, 'mardu skullhunter': 0.03, 'foxfire oak': 0.09, 'staunch-hearted warrior': 0.01, 'imperiosaur': 0.03, 'rampart crawler': 0.1, 'demonic appetite': 0.06, 'stasis cell': 0.03, 'instill furor': 0.11, 'bolrac-clan crusher': 0.02, 'gargoyle sentinel': 0.09, 'bond of passion': 0.04, 'victorious destruction': 0.01, 'implement of combustion': 0.07, 'inspire awe': 0.01, 'awe for the guilds': 0.02, 'grixis sojourners': 0.06, 'quenchable fire': 0.15, "queen's bay soldier": 0.03, 'drudge beetle': 0.02, 'hightide hermit': 0.03, 'subterranean shambler': 0.07, 'viashino spearhunter': 0.08, 'steady-handed mook': 0.08, 'highspire mantis': 0.04, 'maritime guard': 0.01, 'refibrillator': 0.21, 'steadfast sentinel': 0.07, 'vintara elephant': 0.09, 'drudge reavers': 0.12, 'stonehands': 0.04, 'goblin masons': 0.09, 'child of thorns': 0.06, 'greater forgeling': 0.2, 'ravenous skirge': 0.1, 'deep-sea terror': 0.05, 'garenbrig carver': 0.01, 'akroan mastiff': 0.02, 'ray of dissolution': 0.06, 'whirlermaker': 0.1, 'indentured oaf': 0.11, 'boneclad necromancer': 0.04, 'incite hysteria': 0.06, 'rampaging rendhorn': 0.02, 'stormcaller of keranos': 0.04, 'hired torturer': 0.02, 'boon of emrakul': 0.02, 'rally to battle': 0.04, "hisoka's defiance": 0.06, 'storm fleet pyromancer': 0.01, 'chimeric coils': 0.1, 'whiptail moloch': 0.06, 'faerie duelist': 0.05, 'reality anchor': 0.04, 'chorus of the tides': 0.01, 'boreal elemental': 0.01, 'strength of night': 0.14, 'viridian scout': 0.06, 'viridian harvest': 0.04, 'bonds of quicksilver': 0.03, "infiltrator's magemark": 0.1, 'rage-scarred berserker': 0.01, 'exultant cultist': 0.03, 'inflame': 0.08, 'embersmith': 0.06, 'reaping the rewards': 0.05, 'stirring address': 0.01, 'rafter demon': 0.03, 'akroan jailer': 0.04, 'radical idea': 0.06, 'mephitic vapors': 0.04, 'great-horn krushok': 0.02, 'zombie musher': 0.12, 'stream hopper': 0.06, 'stone kavu': 0.13, 'infectious bloodlust': 0.03, 'hindervines': 0.08, 'razor boomerang': 0.09, 'stone golem': 0.02, 'razorgrass screen': 0.06, 'crown of fury': 0.06, "in oketra's name": 0.04, 'hoisted hireling': 0.04, 'viscerid deepwalker': 0.05, 'mask of immolation': 0.04, 'flameborn viron': 0.14, 'insubordination': 0.12, 'dreamstalker manticore': 0.02, 'vectis dominator': 0.06, 'spitting gourna': 0.06, 'vassal soul': 0.01, 'illusionary forces': 0.04, 'vantress paladin': 0.01, 'vanquish the weak': 0.01, 'firescreamer': 0.09, 'altar of the pantheon': 0.04, 'dreamcatcher': 0.12, 'foul presence': 0.14, 'spreading rot': 0.02, 'resplendent griffin': 0.06, 'crazed goblin': 0.07, 'ironshell beetle': 0.03, 'giant cockroach': 0.09, 'charging griffin': 0.1, 'charging binox': 0.04, 'bog naughty': 0.02, 'curious pair': 0.01, 'homicidal seclusion': 0.1, 'vanquish the foul': 0.02, 'deeproot warrior': 0.01, 'firehoof cavalry': 0.01, 'revolutionary rebuff': 0.05, 'abundant maw': 0.11, 'goblin gathering': 0.11, 'surrakar marauder': 0.07, "ixidor's will": 0.09, 'mindstab': 0.01, "fortune's favor": 0.06, "rhonas's stalwart": 0.01, 'wild elephant': 0.12, 'spineless thug': 0.03, 'rhox brute': 0.02, 'survive the night': 0.05, 'rib cage spider': 0.15, 'spirespine': 0.07, 'vandalize': 0.04, 'charge': 0.03, 'giant dustwasp': 0.03, 'propeller pioneer': 0.05, 'voracious null': 0.01, 'mindless null': 0.04, 'gatekeeper gargoyle': 0.07, 'dive bomber': 0.07, 'glacial crasher': 0.02, 'gruesome discovery': 0.03, 'surge of zeal': 0.12, 'vampire noble': 0.04, 'spirit en-kor': 0.04, 'revive the fallen': 0.11, 'wild crocodile': 0.08, 'pygmy razorback': 0.08, 'vertigo spawn': 0.06, 'aether poisoner': 0.06, 'sultai scavenger': 0.06, 'gateway sneak': 0.06, 'summary judgment': 0.02, 'stampede rider': 0.01, 'grotag thrasher': 0.03, 'summit prowler': 0.02, 'remedy': 0.06, 'disruption aura': 0.09, 'douse in gloom': 0.11, 'aven tactician': 0.07, 'charmed sleep': 0.01, 'emissary of the sleepless': 0.02, 'pygmy troll': 0.07, 'veteran cathar': 0.06, "pyromancer's assault": 0.03, 'metal fatigue': 0.05, 'chub toad': 0.03, 'failed inspection': 0.03, "metalspinner's puzzleknot": 0.01, 'into thin air': 0.06, 'boggart forager': 0.07, "alesha's vanguard": 0.02, 'aven windreader': 0.04, 'explosive impact': 0.03, 'vessel of malignity': 0.04, 'impeccable timing': 0.03, 'grotag siege-runner': 0.05, 'alpine guide': 0.06, 'pulling teeth': 0.06, 'sunfire balm': 0.11, 'bog serpent': 0.06, 'pterodon knight': 0.02, 'groundling pouncer': 0.14, 'spur grappler': 0.05, 'psychic spear': 0.01, 'iron-heart chimera': 0.16, 'ironclad revolutionary': 0.05, 'mandatory friendship shackles': 0.09, 'charm peddler': 0.1, 'alpha tyrranax': 0.04, 'dark revenant': 0.05, 'welkin guide': 0.07, 'rend spirit': 0.02, 'aven redeemer': 0.09, 'ground pounder': 0.09, 'sun-collared raptor': 0.03, 'zerapa minotaur': 0.07, 'alms': 0.07, 'alpha kavu': 0.13, 'venomous vines': 0.07, 'venomous hierophant': 0.02, 'soul salvage': 0.05, 'archers of qarsi': 0.06, 'skirsdag supplicant': 0.01, 'gift of tusks': 0.06, 'knight of valor': 0.06, 'windwright mage': 0.11, "navigator's compass": 0.06, "tormentor's trident": 0.06, 'orbweaver kumo': 0.1, 'orazca frillback': 0.02, 'oraxid': 0.08, "kodama's might": 0.08, 'torment': 0.08, 'gift of the gargantuan': 0.08, 'kolaghan aspirant': 0.02, 'selesnya sentry': 0.01, 'heat ray': 0.04, 'knight of sorrows': 0.03, 'lightwalker': 0.01, "oread of mountain's blaze": 0.01, 'frostwalla': 0.01, 'ore-scale guardian': 0.03, 'skola grovedancer': 0.01, 'fomori nomad': 0.04, 'order of the golden cricket': 0.07, 'ordeal of erebos': 0.11, 'eager construct': 0.02, 'knight of the last breath': 0.04, 'knight of the mists': 0.06, 'castle raptors': 0.01, 'agonizing syphon': 0.02, 'nessian courser': 0.01, 'call of the nightwing': 0.11, 'nest robber': 0.05, 'fog of gnats': 0.12, 'toil': 0.08, 'korozda gorgon': 0.09, 'bitterbow sharpshooters': 0.01, 'onakke ogre': 0.02, 'wooden stake': 0.07, 'goblin assault team': 0.02, 'defective detective': 0.07, 'cartouche of strength': 0.21, 'tomb hex': 0.04, 'fencer clique': 0.06, 'needlepeak spider': 0.01, 'caldera kavu': 0.15, 'nef-crop entangler': 0.01, 'top-secret tunnel': 0.1, 'fiend binder': 0.02, 'fen hauler': 0.04, 'applied biomancy': 0.03, 'dawning angel': 0.03, 'open fire': 0.02, 'call for blood': 0.05, 'fen stalker': 0.08, 'woodland patrol': 0.01, 'senate guildmage': 0.07, 'opal champion': 0.09, 'warden of the woods': 0.02, 'slate street ruffian': 0.02, 'tranquil path': 0.09, "sea god's scorn": 0.01, 'sea legs': 0.01, "arrester's admonition": 0.03, "teroh's vanguard": 0.13, 'oxidda daredevil': 0.03, 'natural end': 0.02, 'natural obsolescence': 0.02, "traitor's clutch": 0.09, 'discordant piper': 0.01, 'dwindle': 0.01, 'overt operative': 0.1, 'dying wail': 0.13, 'skyshroud archer': 0.08, 'tempting witch': 0.05, 'paladin of the bloodstained': 0.02, 'electrify': 0.01, 'skystreamer': 0.03, 'palace familiar': 0.09, 'cloud crusader': 0.08, 'tenth district guard': 0.01, 'scuttling death': 0.04, 'trained condor': 0.03, 'aerial engineer': 0.01, 'toxic stench': 0.1, 'ornery kudu': 0.01, 'ornery dilophosaur': 0.02, 'apex hawks': 0.07, 'bazaar krovod': 0.01, 'security blockade': 0.06, 'drogskol shieldmate': 0.06, 'cloudcrest lake': 0.19, 'arms depot': 0.24, 'grassland crusader': 0.1, 'skulking knight': 0.12, 'cateran persuader': 0.18, 'dewdrop spy': 0.13, 'consulate surveillance': 0.06, 'skyblinder staff': 0.04, 'search warrant': 0.02, 'skyblade of the legion': 0.02, 'daybreak chaplain': 0.02, 'searing flesh': 0.12, 'kjeldoran guard': 0.05, 'warpath ghoul': 0.03, 'death charmer': 0.06, 'limits of solidarity': 0.09, 'kjeldoran war cry': 0.08, 'disease carriers': 0.12, 'font of ire': 0.01, 'ostiary thrull': 0.06, 'skullmead cauldron': 0.12, 'skullknocker ogre': 0.02, 'goblin wizardry': 0.01, 'floodchaser': 0.07, 'thunder drake': 0.02, 'defiling tears': 0.14, "shield's might": 0.01, 'benalish infantry': 0.08, 'sidewinder naga': 0.01, 'sideswipe': 0.08, 'shieldmage advocate': 0.15, 'last caress': 0.1, 'wizard mentor': 0.14, 'capital offense': 0.09, 'those who serve': 0.01, 'wanderguard sentry': 0.03, 'lathnu sailback': 0.04, 'laughing hyena': 0.19, 'shield bearer': 0.02, 'serpentine kavu': 0.23, 'havenwood wurm': 0.08, "lampad of death's vigil": 0.05, 'erratic mutation': 0.01, "captain's call": 0.01, 'eddytrail hawk': 0.03, 'wojek bodyguard': 0.01, 'dromoka dunecaster': 0.04, 'benediction of moons': 0.13, 'nyxborn wolf': 0.05, 'nyxborn triton': 0.05, 'wojek apothecary': 0.1, 'woeleecher': 0.13, 'nyxborn eidolon': 0.02, 'nyxborn courser': 0.01, 'leonin of the lost pride': 0.01, 'aid the fallen': 0.05, 'wallop': 0.1, 'number crunch': 0.18, 'thought nibbler': 0.09, 'shower of sparks': 0.1, "lavamancer's skill": 0.09, 'canopy crawler': 0.12, "gideon's defeat": 0.04, 'leap of faith': 0.03, 'shoreline salvager': 0.07, 'thrash of raptors': 0.08, 'thraben foulbloods': 0.02, 'shorecrasher mimic': 0.15, 'shoe tree': 0.1, 'lazotep behemoth': 0.01, 'lead': 0.1, 'shoal kraken': 0.01, 'shock troops': 0.03, 'thraben standard bearer': 0.04, 'showstopper': 0.08, 'benalish cavalry': 0.03, 'nullify': 0.03, 'desecrated earth': 0.07, 'withstand': 0.07, "shinen of flight's wings": 0.14, 'thriving turtle': 0.05, 'noggle bridgebreaker': 0.03, 'leery fogbeast': 0.1, 'wandering ones': 0.14, 'wandering tombshell': 0.07, "candles' glow": 0.12, 'canyon minotaur': 0.01, 'thoughtbind': 0.07, 'shriek of dread': 0.09, 'ahn-crop invader': 0.02, 'null caller': 0.01, 'haunting hymn': 0.04, 'gnarled mass': 0.09, 'binding agony': 0.09, 'serum raker': 0.08, 'servant of nefarox': 0.04, 'hunt the weak': 0.03, 'servant of volrath': 0.05, 'setessan griffin': 0.01, 'ogre errant': 0.01, 'dromosaur': 0.11, 'time out': 0.05, 'night revelers': 0.09, 'conclave guildmage': 0.06, 'silverflame ritual': 0.02, 'feral contest': 0.04, 'cultbrand cinder': 0.03, 'daru lancer': 0.15, 'nettle swine': 0.08, "kozilek's sentinel": 0.04, 'neural network': 0.2, 'desecration plague': 0.02, 'old ghastbark': 0.13, 'carrion thrash': 0.08, 'essence drain': 0.14, 'dreadhorde twins': 0.08, 'serra zealot': 0.12, 'golem artisan': 0.02, 'ojutai interceptor': 0.03, 'never happened': 0.02, 'kranioceros': 0.04, 'krark-clan engineers': 0.09, 'floodtide serpent': 0.02, 'dogsnail engine': 0.24, 'ainok artillerist': 0.03, 'canal monitor': 0.01, 'thirsting axe': 0.04, 'thistledown duo': 0.1, 'labro bot': 0.19, 'gauntlets of light': 0.1, 'erstwhile trooper': 0.01, 'hunger of the nim': 0.09, 'laccolith grunt': 0.04, 'dematerialize': 0.07, 'benthic giant': 0.01, 'oasis ritualist': 0.02, 'thunderscape apprentice': 0.1, 'coma veil': 0.08, 'haunted guardian': 0.09, "kumano's blessing": 0.04, 'deranged whelp': 0.12, 'sewer shambler': 0.04, 'warbriar blessing': 0.01, 'earthen arms': 0.02, 'deathless knight': 0.02, 'thermal flux': 1.53, 'frost ogre': 0.05, 'fetid horror': 0.1, 'flowstone giant': 0.08, 'tiger claws': 0.12, 'festival of the guildpact': 0.12, 'dawnfluke': 0.08, 'kukemssa serpent': 0.11, 'godtoucher': 0.08, 'clockwork vorrac': 0.15, 'wretched camel': 0.03, 'heir of the wilds': 0.14, 'sokenzan bruiser': 0.07, 'turret ogre': 0.01, 'samite censer-bearer': 0.05, 'turn to slag': 0.01, 'watchful automaton': 0.03, 'soaring show-off': 0.05, 'lotus path djinn': 0.05, 'mudbutton clanger': 0.06, 'blinding souleater': 0.04, 'sanctified charge': 0.01, "dosan's oldest chant": 0.08, 'enraged ceratok': 0.03, 'enraged giant': 0.07, 'elite instructor': 0.04, 'basalt gargoyle': 0.02, 'wring flesh': 0.06, 'tar snare': 0.03, 'loxodon partisan': 0.06, "pharika's spawn": 0.02, 'blisterstick shaman': 0.03, "sage's row savant": 0.03, 'twinblade assassins': 0.1, 'blister beetle': 0.06, 'dirtwater wraith': 0.06, 'hornet harasser': 0.06, 'dirty rat': 0.07, 'aeromunculus': 0.03, 'salivating gremlins': 0.01, 'hekma sentinels': 0.01, 'lowland basilisk': 0.04, 'elite headhunter': 0.01, 'phantasmal abomination': 0.11, 'muscle burst': 0.09, 'sanity gnawers': 0.13, 'truth or tale': 0.1, 'trustworthy scout': 0.01, 'aggravate': 0.1, 'enshrouding mist': 0.01, 'accursed spirit': 0.01, 'perilous predicament': 0.04, "d'avenant healer": 0.06, 'peregrine griffin': 0.04, 'favored of iroas': 0.02, 'bull aurochs': 0.04, 'fleeting memories': 0.11, 'snapping creeper': 0.08, 'wrecking beast': 0.03, 'enraged killbot': 0.18, 'sandbar crocodile': 0.11, 'final revels': 0.07, 'petrified plating': 0.14, 'snorting gahr': 0.13, 'sneaky homunculus': 0.05, 'sandskin': 0.06, 'lost in a labyrinth': 0.01, 'blinding flare': 0.18, 'lost hours': 0.07, 'drain the well': 0.11, 'haazda exonerator': 0.06, 'blinding drone': 0.05, 'sangrite surge': 0.1, 'snapping thragg': 0.1, 'dutiful servants': 0.01, 'dutiful thrull': 0.02, 'pheres-band thunderhoof': 0.02, 'trouble': 0.08, 'uncontrollable anger': 0.07, 'pillarfield ox': 0.06, 'pillar of war': 0.05, 'destined': 0.1, 'mortal wound': 0.1, 'barrage ogre': 0.03, 'runaway carriage': 0.02, 'fire at will': 0.07, 'furnace brood': 0.04, 'runewing': 0.04, 'pilgrim of virtue': 0.1, 'pilfering imp': 0.08, 'unconventional tactics': 0.03, "sage of shaila's claim": 0.04, 'vulshok replica': 0.02, 'demon-possessed witch': 0.09, 'soul nova': 0.1, "pirate's cutlass": 0.01, 'atarka efreet': 0.02, 'morbid hunger': 0.09, 'pious interdiction': 0.02, 'lunk errant': 0.03, 'despondency': 0.12, 'undercity scavenger': 0.01, 'corpulent corpse': 0.01, "yarok's wavecrasher": 0.02, 'ice over': 0.07, 'pinnacle of rage': 0.02, 'lumengrid gargoyle': 0.02, 'horned troll': 0.08, 'academy journeymage': 0.02, 'blockade runner': 0.15, 'wake of vultures': 0.01, 'gustcloak runner': 0.08, 'mother kangaroo': 0.09, 'leaf arrow': 0.08, 'ubul sar gatekeepers': 0.02, 'fledgling imp': 0.06, 'duskwalker': 0.12, "tamiyo's epiphany": 0.05, 'lumengrid drake': 0.08, 'helionaut': 0.09, 'barrier of bones': 0.04, 'gaze of adamaro': 0.15, 'loxodon sergeant': 0.01, 'duskworker': 0.11, 'tangle mantis': 0.03, 'sage of mysteries': 0.03, "kagemaro's clutch": 0.05, 'cephalid snitch': 0.07, 'deft dismissal': 0.07, 'talas air ship': 0.1, 'rusted slasher': 0.03, 'phyrexian slayer': 0.08, 'dragon grip': 0.05, 'watercourser': 0.04, 'broodhunter wurm': 0.02, 's.n.e.a.k. dispatcher': 0.1, 'sabertooth outrider': 0.03, 'phyrexian monitor': 0.11, 'corpse lunge': 0.07, 'corpse hauler': 0.05, 'song of blood': 0.1, 'somnomancer': 0.09, 'cliffside lookout': 0.01, 'scarred puma': 0.12, 'kindercatch': 0.07, 'half-orc, half-': 0.12, 'kin-tree warden': 0.04, 'caustic rain': 0.11, "slayer's cleaver": 0.04, 'wrack with madness': 0.05, 'hydrosurge': 0.03, 'trial of zeal': 0.04, 'ascending aven': 0.06, 'hydromorph gull': 0.16, 'locthwain paladin': 0.02, 'llanowar cavalry': 0.03, 'burn bright': 0.02, 'panic attack': 0.04, 'keldon overseer': 0.01, 'darkslick drake': 0.06, 'trigon of rage': 0.12, 'kindly stranger': 0.09, 'cavalry master': 0.13, "patriarch's desire": 0.06, 'pathmaker initiate': 0.01, 'deny the divine': 0.01, 'scaled behemoth': 0.01, 'furnace spirit': 0.06, 'loamdragger giant': 0.04, 'parallax dementia': 0.1, 'mystic zealot': 0.04, 'dwarven strike force': 0.12, 'contempt': 0.07, 'kheru dreadmaw': 0.04, 'feast of worms': 0.1, 'wormwood dryad': 0.05, 'paralyzing grasp': 0.01, 'treats to share': 0.01, 'acolyte of xathrid': 0.09, 'scavenging harpy': 0.02, 'slingbow trap': 0.07, 'scent of cinder': 0.07, 'loathsome chimera': 0.01, 'sleek schooner': 0.11, 'clockwork condor': 0.09, 'parhelion patrol': 0.01, 'trenching steed': 0.09, 'annihilating fire': 0.04, 'kelsinko ranger': 0.05, 'nacatl savage': 0.09, 'smog elemental': 0.05, 'triton waverider': 0.01, 'tel-jilad defiance': 0.07, "nahiri's stoneblades": 0.01, 'deathgaze cockatrice': 0.09, 'looming shade': 0.05, 'eutropia the twice-favored': 0.05, 'smelt-ward ignus': 0.05, 'hysterical blindness': 0.05, 'defender of chaos': 0.14, 'slaughter cry': 0.02, 'pearlspear courier': 0.12, 'screaming fury': 0.14, 'tread mill': 0.13, 'bumbling pangolin': 0.09, 'fill with fright': 0.01, 'cave sense': 0.08, 'aerial predation': 0.03, 'slaughter-priest of mogis': 0.1, 'telethopter': 0.04, 'ashenmoor cohort': 0.1, 'burden of greed': 0.07, 'cloak of confusion': 0.03, 'battering wurm': 0.11, 'goblin war buggy': 0.1, 'daredevil dragster': 0.1, 'hostile realm': 0.04, 'halberdier': 0.06, 'curio vendor': 0.02, 'abzan kin-guard': 0.04, 'geyserfield stalker': 0.12, "galina's knight": 0.13, 'humongulus': 0.03, 'guise of fire': 0.04, 'humming-': 0.06, 'horde ambusher': 0.04, 'aeronaut tinkerer': 0.02, 'cryptic cruiser': 0.07, 'vulshok heartstoker': 0.01, "gaea's protector": 0.02, 'ghor-clan wrecker': 0.02, 'hobblefiend': 0.01, 'zombie scavengers': 0.07, 'galvanic arc': 0.08, 'genetic recombinator': 0.2, 'acceptable losses': 0.09, 'gremlin mine': 0.06, 'witness of the ages': 0.03, 'zendikar farguide': 0.04, 'whipstitched zombie': 0.06, 'hero of the winds': 0.01, 'word of undoing': 0.03, 'weed-pruner poplar': 0.08, 'abzan skycaptain': 0.02, 'war flare': 0.08, 'warren-scourge elf': 0.16, 'whiptongue frog': 0.12, 'hired blade': 0.01, 'winding wurm': 0.14, 'vulshok war boar': 0.08, 'hoverguard observer': 0.09, 'aether herder': 0.04, 'cyclops tyrant': 0.02, 'grim physician': 0.01, 'airdrop condor': 0.13, 'hazardous conditions': 0.02, 'will of the naga': 0.05, 'worldsoul colossus': 0.05, 'voracious vampire': 0.04, 'voracious vacuum': 0.09, "witch's cottage": 0.29, 'hooded kavu': 0.12, 'dark favor': 0.04, 'heavy mattock': 0.06, 'whip-spine drake': 0.01, 'hinterland drake': 0.02, 'wildwood tracker': 0.01, 'wistful thinking': 0.12, 'fresh-faced recruit': 0.02, 'impending doom': 0.01, 'weapon rack': 0.03, 'wetland sambar': 0.04, 'curtain of light': 0.14, 'henchfiend of ukor': 0.02, 'highspire artisan': 0.02, 'zhalfirin decoy': 0.01, 'crypsis': 0.05, 'wary okapi': 0.02, 'dross crocodile': 0.09, 'custodian of the trove': 0.05, 'zof shade': 0.07, 'weldfast wingsmith': 0.01, 'darklit gargoyle': 0.04, 'ghost tactician': 0.07, 'immobilizer eldrazi': 0.08, 'zanikev locust': 0.04, 'warmind infantry': 0.01, 'warfire javelineer': 0.04, 'hedron scrabbler': 0.04, 'friendly fire': 0.06, 'groffskithur': 0.06, 'highland game': 0.01, 'wind-kin raiders': 0.05, 'cruel deceiver': 0.08, 'wardscale crocodile': 0.02, "hunters' feast": 0.07, 'ghostform': 0.04, 'fruit of tizerus': 0.02, 'get the point': 0.02, 'harsh deceiver': 0.05, 'guardian automaton': 0.02, 'war screecher': 0.02, 'guardian lions': 0.07, 'guardian of vitu-ghazi': 0.1, 'illusory wrappings': 0.02, 'drownyard behemoth': 0.1, 'hotheaded giant': 0.05, 'cylian elf': 0.09, 'advanced hoverguard': 0.05, 'gremlin infestation': 0.06, 'acridian': 0.1, 'wicked guardian': 0.01, 'dark bargain': 0.03, 'zombie assassin': 0.07, 'homarid explorer': 0.06, 'volcano imp': 0.06, 'culling drone': 0.05, 'wayward giant': 0.01, 'cunning strike': 0.06, 'voidwielder': 0.07, 'dampening pulse': 0.03, 'weight of the underworld': 0.02, 'adverse conditions': 0.06, 'harvest gwyllion': 0.07, 'yew spirit': 0.06, 'implement of malice': 0.07, 'gustrider exuberant': 0.07, 'heart of light': 0.05, 'winterflame': 0.07, 'harvester troll': 0.02, 'whirlwind adept': 0.01, 'grim strider': 0.04, 'moriok reaver': 0.03, 'moss kami': 0.07, 'disorient': 0.04, 'enlightened maniac': 0.06, 'glintwing invoker': 0.09, 'soul bleed': 0.05, 'morkrut necropod': 0.02, 'sootfeather flock': 0.1, 'engulfing flames': 0.08, 'moonlit scavengers': 0.01, 'soul shepherd': 0.07, 'enforcer griffin': 0.01, 'sootwalkers': 0.07, 'sonic seizure': 0.09, 'baton of courage': 0.06, 'bastion mastodon': 0.03, 'multi-headed': 0.08, 'sokenzan spellblade': 0.1, 'golgari longlegs': 0.03, 'sonic assault': 0.02, 'centaur veteran': 0.06, 'soldier replica': 0.2, 'mournwillow': 0.1, 'barrenton cragtreads': 0.03, 'solitary camel': 0.01, 'chain to memory': 0.01, "murderer's axe": 0.05, 'baloth pup': 0.06, 'spiteful motives': 0.02, 'charging badger': 0.07, "minamo's meddling": 0.04, 'militant inquisitor': 0.04, 'charity extractor': 0.01, 'spinehorn minotaur': 0.04, 'barbarian lunatic': 0.1, 'spellgorger barbarian': 0.1, 'chainflinger': 0.09, 'spectral prison': 0.07, 'mistform stalker': 0.09, 'mistform mask': 0.1, 'dispersal technician': 0.02, 'spined basher': 0.04, 'spellweaver duo': 0.07, "champion's drake": 0.05, 'sphinx of the guildpact': 0.07, 'endangered armodon': 0.03, 'spin engine': 0.01, 'spinal centipede': 0.01, 'spinal graft': 0.03, 'battalion foot soldier': 0.03, 'lowland tracker': 0.1, 'silverclaw griffin': 0.04, 'night market guard': 0.01, 'niblis of dusk': 0.05, 'carrion beetles': 0.12, 'fiddlehead kami': 0.09, 'nexus wardens': 0.01, 'neurok prodigy': 0.03, 'netter en-dal': 0.09, "sinstriker's will": 0.11, 'cast into darkness': 0.01, 'sip of hemlock': 0.02, 'epiphany storm': 0.04, 'silt crawler': 0.09, 'nimbus of the isles': 0.01, 'noble vestige': 0.03, 'capashen templar': 0.11, 'sickle dancer': 0.02, 'silk net': 0.06, 'nimble innovator': 0.06, 'silburlind snapper': 0.02, 'silent attendant': 0.11, 'nim abomination': 0.06, 'silent skimmer': 0.06, "beastmaster's magemark": 0.08, 'sludge crawler': 0.07, 'naga oracle': 0.02, 'slimy kavu': 0.12, 'slipstream serpent': 0.01, 'gloomhunter': 0.07, 'celestial enforcer': 0.01, 'murk strider': 0.02, 'cat burglar': 0.08, 'necrogen censer': 0.05, 'glory bearers': 0.01, 'skirk volcanist': 0.1, 'skittering heartstopper': 0.03, 'skulduggery': 0.02, 'skyswirl harrier': 0.01, 'battleflight eagle': 0.01, 'skyline predator': 0.03, 'skyline scout': 0.02, 'narstad scrapper': 0.04, 'enthralling hold': 0.02, 'squirming mass': 0.08, 'survey the wreckage': 0.03, 'malevolent noble': 0.01, 'malachite golem': 0.09, 'sweet oblivion': 0.03, 'surging dementia': 0.07, 'swirling spriggan': 0.09, 'auriok replica': 0.09, 'magmaroth': 0.03, 'surging sentinels': 0.05, 'sworn guardian': 0.02, 'aven flock': 0.05, 'mantis engine': 0.09, 'manticore of the gauntlet': 0.01, 'flamespeaker adept': 0.02, "death's caress": 0.04, 'aven initiate': 0.03, 'cinder crawler': 0.07, 'sunspire griffin': 0.04, 'luminous bonds': 0.02, 'take heart': 0.05, 'lumengrid warden': 0.05, 'takenuma bleeder': 0.06, 'fledgling osprey': 0.08, 'loxodon line breaker': 0.01, 'syndicate guildmage': 0.07, 'sylvan brushstrider': 0.02, 'citywatch sphinx': 0.05, 'synchronized strike': 0.08, 'flay': 0.05, 'macabre mockery': 0.1, 'lurking crocodile': 0.06, "tahngarth's glare": 0.09, 'clan guildmage': 0.04, 'tail slash': 0.04, 'maraleaf rider': 0.01, 'steadfast cathar': 0.06, 'steadfast sentry': 0.01, 'steal strength': 0.06, 'steelclad serpent': 0.1, 'steelgaze griffin': 0.01, 'stern constable': 0.02, 'stinging scorpion': 0.06, 'mental vapors': 0.09, 'mental agony': 0.02, 'first volley': 0.08, 'might beyond reason': 0.02, 'balduvian shaman': 0.07, 'midnight duelist': 0.04, 'midlife upgrade': 0.09, 'metropolis sprite': 0.02, 'stampeding horncrest': 0.01, 'dissension in the ranks': 0.02, 'starfall': 0.06, 'starlight invoker': 0.18, 'azorius knight-arbiter': 0.03, 'mardu roughrider': 0.05, 'sudden storm': 0.06, 'mardu hateblade': 0.04, 'stone haven medic': 0.02, 'mardu blazebringer': 0.03, 'suicidal charge': 0.06, 'march of the returned': 0.04, 'marauding looter': 0.09, 'structural collapse': 0.01, 'stronghold zeppelin': 0.1, 'memory theft': 0.03, 'flailing soldier': 0.12, 'stoneforge acolyte': 0.05, 'stonewise fortifier': 0.01, 'storm the citadel': 0.06, 'matsu-tribe decoy': 0.08, 'flamecast wheel': 0.02, 'martyr of dusk': 0.12, 'marshmist titan': 0.05, 'marsh lurker': 0.04, 'goblin sappers': 0.06, 'bloodmist infiltrator': 0.04, 'breath of fire': 0.05, 'riveting rigger': 0.07, 'rise to the challenge': 0.02, 'goblin fire fiend': 0.06, 'excommunicate': 0.03, 'blow your house down': 0.03, 'ribbon snake': 0.07, 'branded brawlers': 0.03, 'fallen cleric': 0.03, 'primal frenzy': 0.11, 'rime dryad': 0.06, 'riot gear': 0.02, 'riptide biologist': 0.1, 'roiling waters': 0.04, 'brilliant spectrum': 0.04, 'pin to the earth': 0.02, 'blood glutton': 0.03, 'runeboggle': 0.05, "runner's bane": 0.04, 'bronze sable': 0.02, 'phyrexian prowler': 0.12, 'pincher beetles': 0.05, 'blood burglar': 0.02, 'saberclaw golem': 0.02, 'phyrexian driver': 0.07, 'run aground': 0.01, 'pinpoint avalanche': 0.05, 'plated seastrider': 0.02, 'roving keep': 0.12, 'farbog explorer': 0.06, 'rosethorn halberd': 0.01, 'rotted hystrix': 0.04, 'goblin ski patrol': 0.03, 'rubble': 0.05, 'rubblebelt boar': 0.01, 'goblin skycutter': 0.08, 'rhystic shield': 0.07, 'primordial wurm': 0.01, 'raging poltergeist': 0.02, 'rage of purphoros': 0.04, 'ragamuffyn': 0.11, 'rabid elephant': 0.09, 'reckless ogre': 0.05, 'reduce': 0.05, 'quarry beetle': 0.09, 'raging spirit': 0.05, 'prismatic circle': 0.05, 'ravenous leucrocota': 0.01, 'bonethorn valesk': 0.08, 'border guardian': 0.1, 'rathi intimidator': 0.08, 'rakdos roustabout': 0.01, 'rakdos ringleader': 0.05, 'rakdos ragemutt': 0.14, 'razorfield thresher': 0.09, "qilin's blessing": 0.07, 'faerie squadron': 0.06, 'bola warrior': 0.06, 'prowling nightstalker': 0.03, 'bog tatters': 0.08, 'bog smugglers': 0.09, 'rescuer sphinx': 0.07, 'psychic overload': 0.1, 'prying eyes': 0.01, 'bog gnarr': 0.08, 'blurry beeble': 0.09, 'dead ringers': 0.06, 'prison barricade': 0.1, 'pull under': 0.04, 'puncturing blow': 0.01, 'expose to daylight': 0.03, 'pyric salamander': 0.04, 'explosive apparatus': 0.01, 'pyknite': 0.05, 'faithbearer paladin': 0.03, 'borrowed malevolence': 0.02, 'sacred rites': 0.14, 'oracle of dust': 0.04, 'femeref scouts': 0.08, 'sell-sword brute': 0.05, 'godhunter octopus': 0.05, 'one with the wind': 0.03, 'ominous sphinx': 0.05, 'old guard': 0.05, 'orazca raptor': 0.02, 'searing spear askari': 0.07, 'cackling flames': 0.07, 'ordruun veteran': 0.05, 'ordruun commando': 0.05, 'order of the sacred bell': 0.05, 'orcish paratroopers': 0.12, 'seize the initiative': 0.03, 'feral deceiver': 0.09, 'ogre resister': 0.02, 'evil eye of urborg': 0.13, "shinen of fear's chill": 0.07, 'nyxborn marauder': 0.01, 'benalish honor guard': 0.01, "shieldmate's blessing": 0.04, 'candlelight vigil': 0.01, 'numbing jellyfish': 0.09, 'gold-forged sentinel': 0.02, 'belligerent whiptail': 0.02, 'shore snapper': 0.07, 'shattering blow': 0.05, 'setessan starbreaker': 0.06, 'callous deceiver': 0.08, 'feral invocation': 0.02, 'feral krushok': 0.02, 'shadow rider': 0.07, 'shaggy camel': 0.08, 'feral ridgewolf': 0.08, 'shatter assumptions': 0.02, 'ferocious charge': 0.06, 'searchlight geist': 0.01, 'felhide minotaur': 0.05, 'sandstone warrior': 0.02, 'sanguine glorifier': 0.04, 'bubbling beebles': 0.1, 'goblin turncoat': 0.13, 'goblin trailblazer': 0.01, 'defensive stance': 0.02, 'pensive minotaur': 0.03, 'bull elephant': 0.1, 'scab-clan charger': 0.01, 'scaldkin': 0.03, 'burden of guilt': 0.03, 'sand strangler': 0.03, 'sanctum custodian': 0.1, 'death bomb': 0.09, 'dirgur nemesis': 0.02, 'sacrifice play': 0.06, 'safehold duo': 0.1, 'fateful end': 0.02, "saheeli's silverwing": 0.01, 'blistering dieflyn': 0.04, 'fathom fleet boarder': 0.02, 'salt road patrol': 0.03, 'saltfield recluse': 0.01, 'salvage slasher': 0.08, 'everglove courier': 0.16, 'burn the impure': 0.05, 'ethereal guidance': 0.02, 'screaming shield': 0.06, 'daybreak chimera': 0.01, 'cabal evangel': 0.01, 'blanchwood treefolk': 0.09, 'burr grafter': 0.05, 'scoria elemental': 0.01, "path of anger's flame": 0.16, 'scavenging scarab': 0.06, 'feast of dreams': 0.05, 'pardic wanderer': 0.01, 'pardic lancer': 0.09, 'pardic collaborator': 0.13, 'parapet watchers': 0.07, 'scorching missile': 0.26, 'scorchwalker': 0.05, 'loxodon convert': 0.04, 'gibbering hyenas': 0.08, 'labyrinth minotaur': 0.02, 'lagac lizard': 0.12, 'ampryn tactician': 0.03, 'earthshaking si': 0.06, 'lair delve': 0.04, 'crackdown construct': 0.11, 'crackling club': 0.09, 'thundering chariot': 0.07, 'ambitious aetherborn': 0.02, 'thundering ceratok': 0.01, 'thundercloud elemental': 0.06, 'crafty octopus': 0.08, 'landbind ritual': 0.09, 'common iguana': 0.06, 'fortress cyclops': 0.05, 'valorous steed': 0.02, "ixalli's keeper": 0.02, 'lash of the whip': 0.01, 'vernadi shieldmate': 0.02, 'timely hordemate': 0.02, 'concussive bolt': 0.03, 'courier griffin': 0.02, 'arboretum elemental': 0.06, 'unwavering initiate': 0.03, 'timbermaw larva': 0.06, 'uproot': 0.08, 'krovikan scoundrel': 0.07, 'urborg phantom': 0.1, 'jagwasp swarm': 0.07, 'kuldotha flamefiend': 0.05, "kumano's pupils": 0.1, 'labyrinth guardian': 0.04, 'vampire revenant': 0.01, 'ebon drake': 0.13, 'it that gets left hanging': 0.07, 'venerable kumo': 0.02, 'daru cavalier': 0.09, 'colossapede': 0.02, 'flowstone channeler': 0.06, 'flowstone armor': 0.09, 'grave birthing': 0.06, 'vengeful rebel': 0.05, 'floodwaters': 0.04, "iroas's blessing": 0.01, 'venomous fangs': 0.07, 'ardenvale paladin': 0.01, 'ardenvale tactician': 0.05, 'legion guildmage': 0.05, 'thoughtbound primoc': 0.09, 'command the storm': 0.01, 'it of the horrid swarm': 0.07, "isperia's skywatch": 0.01, 'thriving rats': 0.07, 'thriving grubs': 0.02, 'dune beetle': 0.02, 'ledev guardian': 0.01, 'threnody singer': 0.02, 'leaden fists': 0.04, 'leap of flame': 0.07, 'ironclaw buzzardiers': 0.03, 'leaping lizard': 0.03, 'kraul swarm': 0.02, 'kavu recluse': 0.1, 'kjeldoran javelineer': 0.07, 'kavu primarch': 0.03, 'eager beaver': 0.09, 'kavu aggressor': 0.13, 'anurid murkdiver': 0.08, "klothys's design": 0.02, 'forerunner of the coalition': 0.25, 'tusked colossodon': 0.03, "consul's shieldguard": 0.02, 'kavu scout': 0.11, 'keldon berserker': 0.05, 'kessig wolf': 0.08, 'treefolk mystic': 0.11, 'kelinore bat': 0.07, 'foothill guide': 0.1, 'trigon of mending': 0.05, 'trigon of thought': 0.07, 'keldon raider': 0.01, 'anoint': 0.03, 'dwarven priest': 0.02, 'anointed deacon': 0.02, 'answered prayers': 0.06, 'consuming sinkhole': 0.02, 'keeper of the lens': 0.04, 'triumphant surge': 0.01, 'dwarven patrol': 0.14, 'trollbred guardian': 0.14, "trapfinder's trick": 0.03, 'dwarven lightsmith': 0.03, 'kraul stinger': 0.05, 'undercity necrolisk': 0.03, 'corridor monitor': 0.03, 'applied aeronautics': 0.11, 'kor line-slinger': 0.03, 'tolarian scholar': 0.01, 'joint assault': 0.03, 'aquamorph entity': 0.08, 'unified strike': 0.14, 'unmake the graves': 0.06, 'krark-clan grunt': 0.05, 'tin street market': 0.02, 'krark-clan ogre': 0.05, 'kami of the hunt': 0.07, 'kami of tattered shoji': 0.1, 'knight of the keep': 0.01, 'kami of lunacy': 0.22, 'consign to the pit': 0.01, 'knight of the widget': 0.1, "ulamog's reclaimer": 0.05, 'torch song': 0.2, 'giant mantis': 0.02, 'coiled tinviper': 0.03, 'clockwork gnomes': 0.03, 'indomitable will': 0.04, 'viridian lorebearers': 0.09, 'territorial roc': 0.06, 'cliff threader': 0.06, "liliana's steward": 0.02, 'cloudreader sphinx': 0.02, 'gilded sentinel': 0.01, 'graphic violence': 0.11, 'intrepid provisioner': 0.02, 'code of constraint': 0.06, "ghoulcaller's accomplice": 0.01, "diviner's lockbox": 0.01, 'flight of equenauts': 0.07, 'armed response': 0.09, 'living totem': 0.03, 'lingering phantom': 0.04, 'ghostly sentinel': 0.03, 'cleric of the forward order': 0.04, 'armorer guildmage': 0.09, 'vexing scuttler': 0.1, 'eldrazi aggressor': 0.05, 'fleshgrafter': 0.05, 'viscid lemures': 0.07, 'viashino bey': 0.07, 'viashino racketeer': 0.02, 'armored transport': 0.01, 'loathsome catoblepas': 0.01, "teyo's lightshield": 0.02, 'lightning reflexes': 0.12, "veteran's sidearm": 0.04, 'gilded cerodon': 0.01, 'druid of horns': 0.04, 'thalakos mistfolk': 0.1, 'llanowar vanguard': 0.11, 'vicious betrayal': 0.03, 'cogmentor': 0.1, 'dizzying swoop': 0.05, 'incubator drone': 0.05, 'clear a path': 0.03, 'inflation station': 0.11, 'arrow storm': 0.03, 'elite javelineer': 0.1, 'division table': 0.07, 'akroan sergeant': 0.02, 'alirios, enraptured': 0.05, 'argothian swine': 0.09, 'teremko griffin': 0.06, 'crowd favorites': 0.11, 'temur runemark': 0.02, 'living airship': 0.06, 'tattered haunter': 0.02, 'crocanura': 0.07, 'tenth district veteran': 0.02, 'blazing blade askari': 0.05, 'disciple of kangee': 0.08, 'reaver ambush': 0.06, 'scrapyard salvo': 0.06, 'screaming seahawk': 0.03, 'satyr rambler': 0.08, 'reaper of flight moonsilver': 0.03, 'kalastria nightwatch': 0.08, 'rage of winter': 0.01, 'garrison sergeant': 0.05, 'garenbrig paladin': 0.02, 'duskmantle operative': 0.02, 'sawtooth thresher': 0.07, 'feaster of fools': 0.02, "viper's kiss": 0.04, 'half-shark, half-': 0.12, "queen's agent": 0.02, 'hallowed ground': 0.02, 'scholar of stars': 0.01, 'scent of jasmine': 0.1, 'jungle creeper': 0.05, 'grizzled angler': 0.05, 'recuperate': 0.08, 'decommission': 0.02, 'underworld fires': 0.01, 'queen of ice': 0.01, 'reduce in stature': 0.03, 'alabaster kirin': 0.02, 'scalding cauldron': 0.01, 'umara entangler': 0.02, 'scavenged weaponry': 0.13, 'garenbrig squire': 0.01, 'unforge': 0.02, 'wormfang newt': 0.09, 'scorchmark': 0.02, 'reckless cohort': 0.02, 'scorch the fields': 0.03, 'paranoid parish-blade': 0.05, 'kami of the waning moon': 0.13, 'abandoned outpost': 0.11, 'harrier naga': 0.02, 'raven guild initiate': 0.07, 'incendiary oracle': 0.01, 'incurable ogre': 0.05, 'sergeant-at-arms': 0.01, 'border patrol': 0.12, 'keen glidemaster': 0.01, 'senate griffin': 0.03, 'forced landing': 0.01, 'graven abomination': 0.02, 'ogre siegebreaker': 0.02, 'femeref knight': 0.09, 'octoprophet': 0.06, 'incite': 0.05, 'escape routes': 0.1, 'observant alseid': 0.05, 'contraption cannon': 0.09, 'esper sojourners': 0.08, 'big boa constrictor': 0.09, 'shadow glider': 0.01, 'shade of trokair': 0.01, 'crypt lurker': 0.01, 'keldon warcaller': 0.02, "seton's desire": 0.07, 'dark inquiry': 0.02, 'read the tides': 0.01, 'coral commando': 0.01, 'twilight panther': 0.04, 'eye gouge': 0.01, 'hanabi blast': 0.07, 'twisted experiment': 0.1, 'really epic punch': 0.09, 'bone pit brute': 0.01, 'cackling fiend': 0.23, 'dance of shadows': 0.09, 'caged zombie': 0.01, 'ravenous vampire': 0.12, 'grisly anglerfish': 0.05, 'blade instructor': 0.02, 'blade-tribe berserkers': 0.02, 'borderland minotaur': 0.01, 'inertia bubble': 0.07, 'rain of rust': 0.05, 'reach of shadows': 0.02, "sarkhan's catharsis": 0.01, 'duct crawler': 0.02, 'perish the thought': 0.05, 'vedalken blademaster': 0.03, "roilmage's trick": 0.02, 'dukhara peafowl': 0.03, 'vedalken mesmerist': 0.01, 'veiled serpent': 0.09, 'veiled shade': 0.02, 'guardian of pilgrims': 0.02, 'revered dead': 0.14, 'diregraf escort': 0.05, 'rookie mistake': 0.01, 'vestige of emrakul': 0.03, 'bloodborn scoundrels': 0.05, 'rotted hulk': 0.03, 'illusionary informant': 0.07, 'douser of lights': 0.01, 'proven combatant': 0.03, 'boulder salvo': 0.01, 'boulderfall': 0.02, 'bog glider': 0.06, 'rockcaster platoon': 0.09, 'rising miasma': 0.04, 'invade the city': 0.08, 'vengeful warchief': 0.03, 'impale': 0.02, 'invading manticore': 0.02, 'grazing kelpie': 0.07, 'volcanic rambler': 0.06, 'foundry assembler': 0.04, 'alley strangler': 0.05, 'falling timber': 0.09, 'gruesome scourger': 0.02, 'cruel finality': 0.04, 'intrusive packbeast': 0.01, 'prakhata pillar-bug': 0.03, 'foundry screecher': 0.02, 'bloodfire mentor': 0.04, 'iron will': 0.09, 'roaming ghostlight': 0.01, 'revoke privileges': 0.02, 'prizefighter construct': 0.01, 'prized griffin': 0.01, 'ritual of steel': 0.07, 'brainbite': 0.05, 'gruesome encore': 0.15, 'iron league steed': 0.01, 'bring to trial': 0.04, 'research assistant': 0.03, 'ancient carp': 0.05, 'wretched banquet': 0.04, 'great hart': 0.01, 'explosive growth': 0.12, 'alaborn trooper': 0.02, 'salvage scuttler': 0.04, 'janjeet sentry': 0.06, 'grollub': 0.06, 'fathom feeder': 0.23, 'putrid cyclops': 0.04, 'jadecraft artisan': 0.04, 'sage-eye harrier': 0.05, 'pheres-band centaurs': 0.02, 'pursuit of flight': 0.03, 'pursue glory': 0.02, 'ana disciple': 0.09, 'blind phantasm': 0.05, 'sanguine indulgence': 0.01, 'forgotten sentinel': 0.01, 'frilled oculus': 0.02, 'daring leap': 0.08, 'ridged kusite': 0.01, 'regathan firecat': 0.05, 'disarm': 0.07, 'bojuka brigand': 0.08, 'brutal deceiver': 0.07, 'pilgrim of justice': 0.12, 'viashino skeleton': 0.06, 'academy drake': 0.01, 'zephyr charge': 0.02, 'rumbling sentry': 0.02, 'pious wayfarer': 0.01, 'vexing gull': 0.01, 'kessig dire swine': 0.03, 'veteran of the depths': 0.15, 'illuminated wings': 0.09, 'piety charm': 0.06, 'accomplished automaton': 0.03, 'pierce the sky': 0.01, 'purge the profane': 0.04, 'amphin cutthroat': 0.06, 'cowl prowler': 0.02, 'ghoulflesh': 0.07, 'crackling triton': 0.02, 'ambush krotiq': 0.03, 'fatal fumes': 0.02, 'punish the enemy': 0.05, 'ground rift': 0.39, 'russet wolves': 0.03, 'rush of ice': 0.04, 'collar the culprit': 0.02, 'ember shot': 0.1, 'memory drain': 0.01, 'melancholy': 0.02, 'daru healer': 0.1, 'lightning diadem': 0.04, "lich's caress": 0.02, 'darting merfolk': 0.09, 'embraal gear-smasher': 0.04, 'colossodon yearling': 0.03, 'efreet weaponmaster': 0.04, 'geist trappers': 0.04, 'flowstone embrace': 0.07, 'war-torch goblin': 0.07, 'mental discipline': 0.13, 'culling mark': 0.02, "cultist's staff": 0.03, 'masked blackguard': 0.01, 'street riot': 0.08, 'street sweeper': 0.04, 'hold at bay': 0.03, 'flamecore elemental': 0.06, 'dreg reaver': 0.05, 'stromkirk mentor': 0.05, 'master of diversion': 0.06, 'mausoleum harpy': 0.03, 'maulfist squad': 0.01, 'maulfist revolutionary': 0.09, "hisoka's guard": 0.08, 'strangling spores': 0.01, 'stormcloud spirit': 0.07, 'stormrider spirit': 0.02, 'chipper chopper': 0.08, 'strange augmentation': 0.03, 'springsage ritual': 0.09, 'spiraling duelist': 0.04, 'mindstatic': 0.05, 'humble budoka': 0.09, 'spiteful bully': 0.03, 'thriving ibex': 0.02, 'heroes of the revel': 0.01, 'heroic defiance': 0.1, 'firefright mage': 0.07, 'bane alley blackguard': 0.02, 'mire blight': 0.04, 'spike-tailed ceratops': 0.03, 'ghirapur osprey': 0.01, 'minotaur tactician': 0.05, "fireforger's puzzleknot": 0.01, 'first pick': 0.1, 'gorilla pack': 0.08, 'midvast protector': 0.03, 'stalking drone': 0.02, 'echoing calm': 0.07, 'messenger drake': 0.03, 'stasis cocoon': 0.14, 'leaf dancer': 0.12, 'aether inspector': 0.02, 'militant monk': 0.09, 'deathmask nezumi': 0.1, 'flutterfox': 0.04, 'crown of ascension': 0.05, 'lead astray': 0.1, 'hollowhenge beast': 0.07, 'herald of the fair': 0.01, 'daru stinger': 0.11, 'fleshmad steed': 0.01, 'divine arrow': 0.04, 'flatten': 0.03, 'civic stalwart': 0.02, 'struggle for sanity': 0.12, 'swarm guildmage': 0.06, 'swarmborn giant': 0.06, 'swirling torrent': 0.04, 'defiant khenra': 0.03, 'tel-jilad exile': 0.05, 'hopeful eidolon': 0.09, "talara's bane": 0.05, 'cleansing ray': 0.01, 'talons of falkenrath': 0.05, 'tasseled dromedary': 0.03, 'elite skirmisher': 0.04, 'deathcurse ogre': 0.13, "horncaller's chant": 0.03, 'aspect of manticore': 0.01, 'horror of the dim': 0.02, 'lyev decree': 0.01, 'tah-crop skirmisher': 0.09, "teferi's drake": 0.08, 'wave of indifference': 0.06, "ashiok's skulker": 0.02, 'agent of horizons': 0.01, 'drifter il-dal': 0.01, 'armored cancrix': 0.03, 'wellgabber apothecary': 0.08, 'howling gale': 0.16, 'marauding maulhorn': 0.01, 'sumala woodshaper': 0.02, 'terrus wurm': 0.04, 'lightning prowess': 0.1, 'coastline chimera': 0.01, 'axebane beast': 0.02, 'glacial stalker': 0.05, 'stymied hopes': 0.02, 'subcontract': 0.1, "thaumaturge's familiar": 0.01, 'marker beetles': 0.12, 'mardu runemark': 0.05, 'success!': 0.07, 'mark for death': 0.1, 'elvish pathcutter': 0.09, 'terror of the fairgrounds': 0.01, 'malicious advice': 0.1, 'sunmane pegasus': 0.02, 'supply caravan': 0.02, "lithomancer's focus": 0.03, 'tenement crasher': 0.02, 'malicious intent': 0.02, 'rumors of my death . . .""': 0.02, 'aven reedstalker': 0.02, 'sun-crested pterodon': 0.02, 'weldfast monitor': 0.02, 'aven of enduring hope': 0.02, 'aven envoy': 0.06, 'cloud manta': 0.01, 'aven fateshaper': 0.12, 'lashknife': 0.1, 'dreadful apathy': 0.01, 'nightscape apprentice': 0.1, 'darkblade agent': 0.02, 'gluttonous cyclops': 0.04, 'nightcreep': 0.17, 'night market aeronaut': 0.01, 'nightsnare': 0.02, 'towering indrik': 0.01, 'silent artisan': 0.02, 'festive funeral': 0.03, 'glowering rogon': 0.06, 'touch of invisibility': 0.08, 'neurok spy': 0.05, 'nav squad commandos': 0.02, 'windstorm drake': 0.13, 'torch gauntlet': 0.02, 'skittering monstrosity': 0.02, 'kolaghan skirmisher': 0.03, 'skitterskin': 0.06, "nature's panoply": 0.05, 'simplify': 0.08, 'sink into takenuma': 0.07, 'nema siltlurker': 0.05, 'needleshot gourna': 0.09, 'kjeldoran outrider': 0.05, 'captivating unicorn': 0.01, 'hazmat suit (used)': 0.07, 'nyxborn seaguard': 0.01, 'hydroform': 0.05, 'benalish veteran': 0.02, 'nyxborn colossus': 0.01, 'nyxborn brute': 0.01, 'nyx infusion': 0.02, 'havoc sower': 0.04, 'anodet lurker': 0.02, 'traveling philosopher': 0.02, 'witness the end': 0.02, 'shatterskull giant': 0.03, 'dementia bat': 0.02, 'shatterskull recruit': 0.01, 'healing grace': 0.05, 'training drone': 0.02, 'noble elephant': 0.07, 'sick and tired': 0.07, 'headwater sentries': 0.01, 'canopy gorger': 0.03, 'gnome-made engine': 0.11, 'kinscaer harpoonist': 0.05, 'trapjaw kelpie': 0.04, 'transguild courier': 0.34, 'errant doomsayers': 0.01, 'wall of diffusion': 0.02, 'transmogrifying licid': 0.21, 'deface': 0.04, 'wildwood geist': 0.02, 'enhanced awareness': 0.04, 'moorland drifter': 0.02, 'moor fiend': 0.05, 'moonwing moth': 0.07, 'lagonna-band elder': 0.02, "kytheon's tactics": 0.02, 'cyclops electromancer': 0.02, 'giant warthog': 0.06, "glissa's courier": 0.04, 'cephalid pathmage': 0.12, 'finders, keepers': 0.07, 'finishing blow': 0.01, 'moss viper': 0.11, 'cyclops of one-eyed pass': 0.01, 'sorcerer of the fang': 0.01, 'hematite golem': 0.13, 'mistform seaswift': 0.1, 'mistform dreamer': 0.1, 'mistford river turtle': 0.01, 'dawn gryff': 0.02, 'henge walker': 0.01, 'goliath beetle': 0.07, 'misguided rage': 0.1, 'misthoof kirin': 0.12, 'barbarian bully': 0.09, 'fire urchin': 0.01, "sparkmage's gambit": 0.02, 'spawn of rix maadi': 0.03, 'cutthroat maneuver': 0.02, 'spearpoint oread': 0.04, 'moaning spirit': 0.09, 'cut the tethers': 0.09, 'battle hurda': 0.02, 'naga eternal': 0.01, 'sleeping potion': 0.09, 'korozda monitor': 0.01, 'mystic visionary': 0.05, 'slimebind': 0.01, 'slinking skirge': 0.09, 'slaughter drone': 0.03, 'sky ruin drake': 0.03, 'skygames': 0.03, 'skyraker giant': 0.01, 'tome anima': 0.01, 'deviant glee': 0.03, 'fiery mantle': 0.12, 'battle frenzy': 0.05, 'dedicated martyr': 0.06, 'snowhorn rider': 0.07, 'kronch wrangler': 0.02, 'centaur peacemaker': 0.02, 'batterhorn': 0.16, 'cavern thoctar': 0.07, 'aquatic incursion': 0.11, "kozilek's shrieker": 0.04, "debtors' transport": 0.02, 'hedron blade': 0.05, 'final flare': 0.01, 'smoke teller': 0.01, 'muse drake': 0.01, 'smoldering efreet': 0.05, 'plains': 0.2, 'island': 0.17, 'mountain': 0.26, 'swamp': 0.17, 'forest': 0.63, 'yurlok of scorch thrash': 0.17, 'porcuparrot': 0.02, 'zagras, thief of heartbeats': 0.22, 'skyclave shadowcat': 0.03, 'brokkos, apex of forever': 1.05, 'timely ward': 0.35, 'imoti, celebrant of bounty': 0.21, "akroma's will": 6.59, 'iridescent hornbeetle': 0.11, 'consecrate // consume': 0.1, 'liesa, shroud of dusk': 0.5, 'unexpected fangs': 0.01, 'crawling barrens': 0.34, 'savai crystal': 0.11, 'dire tactics': 0.11, 'refuse // cooperate': 0.11, 'armix, filigree thrasher': 0.02, 'heightened reflexes': 0.01, 'inscription of insight': 0.17, 'akoum hellhound': 0.02, 'akroma, vision of ixidor': 3.42, 'dusk // dawn': 0.43, 'crimson fleet commodore': 0.03, 'obosh, the preypiercer': 0.37, "agadeem's awakening": 14.5, 'court of ire': 0.7, "bonders' enclave": 1.77, "emeria's call": 4.62, 'skycat sovereign': 0.43, 'valakut exploration': 0.95, 'blackbloom rogue': 0.08, 'extinction event': 0.62, 'pelakka predation': 0.1, 'the ozolith': 14.28, 'roiling regrowth': 0.24, 'enigma thief': 0.2, 'savai triome': 9.29, 'orah, skyclave hierophant': 0.17, 'coveted prize': 0.14, 'gilanra, caller of wirewood': 0.09, 'collision // colossus': 0.17, 'archon of emeria': 1.33, 'dreamtail heron': 0.01, 'demonic lore': 0.01, 'shatterskull smashing // shatterskull, the hammer pass': 3.44, 'archelos, lagoon mystic': 0.19, 'swallow whole': 0.03, 'wear // tear': 1.24, 'response // resurgence': 0.24, 'swarm shambler': 0.14, 'sejiri shelter': 0.43, 'court of cunning': 1.47, 'bala ged recovery': 3.64, 'far // away': 0.23, 'acquisitions expert': 0.09, 'memory leak': 0.02, 'regal leosaur': 0.07, "taborax, hope's demise": 0.22, 'migration path': 0.96, 'valakut awakening // valakut stoneforge': 5.65, 'mythos of snapdax': 0.24, 'lavabrink venturer': 0.12, 'suffocating fumes': 0.1, 'reshape the earth': 4.17, 'farfinder': 0.01, 'fathom fleet swordjack': 0.11, 'duskfang mentor': 0.1, 'brightclimb pathway': 4.04, 'sure-footed infiltrator': 0.01, 'zagoth crystal': 0.03, 'pillarverge pathway': 3.27, 'linvala, shield of sea gate': 0.23, 'zulaport duelist': 0.01, 'jubilant skybonder': 0.17, 'zagoth mamba': 0.03, 'moss-pit skeleton': 0.05, 'reclaim the wastes': 0.03, 'broken wings': 0.01, 'maelstrom colossus': 0.02, 'chevill, bane of monsters': 1.14, 'rumbling rockslide': 0.01, 'rockslide sorcerer': 0.02, 'glasspool mimic // glasspool shore': 4.52, 'emberwilde captain': 0.45, 'light of hope': 0.14, 'trumpeting gnarr': 0.05, 'shark typhoon': 10.97, 'roil eruption': 0.02, 'cliffhaven kitesail': 0.04, 'annoyed altisaur': 0.12, 'vow of torment': 0.03, 'obuun, mul daya ancestor': 1.02, 'malakir rebirth': 1.89, 'moraug, fury of akoum': 4.58, 'sakashima of a thousand faces': 22.02, 'parcelbeast': 0.25, 'inspired ultimatum': 0.17, 'benevolent blessing': 0.04, 'go for blood': 0.06, 'vastwood fortification': 0.13, 'commit // memory': 1.62, 'forceful denial': 0.02, 'prava of the steel legion': 0.2, 'yidaro, wandering monster': 0.33, 'channeled force': 0.01, 'solid footing': 0.01, 'pouncing shoreshark': 0.06, 'phylath, world sculptor': 0.33, 'vine gecko': 0.03, 'weaponize the monsters': 0.07, 'ram through': 0.11, 'mutual destruction': 0.01, 'sea gate banneret': 0.01, 'mardu outrider': 0.0, 'migratory greathorn': 0.08, 'zirda, the dawnwaker': 1.44, "sakashima's will": 0.19, 'inscription of abundance': 0.68, 'aegis turtle': 0.04, 'reyav, master smith': 0.22, 'lukka, coppercoat outcast': 1.22, "general's enforcer": 0.1, 'yasharn, implacable earth': 0.33, 'araumi of the dead tide': 0.08, 'keep safe': 0.02, 'colossification': 0.27, 'seraphic greatsword': 0.53, 'revival // revenge': 0.99, 'relic axe': 0.04, 'easy prey': 0.02, 'elvish dreadlord': 0.23, 'connive // concoct': 0.33, 'gust of wind': 0.02, 'merfolk windrobber': 0.1, 'wilt': 0.2, 'grimdancer': 0.19, 'spectator seating': 4.83, 'thrash // threat': 0.15, 'port razer': 5.39, 'lithoform blight': 0.02, 'bala ged recovery // bala ged sanctuary': 2.95, 'lithoform engine': 8.8, 'skyclave shade': 0.16, 'relic amulet': 0.01, "kazuul's fury": 0.36, 'kargan warleader': 0.07, 'kaza, roil chaser': 0.11, 'horizon stone': 0.82, 'find // finality': 0.12, 'hagra constrictor': 0.02, "shadows' verdict": 0.13, 'fully grown': 0.01, 'field research': 0.01, 'volcanic torrent': 0.16, 'scute swarm': 4.86, 'nadier, agent of the duskenel': 0.13, 'nissa of shadowed boughs': 1.42, 'silundi vision // silundi isle': 0.39, "bloodchief's thirst": 0.46, "kazuul's fury // kazuul's cliffs": 0.25, 'quartzwood crasher': 1.03, 'boarding party': 0.1, 'breeches, brazen plunderer': 0.08, "kamahl's will": 0.19, 'vastwood surge': 0.23, 'umara wizard': 0.02, 'never // return': 0.56, 'call of the death-dweller': 0.38, 'fall from favor': 0.02, 'sweet-gum recluse': 0.15, 'reconnaissance mission': 0.25, 'zara, renegade recruiter': 0.29, 'skyclave geopede': 0.01, 'hagra mauling // hagra broodpit': 0.75, 'whisper squad': 0.01, 'forsaken monument': 4.56, 'brightclimb pathway // grimclimb pathway': 4.27, 'blim, comedic genius': 0.11, 'zagoth triome': 10.89, 'roiling vortex': 0.43, 'leave // chance': 0.31, 'slitherwisp': 0.19, 'marauding blight-priest': 0.26, 'winota, joiner of forces': 4.51, 'anara, wolvid familiar': 0.13, 'kitesail skirmisher': 0.01, 'ghost of ramirez depietro': 0.09, 'mythos of illuna': 0.22, 'dirge bat': 0.35, 'raugrin triome': 11.44, 'nahiri, heir of the ancients': 1.08, 'vulpikeet': 0.01, 'hallowed priest': 0.0, "nahiri's binding": 0.02, 'clearwater pathway': 6.58, 'turntimber symbiosis': 2.37, 'rielle, the everwise': 1.95, 'spikefield hazard': 0.19, 'narset of the ancient way': 1.27, "sakashima's protege": 0.28, 'illuna, apex of wishes': 0.91, 'territorial scythecat': 0.05, 'escape protocol': 0.03, 'ketria crystal': 0.09, 'song-mad treachery // song-mad ruins': 0.09, 'relic robber': 0.17, 'keeper of the accord': 3.51, 'armored skyhunter': 1.87, 'khalni ambush': 0.21, "szat's will": 0.55, 'boneyard lurker': 0.05, 'invert // invent': 0.08, 'rejuvenating springs': 7.31, 'pollywog symbiote': 0.18, 'spare supplies': 0.03, 'throne of makindi': 0.09, 'coralhelm chronicler': 0.08, 'wheel of misfortune': 2.24, 'driven // despair': 0.45, 'ashaya, soul of the wild': 7.01, 'felidar retreat': 2.15, 'nullpriest of oblivion': 0.74, 'blisterspit gremlin': 0.01, 'ardent electromancer': 0.01, 'nimana skydancer': 0.01, 'barrier breach': 0.13, 'kwain, itinerant meddler': 0.24, 'archipelagore': 0.08, 'snapdax, apex of the hunt': 0.38, 'mythos of nethroi': 0.44, 'insult // injury': 0.65, 'blood beckoning': 0.02, 'tin street cadet': 0.0, 'forbidden friendship': 0.02, 'beyeen veil // beyeen coast': 0.04, 'general kudro of drannith': 1.34, 'nethroi, apex of death': 1.94, 'trench behemoth': 0.18, 'crystalline giant': 0.6, 'footfall crater': 0.24, 'akiri, fearless voyager': 0.24, 'gyruda, doom of depths': 0.57, 'rakshasa debaser': 0.27, 'skyclave cleric': 0.06, 'belbe, corrupted observer': 0.25, 'fire // ice': 0.21, 'genesis ultimatum': 1.07, 'guildless commons': 0.45, 'kor celebrant': 0.04, 'cut // ribbons': 0.37, 'startling development': 0.03, 'tuktuk rubblefort': 0.06, 'krark, the thumbless': 0.95, 'captain vargus wrath': 0.06, "demon's disciple": 0.26, 'aesi, tyrant of gyre strait': 5.1, 'obeka, brute chronologist': 0.19, 'mnemonic deluge': 2.0, 'malakir blood-priest': 0.02, 'status // statue': 0.14, 'legion angel': 0.49, 'valiant rescuer': 0.08, 'stumpsquall hydra': 0.12, 'gnarlid colony': 0.03, 'ondu inversion // ondu skyruins': 0.5, 'rebbec, architect of ascension': 0.09, 'concerted defense': 0.04, 'archon of coronation': 0.84, 'wyleth, soul of steel': 1.91, 'jared carthalion, true heir': 0.07, "survivors' bond": 0.01, 'soul shatter': 1.34, 'grotag bug-catcher': 0.01, 'jeweled lotus': 83.22, 'bastion of remembrance': 2.84, 'blitz of the thunder-raptor': 0.02, "agadeem's awakening // agadeem, the undercrypt": 14.43, 'spring // mind': 0.1, 'flame spill': 0.04, 'tangled florahedron // tangled vale': 0.4, 'titanoth rex': 0.17, 'cavern whisperer': 0.01, 'opposition agent': 8.98, 'riverglide pathway': 4.95, 'magmatic channeler': 0.44, 'emergent ultimatum': 0.5, 'essence symbiote': 0.01, 'ardenn, intrepid archaeologist': 0.83, 'coercive recruiter': 0.46, 'omnath, locus of creation': 10.68, 'cragplate baloth': 0.1, 'scourge of the skyclaves': 2.93, 'verazol, the split current': 0.09, 'drannith magistrate': 7.97, 'archpriest of iona': 0.09, 'relic vial': 0.08, "commander's plate": 17.15, 'merfolk falconer': 0.01, 'kabira takedown': 0.31, 'ancient greenwarden': 10.62, 'silundi vision': 0.41, "lullmage's familiar": 0.01, 'averna, the chaos bloom': 0.2, 'resolute strike': 0.01, 'lurrus of the dream-den': 6.04, 'boon of the wish-giver': 0.07, 'zenith flare': 0.07, 'merchant raiders': 0.06, 'mysterious egg': 0.02, 'magus of the order': 0.18, 'wayward guide-beast': 0.08, 'kor blademaster': 0.11, 'malakir rebirth // malakir mire': 2.6, 'indatha triome': 7.48, 'insatiable hemophage': 0.05, 'needleverge pathway // pillarverge pathway': 4.09, 'discovery // dispersal': 0.22, 'keskit, the flesh sculptor': 0.03, 'fearless fledgling': 0.03, 'cleansing wildfire': 0.24, 'sea gate restoration // sea gate, reborn': 10.77, 'ominous seas': 0.49, 'inspiring commander': 0.0, 'clearwater pathway // murkwater pathway': 6.15, 'kazandu mammoth // kazandu valley': 0.24, 'chittering harvester': 0.08, 'branchloft pathway // boulderloft pathway': 3.05, 'lathiel, the bounteous dawn': 0.35, 'ghen, arcanum weaver': 0.06, 'skyclave relic': 2.25, 'zareth san, the trickster': 0.18, 'humble naturalist': 0.01, 'scale the heights': 0.08, 'spitfire lagac': 0.02, 'undergrowth stadium': 5.91, 'toggo, goblin weaponsmith': 0.16, 'deliberate': 0.05, 'soaring thought-thief': 0.1, 'training center': 5.8, 'ruin crab': 0.73, 'makindi stampede': 0.1, 'nevinyrral, urborg tyrant': 0.17, 'malcolm, keen-eyed navigator': 0.14, 'ruinous ultimatum': 4.63, 'jwari disruption // jwari ruins': 0.23, 'court of bounty': 1.22, 'meteoric mace': 0.01, 'kazandu nectarpot': 0.03, "lullmage's domination": 0.04, 'sea gate stormcaller': 0.55, 'boot nipper': 0.02, 'integrity // intervention': 0.04, 'back for more': 0.09, 'boom // bust': 0.58, 'natural reclamation': 0.01, 'brushfire elemental': 0.08, 'sprite dragon': 0.98, 'of one mind': 0.06, 'mind drain': 0.03, 'coastline marauders': 0.2, 'fireblade charger': 0.23, 'slash the ranks': 0.8, 'myriad construct': 0.1, 'cragcrown pathway': 3.43, 'auspicious starrix': 0.09, 'jace, mirror mage': 0.61, 'dauntless survivor': 0.01, 'neutralize': 0.1, 'kediss, emberclaw familiar': 0.41, 'anowon, the ruin thief': 2.5, 'spikefield hazard // spikefield cave': 0.14, 'thundering rebuke': 0.05, 'thwart the enemy': 0.01, 'chilling trap': 0.02, 'fight as one': 0.11, 'needleverge pathway': 3.27, 'thieving skydiver': 0.97, 'almighty brushwagg': 0.02, 'court of ambition': 1.72, 'thwart the grave': 0.01, 'kogla, the titan ape': 1.22, 'roost of drakes': 0.03, 'jegantha, the wellspring': 1.01, 'sanctuary lockdown': 0.01, 'prowling felidar': 0.02, 'springjaw trap': 0.01, 'luminarch aspirant': 4.61, 'sphinx of the second sun': 6.04, 'soulhunter rakshasa': 0.0, 'abomination of llanowar': 0.09, 'murasa sproutling': 0.03, 'necropanther': 0.08, 'whispersteel dagger': 0.2, 'shadow stinger': 0.02, 'confounding conundrum': 0.21, 'murasa rootgrazer': 0.06, 'tangled florahedron': 0.59, 'ketria triome': 11.08, 'voracious greatshark': 0.26, 'consign // oblivion': 0.25, 'cragcrown pathway // timbercrown pathway': 2.96, 'skyclave cleric // skyclave basilica': 0.1, 'glasspool mimic': 3.3, 'valakut awakening': 6.41, 'miara, thorn of the glade': 0.09, 'inscription of ruin': 0.14, 'flamekin herald': 0.16, 'brinelin, the moon kraken': 0.2, 'shatterskull charger': 0.08, 'heartless act': 0.37, 'serrated scorpion': 0.05, "cleric of life's bond": 0.2, 'claim // fame': 0.25, 'gemrazer': 0.45, 'sea gate restoration': 12.62, 'aurora phoenix': 0.18, 'leyline tyrant': 2.52, 'eerie ultimatum': 2.51, 'turntimber symbiosis // turntimber, serpentine wood': 2.24, 'thalisse, reverent medium': 0.11, 'sejiri shelter // sejiri glacier': 0.43, 'kazandu mammoth': 0.33, 'apex devastator': 8.77, 'drannith healer': 0.04, 'war room': 5.53, 'yorion, sky nomad': 2.02, 'kangee, sky warden': 0.05, 'shredded sails': 0.04, 'skull prophet': 0.47, 'ingenuity engine': 0.03, 'fiend artisan': 5.91, 'flourishing fox': 0.22, 'pelakka predation // pelakka caverns': 0.14, 'canyon jerboa': 0.01, 'cubwarden': 0.43, "nahiri's lithoforming": 0.13, 'amphin mutineer': 1.17, 'tazeem roilmage': 0.01, 'windrider wizard': 0.04, 'hullbreacher': 2.1, 'scion of the swarm': 0.01, 'base camp': 0.02, 'sengir, the dark baron': 0.23, 'kargan intimidator': 0.07, 'hide // seek': 3.56, 'sleeper dart': 0.02, 'riverglide pathway // lavaglide pathway': 5.29, 'azure fleet admiral': 0.02, 'hagra mauling': 1.23, 'anticognition': 0.02, 'kamahl, heart of krosa': 2.99, 'raugrin crystal': 0.06, 'shatterskull smashing': 8.64, 'blood curdle': 0.01, 'skyclave plunder': 0.01, 'angel of destiny': 3.77, 'court of grace': 4.0, 'will of the all-hunter': 0.02, 'charge of the forever-beast': 0.02, 'feed the swarm': 0.26, 'expansion // explosion': 2.6, 'kinnan, bonder prodigy': 5.23, 'branchloft pathway': 3.82, "vivien, monsters' advocate": 5.15, 'sea-dasher octopus': 1.18, 'drana, the last bloodchief': 2.66, 'grakmaw, skyclave ravager': 0.14, 'hans eriksson': 0.08, 'whirlwind of thought': 0.81, 'rootweaver druid': 0.14, 'tajuru blightblade': 0.1, 'drannith stinger': 0.11, "emeria's call // emeria, shattered skyclave": 1.89, 'hamza, guardian of arashin': 0.23, 'kodama of the east tree': 4.29, 'maddening cacophony': 2.5, 'cunning nightbonder': 0.14, 'skyclave sentinel': 0.01, 'kabira takedown // kabira plateau': 0.24, 'dawnglade regent': 0.39, 'fire prophecy': 0.11, 'mystic subdual': 0.05, 'glowstone recluse': 0.02, 'fissure wizard': 0.01, 'luminous broodmoth': 7.87, 'hunted nightmare': 0.12, 'rograkh, son of rohgahh': 0.28, 'maul of the skyclaves': 1.16, 'oran-rief ooze': 0.26, 'jwari disruption': 0.57, 'primal empathy': 0.11, 'vault of champions': 5.72, 'umori, the collector': 0.17, 'ondu inversion': 0.89, 'attended healer': 0.04, 'skyclave apparition': 5.63, 'nighthawk scavenger': 1.33, 'cinderclasm': 0.11, 'wingspan mentor': 0.02, 'song-mad treachery': 0.16, 'skemfar elderhall': 0.03, 'tergrid, god of fright': 3.55, "tergrid's shadow": 0.07, 'frost bite': 0.04, "esika's chariot": 2.66, 'egon, god of death': 0.23, 'unbreakable bond': 0.02, 'doomskar': 1.96, 'righteous valkyrie': 4.04, 'taunting arbormage': 0.01, 'stoic farmer': 0.23, 'niko aris': 0.54, 'in search of greatness': 0.47, 'charix, the raging isle': 0.22, 'esika, god of the tree': 8.25, 'splendor mare': 0.07, 'might of murasa': 0.01, 'jwari ruins': 0.57, "alrund's epiphany": 8.43, 'elvish warmaster': 2.04, 'scavenged blade': 0.01, 'savai thundermane': 0.01, 'ice tunnel': 0.82, 'elvish doomsayer': 0.01, 'maskwood nexus': 4.05, 'spectral deluge': 0.41, 'path to the world tree': 0.03, 'blightstep pathway': 5.65, 'shatterskull, the hammer pass': 8.64, 'woodland chasm': 0.67, 'marton stromgald': 7.35, 'karfell harbinger': 0.03, 'alpine meadow': 0.25, 'jorn, god of winter': 0.23, 'basalt ravager': 0.04, 'repudiate // replicate': 0.51, 'staunch throneguard': 0.01, 'the world tree': 2.48, "king narfi's betrayal": 0.23, 'mystic reflection': 0.97, 'daryl, hunter of walkers': 4.94, 'varragoth, bloodsky sire': 2.02, 'kolvori, god of kinship': 0.18, 'masked vandal': 0.2, 'saw it coming': 0.86, 'behold the multiverse': 0.14, 'khalni territory': 0.21, 'koll, the forgemaster': 0.09, "tibalt's trickery": 1.93, 'valki, god of lies // tibalt, cosmic impostor': 14.98, 'allied assault': 0.01, 'firja, judge of valor': 0.09, 'tyrite sanctum': 0.76, 'glenn, the voice of calm': 8.48, 'forging the tyrite sword': 0.09, 'squad commander': 0.1, "nymris, oona's trickster": 0.14, 'hagi mob': 0.01, 'frostveil ambush': 0.01, 'koma, cosmos serpent': 9.6, 'depart the realm': 0.06, 'negan, the cold-blooded': 12.25, 'harald, king of skemfar': 0.03, 'showdown of the skalds': 0.68, 'tevesh szat, doom of fools': 7.92, 'sculptor of winter': 0.02, 'bala ged sanctuary': 3.64, 'rally the ranks': 0.39, 'unpredictable cyclone': 0.11, 'grotag night-runner': 0.02, 'lucille': 11.23, 'indatha crystal': 0.07, 'sea gate colossus': 0.01, 'cyclone summoner': 0.18, 'gnottvold slumbermound': 0.02, 'skemfar avenger': 0.19, 'glorious protector': 0.25, 'arni brokenbrow': 0.1, 'eradicator valkyrie': 2.03, 'hero of bretagard': 0.19, 'cosima, god of the voyage': 0.28, 'avalanche caller': 0.03, 'axgard cavalry': 0.01, 'canopy tactician': 0.44, 'berg strider': 0.01, 'quakebringer': 1.21, 'vault robber': 0.01, 'rags // riches': 0.24, 'numa, joraga chieftain': 0.1, 'kaheera, the orphanguard': 1.12, 'clarion spirit': 0.32, 'weathered runestone': 0.1, 'vorinclex, monstrous raider': 24.76, 'emeria captain': 0.01, 'starnheim aspirant': 2.02, 'kaya the inexorable': 2.26, 'mythos of brokkos': 0.28, 'the three seasons': 0.01, 'dandan': 0.08, 'draugr necromancer': 0.23, 'valkyrie harbinger': 2.84, 'priest of the haunted edge': 0.01, 'squash': 0.01, 'realmwalker': 3.88, 'darkbore pathway': 5.06, 'zephyr gull': 0.0, 'kardur, doomscourge': 0.21, 'glimpse the cosmos': 0.06, 'orvar, the all-form': 1.72, 'burning-rune demon': 2.1, 'ranar the ever-watchful': 0.5, 'bind the monster': 0.02, 'rise of the dread marn': 1.15, 'skemfar shadowsage': 0.07, "the raven's warning": 0.1, 'journey to oblivion': 0.02, 'boreal outrider': 0.01, 'impulsive pilferer': 0.18, 'shell shield': 0.02, 'sarulf, realm eater': 0.26, 'warhorn blast': 0.01, 'arni slays the troll': 0.08, 'shepherd of heroes': 0.01, 'deadly alliance': 0.01, 'keruga, the macrosage': 0.25, 'crown of skemfar': 0.17, 'khalni ambush // khalni territory': 0.23, 'confront the assault': 0.0, 'elderfang ritualist': 0.04, "ravager's mace": 0.01, 'kitesail cleric': 0.01, 'elderfang venom': 0.24, 'elderfang disciple': 0.07, 'beck // call': 0.22, "firja's retribution": 0.23, 'barkchannel pathway': 4.95, 'dragonkin berserker': 0.16, 'spoils of adventure': 0.03, 'reflections of littjara': 1.3, 'svella, ice shaper': 0.04, "serpent's soul-jar": 0.13, 'niko defies destiny': 0.01, 'ethereal valkyrie': 0.26, 'goldvein pick': 0.09, 'blightstep pathway // searstep pathway': 5.08, 'blizzard brawl': 0.22, 'haunting voyage': 3.31, 'rimewood falls': 0.46, 'old-growth troll': 0.46, 'glimmerbell': 0.01, "jeska's will": 19.26, 'imposing vantasaur': 0.01, 'search for glory': 0.35, 'volatile fjord': 0.26, 'synchronized spellcraft': 0.01, 'pyre of heroes': 0.79, 'gates of istfell': 0.04, 'jaspera sentinel': 0.1, 'blessing of frost': 0.09, 'stonework packbeast': 0.01, 'ravenform': 0.23, 'cunning geysermage': 0.01, 'icehide troll': 0.01, 'toski, bearer of secrets': 7.69, 'binding the old gods': 0.41, 'stormwild capridor': 0.04, 'frost augur': 0.03, 'give // take': 0.12, "reidane, god of the worthy // valkmira, protector's shield": 0.72, 'sage of the beyond': 0.19, 'necrotic hex': 0.77, 'birgi, god of storytelling': 4.05, 'valki, god of lies': 8.82, 'veteran adventurer': 0.01, 'wolverine riders': 1.49, 'seize the spoils': 0.15, 'cleaving reaper': 0.12, 'nimble trapfinder': 0.09, 'rampage of the valkyries': 0.73, 'tormod, the desecrator': 0.48, 'crippling fear': 0.58, 'moritte of the frost': 0.1, 'juri, master of the revue': 0.24, 'spectral steel': 0.02, 'toralf, god of fury': 1.64, 'blazing sunsteel': 0.12, 'sulfurous mire': 0.28, 'grim draugr': 0.01, 'lathril, blade of the elves': 1.16, 'slurrk, all-ingesting': 0.06, 'demon bolt': 0.05, 'michonne, ruthless survivor': 4.38, 'immersturm predator': 0.86, 'practiced tactics': 0.01, "raiders' karve": 0.02, 'vengeful reaper': 0.09, 'graven lore': 0.14, 'highland forest': 0.31, 'snakeskin veil': 0.1, 'halvar, god of battle': 6.65, 'hengegate pathway // mistgate pathway': 4.72, 'blood on the snow': 0.55, 'pride of the perfect': 0.09, "tormentor's helm": 0.01, 'geode rager': 1.25, 'elven ambush': 0.28, 'ruthless winnower': 0.18, 'surtland elementalist': 0.1, 'strength of solidarity': 0.01, 'reidane, god of the worthy': 0.98, 'hengegate pathway': 5.43, 'goldspan dragon': 33.44, 'calamity bearer': 0.15, 'joraga visionary': 0.01, 'bloodline pretender': 0.32, 'halana, kessig ranger': 0.11, "fire giant's fury": 0.09, 'iron verdict': 0.01, 'bounty of skemfar': 0.23, 'starnheim unleashed': 2.16, 'vega, the watcher': 0.08, 'springmantle cleric': 0.01, 'roots of wisdom': 0.01, 'aegar, the freezing flame': 0.03, 'poison the cup': 0.16, 'birgi, god of storytelling // harnfel, horn of bounty': 5.99, 'rick, steadfast leader': 24.89, 'maja, bretagard protector': 0.16, 'ascendant spirit': 0.26, 'return upon the tide': 0.03, 'expedition healer': 0.01, 'icebreaker kraken': 0.17, 'eyeblight cullers': 0.06, 'faceless haven': 3.92, 'spirit of the aldergard': 0.04, 'magda, brazen outlaw': 1.59, 'tajuru paragon': 0.1, 'murkwater pathway': 6.58, 'tales of the ancestors': 0.1, 'fynn, the fangbearer': 0.24, 'waking the trolls': 0.13, 'prickly marmoset': 0.01, 'narfi, betrayer king': 0.09, 'cosmos elixir': 0.79, 'rough // tumble': 0.04, 'void beckoner': 0.05, 'valor of the worthy': 0.01, 'cosmic intervention': 1.62, 'thundering sparkmage': 0.01, 'youthful valkyrie': 2.14, 'pact of the serpent': 5.51, 'bubble snare': 0.02, 'cosmos charger': 0.09, 'tazri, beacon of unity': 0.29, 'replicating ring': 0.23, 'timbercrown pathway': 3.43, 'life // death': 4.16, 'invasion of the giants': 0.07, 'livio, oathsworn sentinel': 0.11, 'teeterpeak ambusher': 0.01, 'icebind pillar': 0.01, 'port of karfell': 0.1, 'failure // comply': 0.2, 'darkbore pathway // slitherbore pathway': 9.42, 'crush the weak': 0.09, 'barkchannel pathway // tidechannel pathway': 5.17, 'jeska, thrice reborn': 3.21, 'shepherd of the cosmos': 0.05, 'colfenor, the last yew': 0.19, 'triumphant reckoning': 0.72, 'feast of succession': 0.02, 'trove warden': 0.37, 'axgard armory': 0.19, 'glacial floodplain': 0.21, "giant's grasp": 0.08, 'hailstorm valkyrie': 0.02, 'pyroceratops': 0.01, 'dwarven reinforcements': 0.01, 'snowfield sinkhole': 0.25, 'battlefield raptor': 0.08, 'reckless crew': 0.1, 'starnheim courser': 0.12, 'breakneck berserker': 0.01, 'tazeem raptor': 0.01, 'battle mammoth': 0.81, "sarulf's packmate": 0.07, 'shackles of treachery': 0.01, 'zof consumption': 0.09, 'resplendent marshal': 0.45, 'angelic reward': 0.0, "giant's amulet": 0.08, 'blitz leech': 0.01, 'soulfire eruption': 0.37, 'sneaking guide': 0.01, 'dwarven hammer': 0.02, 'amareth, the lustrous': 0.24, 'glittering frost': 0.02, 'raking claws': 0.01, 'stalwart valkyrie': 0.02, 'littjara mirrorlake': 0.23, 'hellkite courser': 3.4, "offspring's revenge": 0.1, 'exuberant wolfbear': 0.02, 'sigrid, god-favored': 0.13, 'funeral longboat': 0.01, 'shimmerdrift vale': 0.1, 'codespell cleric': 0.01, "the trickster-god's heist": 0.07, 'rooting moloch': 0.01, 'frenzied saddlebrute': 0.11, 'fearless liberator': 0.02, 'surtland flinger': 0.21, 'doomskar titan': 0.02, 'dual strike': 0.12, 'inordinate rage': 0.02, 'immersturm raider': 0.01, 'dream devourer': 0.9, 'bedeck // bedazzle': 0.11, 'reason // believe': 0.2, 'body of knowledge': 0.45, 'surtland frostpyre': 0.05, 'battle of frost and fire': 0.2, 'zilortha, strength incarnate': 6.82, 'usher of the fallen': 0.19, 'dazzling sphinx': 0.2, 'square up': 0.01, 'patient turtle': 1.53, 'soldier': 0.15, 'angel // demon': 0.21, "seek bolas's counsel": 1.5, 'flycatcher giraffid': 0.01, 'ulvenwald captive // ulvenwald abomination': 0.16, 'bushmeat poacher': 0.01, 'koth of the hammer emblem': 1.92, 'jasconian isle': 1.1, 'aggressive crag': 2.61, 'devil': 0.16, 'zephyr boots': 0.1, 'karok wrangler': 0.01, 'frostpeak yeti': 0.02, 'guardian gladewalker': 0.01, 'heaven // earth': 0.17, 'checkpoint officer': 0.01, 'rune of sustenance': 0.1, 'breaking // entering': 0.37, 'containment breach': 0.03, "titans' nest": 0.13, 'specter of the fens': 0.01, 'nightsquad commando': 0.01, 'spontaneous flight': 0.01, 'westvale abbey // ormendahl, profane prince': 6.7, 'faerie guidemother // gift of the fae': 0.07, 'snow day': 0.01, "witch's clinic": 2.47, 'ecological appreciation': 0.89, 'kasmina, enigma sage': 1.89, 'heated debate': 0.01, 'flesh // blood': 0.17, 'memory bank': 0.88, 'devastating mastery': 0.24, 'goblin // soldier': 0.64, 'transcantation': 0.7, 'assure // assemble': 0.14, 'cascade seer': 0.02, 'extricator of sin // extricator of flesh': 0.07, 'tuinvale treefolk // oaken boon': 0.01, 'fractal harness': 0.57, 'draugr thought-thief': 0.02, 'carnivore': 0.21, 'alrund, god of the cosmos // hakka, whispering raven': 0.82, 'alrund, god of the cosmos': 0.46, 'incarnation technique': 0.74, 'struggle // survive': 0.05, 'extus, oriq overlord // awaken the blood avatar': 2.24, 'extus, oriq overlord': 1.45, 'arrogant poet': 0.01, 'treasure map // treasure cove': 6.82, 'muse vortex': 0.13, 'mythos of vadrok': 0.09, 'hall of oracles': 0.37, 'curiosity crafter': 1.98, 'stoneforged blade': 2.72, 'harpy': 0.21, 'octopus': 0.19, 'ulrich of the krallenhorde // ulrich, uncontested alpha': 1.4, 'grizzled outrider': 0.01, 'essence pulse': 0.19, 'prismari apprentice': 0.01, 'truth or dare': 1.14, 'eureka moment': 0.05, 'red herring': 1.04, 'eldrazi scion': 0.42, 'lorehold excavation': 0.02, 'stack of paperwork': 1.89, 'weaponized scrap': 1.89, 'team pennant': 0.08, 'knight': 0.16, 'lorehold command': 0.22, 'murderous rider // swift end': 1.42, 'foulmire knight // profane insight': 0.1, 'biting remark': 1.49, 'blood age general': 0.02, 'spider': 0.15, 'stinging study': 2.15, 'smitten swordmaster // curry favor': 0.01, 'frenzied raider': 0.01, 'kazandu stomper': 0.02, 'lambholt elder // silverpelt werewolf': 0.14, 'elemental': 0.13, 'vampire': 0.29, 'graveyard dig': 1.04, 'nezumi graverobber // nighteyes the desecrator': 0.53, 'neglected heirloom // ashmouth blade': 0.23, 'impatient iguana': 2.36, 'cinderheart giant': 0.01, 'leonin lightscribe': 0.26, 'angel of the ruins': 2.49, 'tyvar kell': 3.0, 'relic golem': 0.07, 'lizard': 0.12, 'lutri, the spellchaser': 0.2, 'legion': 0.04, 'culling ritual': 2.76, 'demonic gifts': 0.01, 'replication technique': 0.27, 'frost trickster': 0.01, 'symmetry sage': 0.01, 'excavated wall': 0.01, 'quandrix campus': 0.09, 'elspeth, knight-errant emblem': 12.37, 'inspiring refrain': 0.25, 'leech fanatic': 0.01, 'exponential growth': 0.13, 'ravenous demon // archdemon of greed': 0.18, 'warrant // warden': 0.16, 'pick your poison': 0.64, "barry's land": 1.57, 'cleric': 0.19, 'clash of titans': 0.01, 'reject': 0.06, 'kiora, the crashing wave emblem': 4.92, 'professor of symbology': 0.05, 'wolf': 2.22, 'highborn vampire': 0.01, 'wurm': 0.23, 'combat professor': 0.01, 'expedition skulker': 0.01, 'pest infestation': 2.7, "nissa's zendikon": 0.01, 'healing technique': 0.19, "mavinda, students' advocate": 0.85, 'reckless amplimancer': 0.02, 'conduit of storms // conduit of emrakul': 0.14, 'dwarf': 0.13, 'laboratory drudge': 0.1, 'make your mark': 0.01, 'chandra, torch of defiance emblem': 0.47, "koma's faithful": 0.01, 'hypnotic sprite // mesmeric glare': 0.12, 'yedora, grave gardener': 0.96, 'shatterskull minotaur': 0.01, 'tajuru snarecaster': 0.01, 'ashaya, the awoken world': 0.4, 'screeching bat // stalking vampire': 0.13, 'mesa lynx': 0.01, 'dina, soul steeper': 0.14, 'shadrix silverquill': 3.57, 'scholarship sponsor': 0.22, 'kongming, "sleeping dragon"': 0.23, "mage hunters' onslaught": 0.01, 'frontier explorer': 1.61, "you're in command": 1.69, 'merfolk wizard': 0.3, 'beanstalk giant // fertile footsteps': 0.11, "kaya's onslaught": 0.03, 'faithful squire // kaiso, memory of loyalty': 0.1, "valkyrie's sword": 0.02, 'dark ascension checklist': 0.1, 'autumnal gloom // ancient of the equinox': 0.1, 'rimrock knight // boulder rush': 0.04, 'savai sabertooth': 0.01, 'hit // run': 0.14, 'patagia tiger': 0.01, 'sedgemoor witch': 2.75, 'oversimplify': 0.49, 'divine gambit': 0.01, 'sheep': 1.29, 'sizzling barrage': 0.01, 'promise of tomorrow': 0.16, 'runeforge champion': 0.1, 'crackle with power': 3.29, 'defend the campus': 0.01, 'retriever phoenix': 0.09, 'instigator gang // wildblood pack': 0.56, 'daybreak ranger // nightfall predator': 0.82, 'tangleclaw werewolf // fibrous entangler': 0.14, 'djinn monk': 0.07, 'knight ally': 0.15, 'quintorius, field historian': 0.08, 'rin and seri, inseparable': 9.89, 'ajani steadfast emblem': 1.94, 'mosscoat goriak': 0.01, 'elemental bird': 0.1, 'chalice of life // chalice of death': 0.57, 'daemogoth woe-eater': 0.05, "chosen of markov // markov's servant": 0.09, 'eldrazi horror': 0.11, 'field trip': 0.01, 'jarl of the forsaken': 0.01, 'soothsayer adept': 0.01, 'sanctuary smasher': 0.02, 'hinterland logger // timber shredder': 0.15, 'gold mine': 1.57, 'karox bladewing': 1.07, 'sparring regimen': 0.11, 'farm // market': 0.01, 'jushi apprentice // tomoya the revealer': 0.69, 'silverquill campus': 0.08, 'trial and error': 1.71, 'wurm // saproling': 1.95, 'lorehold pledgemage': 0.01, 'karfell kennel-master': 0.01, 'decisive denial': 0.1, 'raven wings': 0.01, 'hanweir militia captain // westvale cult leader': 1.1, 'order of midnight // alter fate': 0.08, 'abian, luvion usurper': 3.0, 'protect // serve': 0.05, 'igneous inspiration': 0.03, 'arachnoform': 0.01, "ral's vanguard": 2.13, 'profane transfusion': 0.66, 'strixhaven stadium': 0.96, "elspeth, sun's champion emblem": 3.81, 'flower // flourish': 0.02, 'environmental sciences': 0.14, 'paradox zone': 0.59, 'skyclave squid': 0.02, 'human': 0.24, 'tempted by the oriq': 0.12, 'mu yanling, sky dancer emblem': 0.65, 'maelstrom muse': 0.01, 'shrill howler // howling chorus': 0.11, 'blossoming bogbeast': 0.75, 'blade historian': 0.85, 'fain, the broker': 0.58, 'cyclopean titan': 1.12, 'well-read': 0.03, 'arctic treeline': 0.36, 'vineglimmer snarl': 1.31, 'wake the past': 0.19, 'makindi stampede // makindi mesas': 0.1, 'blackbloom rogue // blackbloom bog': 0.11, 'beast': 11.58, 'abundant harvest': 0.17, 'secret rendezvous': 0.13, 'master skald': 0.01, 'avatar': 0.77, 'immersturm skullcairn': 0.04, 'nissa, vastwood seer // nissa, sage animist': 11.36, 'ravenous lindwurm': 0.01, 'experience': 0.49, 'treefolk warrior': 0.22, 'treefolk shaman': 0.3, 'inferno project': 0.13, 'tuskeri firewalker': 0.02, 'ardent dustspeaker': 0.01, 'wizened arbiter': 1.76, 'smoldering werewolf // erupting dreadwolf': 0.17, 'rootha, mercurial artist': 0.04, 'gladewalker ritualist': 0.04, 'elderleaf mentor': 0.01, 'vortex runner': 0.01, 'fuming effigy': 0.01, 'star pupil': 0.01, 'lorehold apprentice': 0.01, 'teferi, temporal archmage emblem': 2.82, '"rumors of my death . . ."': 0.11, 'huntmaster liger': 0.05, "nadier's nightblade": 2.5, 'liliana, defiant necromancer emblem': 1.41, 'exquisite huntmaster': 0.01, 'spirit': 0.08, 'thornmantle striker': 0.04, 'prismari campus': 0.07, 'tezzeret the schemer emblem': 0.09, 'recycla-bird': 0.78, 'horror': 0.05, "semester's end": 0.48, 'xyru specter': 1.8, 'reflective golem': 0.01, 'thrull': 1.77, 'frillscare mentor': 0.02, 'craven hulk': 0.01, 'assassin': 1.26, 'cunning bandit // azamuki, treachery incarnate': 0.16, 'armed and armored': 0.08, 'biblioplex assistant': 0.01, 'wizard': 0.1, 'ezzaroot channeler': 0.24, 'lore drakkis': 0.1, 'appeal // authority': 0.11, 'pirate': 0.29, 'witty demon': 1.3, 'academic probation': 0.08, 'unicycle': 0.74, 'unwilling ingredient': 0.01, 'citizen': 0.13, 'turn // burn': 0.06, 'honey mammoth': 0.03, 'spiteful squad': 0.01, 'enthusiastic study': 0.01, 'angelheart protector': 0.01, 'daysquad marshal': 0.01, 'archangel avacyn // avacyn, the purifier': 5.72, 'pain // suffering': 0.16, 'bloodline keeper // lord of lineage': 16.63, 'velomachus lorehold': 3.22, 'littjara glade-warden': 0.01, 'voldaren pariah // abolisher of bloodlines': 1.63, 'elven bow': 0.01, 'ulvenwald mystics // ulvenwald primordials': 0.19, 'wall': 0.09, 'mirrored lotus': 6.25, 'absorb identity': 0.09, 'canopy baloth': 0.02, 'promising duskmage': 0.01, 'ready // willing': 0.11, 'selfless glyphweaver // deadly vanity': 0.26, 'selfless glyphweaver': 0.27, 'do-over': 1.49, 'five kids in a trenchcoat': 1.02, 'lorehold campus': 0.02, 'nezumi shortfang // stabwhisker the odious': 3.85, 'plane-merge elf': 0.63, 'deathknell berserker': 0.01, 'ageless guardian': 0.01, 'wax // wane': 0.22, 'narset transcendent emblem': 2.72, 'akki lavarunner // tok-tok, volcano born': 0.45, 'ixalan checklist': 0.12, "dragon's approach": 2.03, 'prismari pledgemage': 0.01, 'stangg twin': 0.1, 'start // fire': 25.08, 'ooze': 0.3, 'kolvori, god of kinship // the ringhart crest': 0.21, 'inspirational antelope': 0.86, 'celestine cave witch': 1.21, "garenbrig carver // shield's might": 0.01, 'rift': 0.98, 'merfolk': 0.11, 'squidnapper': 0.85, 'bombardment': 1.28, 'ferocious tigorilla': 0.01, 'radiant, serra archangel': 0.04, 'start // finish': 0.1, 'arcane subtraction': 0.01, 'warrior': 0.24, 'colossal plow': 0.04, 'soul of eternity': 0.15, 'cursed mirror': 3.06, 'lava serpent': 0.01, 'springmane cervin': 0.02, 'merfolk secretkeeper // venture deeper': 0.1, 'hampering snare': 0.01, 'keensight mentor': 0.03, 'momentum rumbler': 0.02, 'lands': 0.08, 'owlin shieldmage': 0.01, 'unicorns': 0.73, 'metagamer': 1.8, 'rousing refrain': 0.69, 'breakneck rider // neck breaker': 0.23, 'magic origins checklist': 0.16, "oblivion's hunger": 0.09, 'golgari death swarm': 1.79, 'weigh down': 0.01, 'bone rattler': 1.19, 'lantern of undersight': 1.28, 'audacious reshapers': 0.18, 'scorned villager // moonscarred werewolf': 0.21, 'afflicted deserter // werewolf ransacker': 0.26, 'tundra fumarole': 0.1, 'embereth shieldbreaker // battle display': 0.1, "ludevic's test subject // ludevic's abomination": 0.31, 'detention vortex': 0.01, 'shadewing laureate': 0.02, 'tamiyo, the moon sage emblem': 9.47, 'cat soldier': 1.09, 'hunt for specimens': 0.02, 'mortality spear': 0.14, 'basic conjuration': 0.11, "commander's insight": 0.36, 'fall of the impostor': 0.07, 'nicol bolas, the ravager // nicol bolas, the arisen': 27.53, 'everquill phoenix': 0.13, 'triplicate titan': 0.69, 'scaled destruction': 1.12, 'eldritch moon checklist': 0.09, 'insect': 0.35, 'khod, etlan shiis envoy': 0.95, 'alive // well': 0.11, 'whammy burn': 1.28, 'huntmaster of the fells // ravager of the fells': 7.84, 'expel': 0.01, 'exhilarating elocution': 0.02, 'golden guardian // gold-forge garrison': 1.5, 'returned pastcaller': 0.01, "jace, vryn's prodigy // jace, telepath unbound": 13.77, 'student of elements // tobita, master of winds': 0.1, 'slivdrazi monstrosity': 45.83, 'jace, unraveler of secrets emblem': 1.59, "kangee's lieutenant": 0.04, 'illustrious historian': 0.01, 'molten blast': 0.01, 'silverquill apprentice': 0.02, 'illusion // reality': 0.12, 'initiate of blood // goka the unjust': 0.13, 'rootless yew': 0.03, 'avacynian missionaries // lunarch inquisitors': 0.03, 'banding sliver': 5.99, 'rivals of ixalan checklist': 0.1, 'sudden spinnerets': 0.01, 'campus guide': 0.01, 'vanishing verse': 1.85, 'cats': 0.12, 'lightning rager': 0.47, 'guiding voice': 0.03, 'uninvited geist // unimpeded trespasser': 0.12, 'flunk': 0.04, 'pillardrop rescuer': 0.01, 'moldering karok': 0.01, 'smelt // herd // saw': 18.75, 'thieving otter': 0.02, 'bell borca, spectral sergeant': 0.12, "vance's blasting cannons // spitfire bastion": 0.34, 'marshland bloodcaster': 0.25, 'largepox': 1.68, 'cliffhaven sell-sword': 0.03, 'flamescroll celebrant // revel in silence': 0.21, 'flamescroll celebrant': 0.13, 'murasa brute': 0.02, 'go blank': 0.25, 'cogwork archivist': 0.01, 'louvaq, the aberrant': 1.05, 'big play': 0.02, 'silverquill command': 0.18, 'poison counter': 0.26, 'enchanted prairie': 1.48, 'cryptolith fragment // aurora of emrakul': 0.32, 'introduction to annihilation': 0.02, 'essence infusion': 0.01, 'krosan adaptation': 0.73, 'fearless pup': 0.01, 'sliv-mizzet, hivemind': 22.53, 'chronobot': 1.25, 'minion': 5.46, 'stand // deliver': 0.14, 'gunk slug': 1.31, 'rosethorn acolyte // seasonal ritual': 0.02, 'uvilda, dean of perfection // nassari, dean of expression': 0.18, 'uvilda, dean of perfection': 0.11, 'tuya bearclaw': 0.04, 'garruk the slayer': 3.14, 'oggyar battle-seer': 0.01, 'geier reach bandit // vildin-pack alpha': 0.6, 'cosima, god of the voyage // the omenkeel': 0.32, 'chandra, roaring flame emblem': 0.48, 'furycalm snarl': 1.38, 'wandering archaic // explore the vastlands': 5.9, 'wandering archaic': 5.81, 'octavia, living thesis': 0.44, 'mind carver': 0.03, 'eligeth, crossroads augur': 0.15, 'reduce to memory': 0.03, 'hofri ghostforge': 1.37, 'animate spell': 1.08, 'briarblade adept': 0.01, 'infuse with vitality': 0.03, 'codie, vociferous codex': 0.22, 'littjara kinseekers': 0.01, 'alert heedbonder': 0.02, 'coordinated charge': 0.02, 'zombie knight': 2.27, 'excavation mole': 0.01, 'witherbloom apprentice': 0.13, 'the bears of littjara': 0.15, 'wrath of sod': 2.11, 'archway commons': 0.02, 'daring sleuth // bearer of overwhelming truths': 0.09, 'kabira outrider': 0.01, 'falthis, shadowcat familiar': 0.1, 'eyetwitch': 0.3, 'teachings of the archaics': 0.19, 'deekah, fractal theorist': 0.4, 'minotaur': 0.22, 'arlinn kord // arlinn, embraced by the moon': 3.32, 'expanded anatomy': 0.01, 'umara wizard // umara skyfalls': 0.06, 'frostpyre arcanist': 0.01, 'drake': 0.36, 'dack fayden emblem': 1.49, 'vampire knight': 0.64, "kardur's vicious return": 0.04, 'witherbloom campus': 0.06, 'skyclave pick-axe': 0.02, 'hermit of the natterknolls // lone wolf of the natterknolls': 0.25, "elementalist's palette": 0.46, 'shepherd of the flock // usher to safety': 0.09, 'vazal, the compleat': 1.83, 'pang tong, "young phoenix"': 115.48, 'keleth, sunmane familiar': 0.04, 'valentin, dean of the vein // lisette, dean of the root': 0.88, 'valentin, dean of the vein': 0.87, 'perimeter sergeant': 0.02, 'cram session': 0.02, 'mayor of avabruck // howlpack alpha': 2.88, 'vildin-pack outcast // dronepack kindred': 0.08, 'wormhole serpent': 0.02, 'needlethorn drake': 0.01, 'pillardrop warden': 0.01, 'budoka pupil // ichiga, who topples oaks': 0.14, 'chandra, fire of kaladesh // chandra, roaring flame': 2.75, 'show of confidence': 0.08, 'adventure awaits': 0.02, 'biomathematician': 0.01, 'ghastly gloomhunter': 0.01, "rune-tail, kitsune ascendant // rune-tail's essence": 3.7, 'frostboil snarl': 2.14, 'spectacle mage': 0.02, 'storm the vault // vault of catlacan': 6.0, 'aberrant researcher // perfected form': 0.06, 'golden ratio': 0.01, 'farsight adept': 0.01, 'ral, izzet viceroy emblem': 0.14, 'spined karok': 0.02, 'waterfall aerialist': 0.01, 'quandrix cultivator': 0.09, 'burrog befuddler': 0.01, 'tanazir quandrix': 1.82, "city's blessing": 0.11, 'gilded assault cart': 0.05, 'reptilian reflection': 0.01, 'goma fada vanguard': 0.02, 'eager first-year': 0.01, 'everlasting lich': 2.63, "yawgmoth's testament": 2.65, 'cloistered youth // unholy fiend': 0.09, 'kindly stranger // demon-possessed witch': 0.07, 'faerie rogue': 3.34, 'song of creation': 0.26, 'great hall of starnheim': 0.13, 'curate': 0.01, 'tangletrap': 0.04, 'necroblossom snarl': 2.19, 'spellcasting': 0.05, 'mage duel': 0.01, 'thunderous orator': 0.04, 'vadrok, apex of thunder': 0.59, 'crushing disappointment': 0.02, 'zombie warrior': 3.23, 'teferi, hero of dominaria emblem': 8.57, 'tenured inkcaster': 0.03, 'rune of might': 0.02, 'necrotic fumes': 0.05, 'pestilent cauldron // restorative burst': 0.22, 'pestilent cauldron': 0.09, 'inga rune-eyes': 0.05, 'innocuous insect': 2.02, 'elusive tormentor // insidious mist': 0.24, 'liliana, the last hope emblem': 7.83, 'sphinx': 0.08, 'closing statement': 0.01, 'treefolk': 2.21, 'study break': 0.02, 'master of winds': 0.08, 'facet reader': 0.01, 'divide by zero': 0.32, 'goblin soldier': 0.18, 'ajani, adversary of tyrants emblem': 0.24, 'stonebound mentor': 0.01, 'rat': 1.1, 'witherbloom command': 0.53, 'zombie': 0.22, 'callow jushi // jaraku the interloper': 0.21, 'garruk relentless // garruk, the veil-cursed': 4.79, 'oriq loremage': 0.26, 'skull raid': 0.01, "gods' hall guardian": 0.01, 'journey to eternity // atzal, cave of eternity': 5.63, 'scurrid colony': 0.02, 'charge through': 0.02, "lovestruck beast // heart's desire": 0.26, 'destined // lead': 0.09, 'wolfbitten captive // krallenhorde killer': 0.55, 'biowaste blob': 0.29, 'adaptive shimmerer': 0.02, 'overgrown arch': 0.02, 'accursed witch // infectious curse': 0.21, 'triskelavite': 0.13, 'golem': 0.21, 'rise of extus': 0.01, 'resculpt': 0.22, 'rise // fall': 0.24, 'scorch rider': 0.02, 'bucket list': 0.55, 'hinterland hermit // hinterland scourge': 0.09, 'odds // ends': 0.65, 'battle for bretagard': 0.16, 'bushi tenderfoot // kenzo the hardhearted': 0.34, 'rune of flight': 0.02, 'jaya ballard emblem': 0.75, 'archmage emeritus': 1.78, 'infernal pet': 0.01, 'siege elemental': 1.54, 'enroll in the coalition': 0.62, "tergrid, god of fright // tergrid's lantern": 4.09, 'lone rider // it that rides as one': 0.38, 'bold plagiarist': 0.19, 'docent of perfection // final iteration': 3.49, 'fish // kraken': 3.23, 'fish': 3.15, 'civilized scholar // homicidal brute': 0.09, 'zombie horror': 0.1, 'dead // gone': 0.06, 'perplexing test': 4.52, 'the biblioplex': 0.22, "stonebinder's familiar": 0.1, 'raise the draugr': 0.01, 'nightshade harvester': 0.17, "draugr's helm": 0.01, 'sequence engine': 0.14, 'duskwatch recruiter // krallenhorde howler': 0.72, 'venser, the sojourner emblem': 6.35, 'dovin baan emblem': 0.16, 'growth charm': 1.06, "conqueror's galleon // conqueror's foothold": 0.47, 'snake': 2.65, 'sonorous howlbonder': 0.05, 'pigment storm': 0.01, 'quandrix pledgemage': 0.01, 'rowan kenrith emblem': 0.32, 'town gossipmonger // incited rabble': 0.07, 'torrent sculptor // flamethrower sonata': 0.13, 'torrent sculptor': 0.11, "maro's gone nuts": 2.02, 'author of shadows': 0.74, 'helica glider': 0.02, 'hanweir watchkeep // bane of hanweir': 0.19, 'zombie army': 0.07, 'sly instigator': 0.19, 'elite spellbinder': 2.97, 'ruin grinder': 0.2, 'kor soldier': 0.32, 'curse of the fire penguin // curse of the fire penguin creature': 1.74, 'pilfering hawk': 0.01, 'primal amulet // primal wellspring': 10.72, "drana's silencer": 0.01, 'surge to victory': 0.34, 'rushed rebirth': 0.26, 'radiant scrollwielder': 0.17, 'egon, god of death // throne of death': 0.24, 'kelpie guide': 0.07, 'b.f.m. (big furry monster)': 13.46, 'beledros witherbloom': 11.22, 'clever lumimancer': 0.15, 'taiga stadium': 2.22, 'turntimber ascetic': 0.01, 'augmenter pugilist // echoing equation': 0.29, 'augmenter pugilist': 0.19, 'practical research': 0.01, 'spell satchel': 0.03, 'revival experiment': 0.18, 'skeleton': 0.08, 'giant killer // chop down': 0.35, 'esika, god of the tree // the prismatic bridge': 7.97, 'quandrix apprentice': 0.03, 'fiery encore': 0.13, 'bronze guardian': 0.52, 'homunculus': 0.05, 'kiora, master of the depths emblem': 0.13, 'kinsbaile courier': 0.01, 'geometric nexus': 0.12, 'hall monitor': 0.02, "hadana's climb // winged temple of orazca": 3.65, 'lightning colt': 1.05, 'blood price': 0.01, 'noxious bayou': 3.14, 'silverflame squire // on alert': 0.03, 'elf knight': 0.02, 'rune of speed': 0.03, 'tezzeret, artifice master emblem': 0.34, 'etherium cell': 0.11, 'punchcard': 0.04, 'thraben sentry // thraben militia': 0.11, 'callous bloodmage': 0.28, 'soulmates': 3.77, 'toil // trouble': 0.09, 'accomplished alchemist': 0.3, 'reconstruct history': 0.16, 'mouth // feed': 0.25, 'magma opus': 1.13, 'dogged pursuit': 0.02, 'soul seizer // ghastly haunting': 0.08, 'visitor from planet q': 0.94, 'honor troll': 0.03, 'paired tactician': 0.01, 'inkling summoning': 0.01, 'ogre': 1.47, 'cleric of chill depths': 0.02, 'startled awake // persistent nightmare': 1.82, 'sunimret': 0.85, 'onward // victory': 0.09, 'human wizard': 0.71, 'aswan jaguar': 9.99, 'gor muldrak, amphinologist': 0.09, 'open the omenpaths': 0.01, 'sliver': 1.84, 'introduction to prophecy': 0.01, 'learned learner': 0.57, 'run ashore': 0.01, 'chandra, awakened inferno emblem': 0.65, 'thraben gargoyle // stonewing antagonizer': 0.09, 'dragonsguard elite': 0.15, 'interplanar brushwagg': 1.19, 'quandrix command': 0.41, 'majestic auricorn': 0.04, 'oakhame ranger // bring back': 0.08, 'serf': 0.55, 'weird // goblin': 0.13, 'weird': 0.12, 'aether helix': 0.02, 'goldmaw champion': 0.01, 'a good thing': 1.13, 'professor onyx': 10.61, 'kianne, dean of substance // imbraham, dean of theory': 0.2, 'kianne, dean of substance': 0.1, 'scorn effigy': 0.01, 'spirit warrior': 0.1, 'leyline invocation': 0.01, 'corrupted key': 1.2, 'stonerise spirit': 0.02, 'draconic intervention': 0.1, 'dreadwurm': 0.01, 'tend the pests': 0.28, 'bladegriff prototype': 0.17, 'armed // dangerous': 0.11, 'goblin rogue': 0.2, 'laelia, the blade reforged': 6.76, 'plargg, dean of chaos // augusta, dean of order': 0.24, 'plargg, dean of chaos': 0.18, 'beskir shieldmate': 0.01, 'storm-kiln artist': 1.62, 'lazier goblin': 2.37, 'realm-cloaked giant // cast off': 0.83, 'mascot exhibition': 1.56, 'professor of zoomancy': 0.01, 'bearded axe': 0.13, 'dargo, the shipwrecker': 0.05, 'labyrinth raptor': 0.13, '"ach! hans, run!"': 4.92, 'twinscroll shaman': 0.01, 'fortifying draught': 0.04, 'spelleater wolverine': 0.02, 'struggle for skemfar': 0.01, 'human soldier': 0.09, 'trial // error': 0.1, 'durable coilbug': 0.03, 'elemental shaman': 0.07, 'sage of ancient lore // werewolf of ancient hunger': 0.25, 'blood researcher': 0.01, 'spirit summoning': 0.01, 'innistrad checklist': 0.12, 'kaya, ghost haunter': 5.99, 'daemogoth titan': 0.26, 'profane procession // tomb of the dusk rose': 0.86, 'domri, chaos bringer emblem': 0.1, 'satyr': 0.31, 'catch // release': 0.16, 'daretti, scrap savant emblem': 1.1, 'energy reserve': 0.06, 'confront the past': 0.17, 'loopy lobster': 1.28, 'gideon, ally of zendikar emblem': 0.22, 'generated horizons': 2.07, 'dueling coach': 0.01, 'ob nixilis of the black oath emblem': 0.24, 'frenemy of the guildpact': 0.51, 'veinwitch coven': 1.41, 'grind // dust': 0.16, 'grizzled outcasts // krallenhorde wantons': 0.12, 'maned serval': 0.02, 'explosive welcome': 0.01, 'provoke the trolls': 0.01, 'nissa, who shakes the world emblem': 3.1, 'monologue tax': 4.47, 'halvar, god of battle // sword of the realms': 8.58, 'radiant performer': 0.12, 'frogkin kidnapper': 1.01, 'arlinn kord emblem': 0.89, 'garruk': 0.46, 'feed the serpent': 0.01, 'guul draz mucklord': 0.01, 'baleful mastery': 1.86, 'who // what // when // where // why': 0.16, 'mascot interception': 0.02, 'monstrous step': 0.02, 'bear': 0.24, 'wings of the cosmos': 0.01, 'huatli, radiant champion emblem': 0.1, 'cat dragon': 2.3, 'akoum warrior // akoum teeth': 0.03, 'akoum warrior': 0.04, 'beyeen veil': 0.09, 'shaile, dean of radiance // embrose, dean of shadow': 0.25, 'shaile, dean of radiance': 0.19, 'plumb the forbidden': 1.85, 'kessig forgemaster // flameheart werewolf': 0.22, "death's oasis": 0.17, 'garruk, caller of beasts emblem': 0.4, 'land mine': 0.16, 'tome shredder': 0.01, 'waste land': 1.82, 'pyroclastic hellion': 0.01, 'academic dispute': 0.01, 'kitsune mystic // autumn-tail, kitsune sage': 0.48, 'the prismatic piper': 0.03, 'blex, vexing pest // search for blex': 1.92, 'blex, vexing pest': 1.4, 'sorin, lord of innistrad emblem': 3.95, 'verdant mastery': 0.11, 'giant ox': 0.02, 'core set 2019 checklist': 0.08, 'multiple choice': 0.11, 'utility knife': 0.01, 'tivash, gloom summoner': 0.19, 'skin invasion // skin shedder': 0.1, 'evil boros charm': 0.94, 'spirits': 0.05, 'phase dolphin': 0.01, 'domri rade emblem': 0.46, 'rune of mortality': 0.06, 'spite // malice': 0.31, 'deadly brew': 0.13, 'keen duelist': 0.52, 'runed crown': 0.01, "sarah's wings": 0.92, 'rukh': 3.97, 'seasoned weaponsmith': 1.35, 'experiment five': 0.81, 'duskwielder': 0.01, 'strict proctor': 0.37, 'liliana, heretical healer // liliana, defiant necromancer': 18.58, 'goblin warrior': 0.27, 'carnival // carnage': 0.09, 'reckless waif // merciless predator': 0.23, "mentor's guidance": 0.02, 'flaxen intruder // welcome home': 0.08, 'crystacean': 0.01, 'frondland felidar': 0.07, 'germ': 0.12, 'gremlin': 0.12, 'tormented pariah // rampaging werewolf': 0.13, 'order // chaos': 0.12, 'withercrown': 0.01, "king harald's revenge": 0.01, 'ox': 0.12, 'gloom pangolin': 0.01, 'sarkhan, the dragonspeaker emblem': 0.14, 'excavation technique': 0.18, 'mammoth growth': 0.01, 'jorn, god of winter // kaldring, the rimestaff': 0.26, "battlemage's bracers": 1.06, 'expedition diviner': 0.01, 'trudge garden': 0.39, "arguel's blood fast // temple of aclazotz": 0.36, 'rionya, fire dancer': 0.4, 'puresteel angel': 12.8, 'loyal cathar // unhallowed cathar': 0.1, 'monk': 1.48, 'dream strix': 0.08, 'gnostro, voice of the crags': 0.07, 'devouring tendrils': 0.06, 'mists of littjara': 0.01, 'gatstaf shepherd // gatstaf howler': 0.18, 'hippo': 0.48, 'shadows over innistrad checklist 2': 0.12, 'fae of wishes // granted': 0.18, "azor's gateway // sanctum of the sun": 3.21, 'domesticated watercourse': 1.55, 'convicted killer // branded howler': 0.08, 'enchantmentize': 1.41, 'command the chaff': 1.55, 'doomskar oracle': 0.01, 'nissa, vital force emblem': 0.36, 'glacial grasp': 0.02, 'creative technique': 0.19, 'curious homunculus // voracious reader': 0.34, 'crime // punishment': 12.02, 'profit // loss': 0.1, 'centaur': 0.1, 'vraska, golgari queen emblem': 0.31, 'blight mound': 0.79, 'depose // deploy': 0.1, 'thrilling discovery': 0.26, 'planequake': 1.09, 'how to keep an izzet mage busy': 1.62, 'blood poet': 1.97, 'guardian archon': 0.12, 'brackish trudge': 0.01, 'bretagard stronghold': 0.06, 'expressive iteration': 5.9, 'brazen borrower // petty theft': 19.05, 'village ironsmith // ironfang': 0.13, 'illuminate history': 0.1, 'priority avenger': 1.14, 'mercurial transformation': 0.01, 'fascist art director': 0.12, 'imaginary friends': 0.7, 'dragon': 3.54, 'elf druid': 4.19, 'alharu, solemn ritualist': 0.02, 'lonesome unicorn // rider in need': 0.03, 'control win condition': 1.8, 'solitary hunter // one of the pack': 0.12, 'pentavite': 0.1, 'shineshadow snarl': 2.06, 'alena, kessig trapper': 0.06, 'bound in gold': 0.02, 'jadzi, oracle of arcavios // journey to the oracle': 1.49, 'jadzi, oracle of arcavios': 0.89, 'reduce // rubble': 0.05, 'fervent mastery': 0.14, 'smashing success': 0.01, 'night // day': 0.15, 'budoka gardener // dokai, weaver of life': 1.36, 'rip apart': 0.29, 'shadows over innistrad checklist 1': 0.08, 'tempting contract': 1.17, 'domesticated mammoth': 0.73, 'surgeon general commander': 0.66, 'gatstaf arsonists // gatstaf ravagers': 0.07, 'vastwood fortification // vastwood thicket': 0.11, 'fractal summoning': 0.01, 'bookwurm': 0.03, 'mistwalker': 0.02, 'humiliate': 0.02, 'zombie wizard': 1.25, 'kruin outlaw // terror of kruin pass': 0.97, 'harald unites the elves': 0.19, 'axgard braggart': 0.01, 'wrong turn': 0.16, 'lurking deadeye': 0.02, 'buried ogre': 1.61, 'kessig prowler // sinuous predator': 0.18, 'nimana skitter-sneak': 0.01, 'grizzled angler // grisly anglerfish': 0.05, 'seafloor stalker': 0.02, 'reaper of night // harvest fear': 0.05, 'expedition champion': 0.01, 'baneslayer aspirant': 1.62, 'culmination of studies': 0.1, 'umbral juke': 0.01, 'heir of falkenrath // heir to the night': 0.11, 'novice dissector': 0.02, 'bury in books': 0.01, 'living tempest': 0.01, 'avian oddity': 0.02, 'bonecrusher giant // stomp': 1.28, 'supply // demand': 0.36, 'renegade reaper': 0.09, 'ascent of the worthy': 0.02, 'tentative connection': 0.01, 'ruxa, patient professor': 0.19, 'test of talents': 0.99, "erayo, soratami ascendant // erayo's essence": 11.95, 'teach by example': 0.07, 'blade banish': 0.01, "bear with set's mechanic": 1.62, 'manifestation sage': 0.09, 'start from scratch': 0.01, 'spellmorph raise dead': 1.3, 'guardian augmenter': 1.74, 'sproutback trudge': 0.18, 'zof consumption // zof bloodbog': 0.09, 'elbrus, the binding blade // withengar unbound': 5.34, 'inkshield': 4.24, 'elf warrior': 0.38, 'fin-clade fugitives': 0.01, 'ingenious mastery': 0.12, 'animating faerie // bring to life': 0.03, 'path of mettle // metzali, tower of triumph': 0.27, 'dauntless unity': 0.01, 'warchanter skald': 0.07, 'emergent sequence': 0.05, 'problematic volcano': 1.33, 'villagers of estwald // howlpack of estwald': 0.12, 'rowan, scholar of sparks // will, scholar of frost': 3.36, 'rowan, scholar of sparks': 3.51, 'pop quiz': 0.02, 'esior, wardwing familiar': 0.07, 'doctor': 0.06, 'vivien reid emblem': 0.5, 'giant warrior': 0.06, 'blot out the sky': 1.01, 'tamiyo, field researcher emblem': 0.46, 'predatory': 0.05, 'dowsing dagger // lost vale': 4.32, 'bound // determined': 0.39, 'kor ally': 0.07, 'silverquill silencer': 0.17, 'elemental expressionist': 0.07, 'dramatic finale': 0.11, 'horizon seeker': 0.01, 'serpentine curve': 0.02, 'hornet': 0.61, 'wasp': 0.24, 'first day of class': 0.01, 'body of research': 1.22, 'letter of acceptance': 0.03, 'pure // simple': 0.12, 'queue of beetles': 1.68, 'chimney goyf': 0.53, 'reinterpret': 0.46, 'umara mystic': 0.05, 'promise of loyalty': 0.96, 'killian, ink duelist': 0.07, 'venerable warsinger': 0.27, 'ragavan': 1.68, 'pious evangel // wayward disciple': 0.15, 'high troller': 0.78, "professor's warning": 0.04, 'mage hunter': 0.03, 'orochi eggwatcher // shidako, broodmistress': 0.24, 'kytheon, hero of akros // gideon, battle-forged': 3.71, 'makindi ox': 0.01, 'anointer of valor': 0.01, 'digsite engineer': 0.21, 'dread rider': 0.01, 'human cleric': 4.07, 'gnarled professor': 0.09, 'curious pair // treats to share': 0.01, 'risen riptide': 0.02, 'underdark beholder': 1.16, 'proud wildbonder': 0.06, 'zombie giant': 0.1, 'garrison cat': 0.03, 'lambholt pacifist // lambholt butcher': 0.19, 'gnottvold recluse': 0.01, 'cunning rhetoric': 6.42, 'bayou groff': 0.03, 'horse': 0.73, 'glacian, powerstone engineer': 0.01, 'geometric weird': 1.12, 'elemental masterpiece': 0.01, 'ardenvale tactician // dizzying swoop': 0.02, 'hired muscle // scarmaker': 0.11, 'growing rites of itlimoc // itlimoc, cradle of the sun': 25.01, 'nightmare horror': 0.1, 'jace, telepath unbound emblem': 0.36, 'pithing spyglass': 2.09, 'study hall': 0.09, 'relic sloth': 0.01, 'down // dirty': 0.1, 'brinebarrow intruder': 0.01, 'construct': 0.97, 'hornbash mentor': 0.07, 'throat wolf': 2.29, 'double major': 1.24, 'liliana of the dark realms emblem': 0.47, 'siani, eye of the storm': 0.02, 'bloodsky berserker': 0.02, 'bird': 0.1, 'gideon of the trials emblem': 0.77, 'cloudpiercer': 0.01, 'access tunnel': 0.3, 'delver of secrets // insectile aberration': 1.58, 'the grand tour': 1.53, 'augury raven': 0.01, 'zimone, quandrix prodigy': 0.06, 'mila, crafty companion // lukka, wayward bonder': 2.15, 'mila, crafty companion': 1.24, 'combat calligrapher': 0.19, 'plague reaver': 0.09, "archaeomancer's map": 11.51, 'harness infinity': 0.48, 'seismic': 0.26, 'theoretical duplication': 0.49, 'snare tactician': 0.01, 'solve the equation': 2.47, 'spawning kraken': 4.99, 'gorilla tactics': 1.2, "sasaya, orochi ascendant // sasaya's essence": 3.5, 'witherbloom pledgemage': 0.02, "kuon, ogre ascendant // kuon's essence": 0.81, 'bird soldier': 0.23, 'personal decoy': 4.27, 'fracture': 0.48, 'trove tracker': 0.02, 'thing in the ice // awoken horror': 4.54, 'time sidewalk': 2.89, "poet's quill": 0.15, 'queen of ice // rage of winter': 0.02, 'sudden breakthrough': 0.04, 'one with death': 5.9, 'goat': 0.14, 'village messenger // moonrise intruder': 0.27, 'pilgrim of the ages': 0.02, 'pest summoning': 0.04, 'soldier ally': 0.1, 'search for azcanta // azcanta, the sunken ruin': 6.09, 'mana abundance': 1.87, "legion's landing // adanto, the first fort": 2.61, 'wingfold pteron': 0.01, 'phyrexian triniform': 2.8, 'draugr recruiter': 0.01, 'phyrexian': 0.41, 'merchant of the vale // haggle': 0.06, 'beaming defiance': 0.01, 'losheel, clockwork scholar': 0.26, 'tibalt the chaotic': 8.54, 'battershield warrior': 0.01, 'thaumatic compass // spires of orazca': 3.65, 'galazeth prismari': 4.81, "mondronen shaman // tovolar's magehunter": 0.42, 'elemental summoning': 0.01, "homura, human ascendant // homura's essence": 3.05, 'research // development': 0.53, 'prismari command': 5.44, 'will kenrith emblem': 0.37, 'conspiracy theorist': 0.27, 'walls': 0.36, 'efreet flamepainter': 0.1, 'zyym, mesmeric lord': 1.05, 'lash of malice': 0.02, 'swarm of locus': 0.54, 'ich-tekik, salvage splicer': 0.02, 'assault // battery': 0.25, 'sorin, solemn visitor emblem': 0.26, 'story seeker': 0.01, 'the bloodsky massacre': 0.1, 'ruff, underdog champ': 1.19, 'voja, friend to elves': 0.23, 'prepare // fight': 0.16, 'undersea invader': 0.01, 'nils, discipline enforcer': 0.23, 'silverquill pledgemage': 0.02, 'bind // liberate': 17.29, 'form of the mulldrifter': 1.47, 'creative outburst': 0.03, 'master symmetrist': 0.01, 'harvest hand // scrounged scythe': 0.15, 'explosion of riches': 0.01, "toralf, god of fury // toralf's hammer": 2.92, 'search the premises': 0.22, 'viashino lashclaw': 0.01, 'faithless salvaging': 0.06, 'herd baloth': 0.2, 'nettlecyst': 1.49, 'hard evidence': 0.06, 'silverbluff bridge': 0.36, 'void mirror': 0.99, 'battle plan': 0.01, "healer's flock": 0.02, "dragon's rage channeler": 2.59, 'tourach, dread cantor': 4.84, 'grief': 13.28, 'glinting creeper': 0.01, 'nadaar, selfless paladin': 0.59, 'lonis, cryptozoologist': 0.23, 'grist, the hunger tide': 5.07, "sythis, harvest's hand": 1.37, 'resurgent belief': 0.38, 'glimmer bairn': 0.01, 'glimpse of tomorrow': 0.21, 'unmarked grave': 3.14, 'landscaper colos': 0.01, 'young necromancer': 0.01, 'jade avenger': 0.05, 'terramorph': 0.01, 'discerning taste': 0.01, "thrasta, tempest's roar": 1.14, 'myr scrapling': 0.02, 'tragic fall': 0.01, "sojourner's companion": 0.12, 'lose focus': 0.01, 'vedalken infiltrator': 0.01, 'aeromoeba': 0.01, 'break ties': 0.01, "drizzt do'urden": 0.71, 'asmoranomardicadaistinaculdacar': 0.54, 'darkmoss bridge': 0.1, "storm god's oracle": 0.01, 'lightning spear': 0.01, 'prophetic titan': 0.01, 'break the ice': 0.04, 'bloodbraid marauder': 0.09, 'caprichrome': 0.01, 'profane tutor': 2.46, 'barbed spike': 0.01, 'tanglepool bridge': 0.1, 'constable of the realm': 0.01, 'slag strider': 0.03, 'scuttletide': 0.03, "yusri, fortune's flame": 0.09, 'prismatic ending': 4.23, 'harmonic prodigy': 1.24, 'cabal initiate': 0.02, 'late to dinner': 0.03, 'dakkon, shadow slayer': 1.49, 'mistvault bridge': 0.28, 'gouged zealot': 0.01, 'incubation // incongruity': 0.09, 'nykthos paragon': 0.28, 'persist': 2.03, 'arcbound whelp': 0.01, 'ragavan, nimble pilferer': 69.37, 'subtlety': 6.1, 'the underworld cookbook': 0.25, 'batterbone': 0.02, 'master of death': 0.31, 'ornithopter of paradise': 0.47, "chef's kiss": 0.2, 'rishadan dockhand': 0.14, 'glorious enforcer': 0.01, 'disciple of the sun': 0.01, 'steel dromedary': 0.01, 'vectis gloves': 0.01, 'crack open': 0.01, 'aeve, progenitor ooze': 0.14, 'drossforge bridge': 0.25, 'bottle golems': 0.01, 'blossoming calm': 0.11, 'arcbound javelineer': 0.03, 'chitterspitter': 0.47, 'deepwood denizen': 0.01, 'skophos reaver': 0.01, 'so shiny': 0.02, "urza's saga": 31.63, 'altar of the goyf': 0.01, 'thraben watcher': 0.07, 'zabaz, the glimmerwasp': 0.19, 'vile entomber': 0.16, 'moderation': 0.08, 'sinister starfish': 0.03, 'echoing return': 0.01, 'rise and shine': 0.2, 'graceful restoration': 0.01, 'verdant command': 0.4, 'sylvan anthem': 1.0, 'junk winder': 0.26, "blacksmith's skill": 0.03, 'said // done': 0.06, 'said': 0.02, 'esper sentinel': 17.53, 'portable hole': 1.88, 'arcbound mouser': 0.03, 'territorial kavu': 0.18, 'funnel-web recluse': 0.01, 'vorpal sword': 1.23, 'fast // furious': 0.07, 'fast': 0.01, 'arcus acolyte': 0.05, 'gilt-blade prowler': 0.01, 'power depot': 0.17, 'hell mongrel': 0.02, 'general ferrous rokiric': 0.4, 'tavern scoundrel': 0.02, 'squirrel sanctuary': 0.24, 'sanctuary raptor': 0.02, 'razortide bridge': 0.29, 'floodhound': 0.01, 'bone shards': 0.13, 'ethersworn sphinx': 0.04, 'drey keeper': 0.02, 'kaldra compleat': 5.67, "tourach's canticle": 0.01, 'gargadon': 0.02, 'sweep the skies': 0.01, "serra's emissary": 3.63, 'lolth, spider queen': 13.18, 'vermin gorger': 0.01, 'chatterstorm': 0.05, 'diamond lion': 0.14, 'murktide regent': 17.25, 'sanctifier en-vec': 1.69, 'flame blitz': 0.06, 'flametongue yearling': 0.03, 'shattered ego': 0.01, 'raving visionary': 0.02, 'mine collapse': 0.01, 'out of time': 0.22, 'sol talisman': 0.78, 'scour the desert': 0.01, 'svyelun of sea and sky': 2.04, "gaea's will": 0.14, 'fae offering': 0.1, 'piercing rays': 0.01, 'marble gargoyle': 0.01, 'loathsome curator': 0.01, 'fairgrounds patrol': 0.01, 'foundation breaker': 0.3, "tormod's cryptkeeper": 0.01, 'blessed respite': 0.12, 'yavimaya, cradle of growth': 9.98, 'tizerus charger': 0.01, 'ravenous squirrel': 0.26, "breya's apprentice": 0.14, 'sword of hearth and home': 9.21, 'mental journey': 0.01, 'galvanic relay': 0.01, 'flourishing strike': 0.02, 'thornglint bridge': 0.07, 'thought monitor': 1.81, 'parcel myr': 0.01, 'legion vanguard': 0.01, "skyblade's boon": 0.01, 'chrome courier': 0.01, 'combine chrysalis': 0.06, "wren's run hydra": 0.06, 'steelfin whale': 0.01, 'rustvale bridge': 0.26, 'timeless witness': 0.43, 'timeless dragon': 0.24, 'rakdos headliner': 0.01, 'archon of cruelty': 12.26, 'inevitable betrayal': 0.46, 'filigree attendant': 0.01, 'tireless provisioner': 1.46, 'arcbound prototype': 0.01, 'arcbound shikari': 0.04, 'sanctum weaver': 1.88, 'feast of sanity': 0.02, 'damn': 3.03, 'kaleidoscorch': 0.01, 'dermotaxi': 0.14, 'flay essence': 0.03, 'unholy heat': 0.39, 'etherium spinner': 0.01, 'foul watcher': 0.01, 'terminal agony': 0.02, 'liquimetal torque': 0.74, 'sudden edict': 0.09, 'jewel-eyed cobra': 0.01, 'spreading insurrection': 0.02, 'lucid dreams': 0.01, 'arcbound slasher': 0.01, 'nested shambler': 0.03, 'monoskelion': 0.01, 'dress down': 1.93, 'mystic redaction': 0.01, 'strike it rich': 0.38, 'lazotep chancellor': 0.02, 'step through': 0.05, 'orchard strider': 0.01, 'endurance': 34.31, 'ghost-lit drifter': 0.01, 'ignoble hierarch': 5.74, 'smell fear': 0.01, 'obsidian charmaw': 0.48, 'goldmire bridge': 0.14, 'phantasmal dreadmaw': 0.01, 'urban daggertooth': 0.01, "dihada's ploy": 0.01, 'radiant epicure': 0.01, "necromancer's familiar": 0.01, 'fractured sanity': 1.18, 'tide shaper': 0.05, 'revolutionist': 0.01, 'wavesifter': 0.01, 'blazing rootwalla': 0.1, 'clattering augur': 0.01, 'garth one-eye': 0.82, 'unbounded potential': 0.01, 'calibrated blast': 0.09, 'prosperous innkeeper': 1.7, 'captured by lagacs': 0.01, 'solitude': 47.23, 'piru, the volatile': 0.24, 'burdened aerialist': 0.01, 'world-weary': 0.01, 'knighted myr': 0.01, 'necrogoyf': 0.22, 'slagwoods bridge': 0.15, 'carth the lion': 0.21, 'geyadrone dihada': 0.96, 'breathless knight': 0.01, 'bannerhide krushok': 0.01, "tasha's hideous laughter": 4.74, 'lens flare': 0.01, 'magus of the bridge': 0.08, 'duskshell crawler': 0.01, 'recalibrate': 0.01, 'goblin anarchomancer': 0.23, 'guardian kirin': 0.01, 'bruenor battlehammer': 0.29, 'power word kill': 0.31, 'kitchen imp': 0.01, 'priest of fell rites': 0.77, 'scurry oak': 0.3, 'captain ripley vance': 0.02, 'tiamat': 9.61, 'chatterfang, squirrel general': 4.02, 'road // ruin': 0.08, 'road': 0.02, 'dauthi voidwalker': 7.33, 'academy manufactor': 3.26, 'mount velus manticore': 0.01, 'squirrel sovereign': 0.31, 'abiding grace': 0.13, 'foundry helix': 0.01, 'underworld hermit': 0.04, 'soul of migration': 0.01, 'rift sower': 0.01, 'goblin traprunner': 0.01, 'fury': 19.61, 'scion of draco': 1.9, 'specimen collector': 0.01, 'archfiend of sorrows': 0.01, 'fodder tosser': 0.01, 'suspend': 0.39, 'arcbound tracker': 0.01, 'brainstone': 0.13, 'breena, the demagogue': 0.92, 'esix, fractal bloom': 1.85, 'adrix and nev, twincasters': 8.1, 'alibou, ancient witness': 0.51, 'osgir, the reconstructor': 0.83, 'veyran, voice of duality': 10.69, 'felisa, fang of silverquill': 1.2, 'devoted paladin': 0.01, 'half-elf monk': 0.01, 'dawnbringer cleric': 0.1, 'blink dog': 0.01, 'earth-cult elemental': 0.01, 'the book of exalted deeds': 4.72, 'sepulcher ghoul': 0.01, 'zariel, archduke of avernus': 2.49, 'minion of the mighty': 0.8, 'hill giant herdgorger': 0.01, 'indomitable might': 0.08, 'werewolf pack leader': 4.84, 'hall of storm giants': 4.13, 'zombie ogre': 0.01, 'wight': 0.36, 'minimus containment': 0.04, 'hakka, whispering raven': 0.46, 'awaken the blood avatar': 1.45, 'kabira plateau': 0.31, "demogorgon's clutches": 0.03, 'owlbear': 0.04, 'eyes of the beholder': 0.01, "diviner's portent": 0.2, 'xorn': 2.42, 'bar the gate': 0.03, 'potion of healing': 0.02, 'lair of the hydra': 2.02, 'nighteyes the desecrator': 0.5, 'ondu skyruins': 0.89, 'gloom stalker': 0.01, 'temple of the dragon queen': 0.21, "trickster's talisman": 0.02, 'purple worm': 0.01, 'fey steed': 0.14, 'underdark rift': 0.1, 'arcane investigator': 0.01, 'sorcerer class': 1.24, 'hoard robber': 0.03, 'xanathar, guild kingpin': 4.08, 'wandering troubadour': 0.02, 'ebondeath, dracolich': 7.12, 'grimclimb pathway': 4.04, 'circle of dreams druid': 5.08, 'veteran dungeoneer': 0.01, 'blue dragon': 0.03, 'drider': 0.03, 'icingdeath, frost tyrant': 1.85, 'asmodeus the archfiend': 0.23, 'cave of the frost dragon': 1.34, 'grand master of flowers': 1.53, 'dungeon map': 0.04, 'radiant solar': 0.19, 'phantom steed': 0.23, 'kaiso, memory of loyalty': 0.09, 'brazen dwarf': 0.02, 'compelled duel': 0.01, 'herald of hadar': 0.01, 'dungeon crawler': 0.02, 'elturgard ranger': 0.01, 'shortcut seeker': 0.01, 'eccentric apprentice': 0.02, 'ebony fly': 0.18, 'kazandu valley': 0.33, 'armory veteran': 0.01, 'ochre jelly': 0.57, 'saproling': 1.1, 'wild endeavor': 0.08, 'wish': 0.81, 'minsc, beloved ranger': 1.71, 'fiendlash': 0.61, 'monk of the open hand': 0.2, 'westgate regent': 0.68, 'shocking grasp': 0.01, 'acererak the archlich': 9.58, 'vampire spawn': 0.03, 'makindi mesas': 0.1, 'blackbloom bog': 0.08, "valkmira, protector's shield": 0.98, 'plate armor': 0.13, 'wizard class': 1.83, 'eye of vecna': 0.57, 'hagra broodpit': 1.23, 'divine smite': 0.02, 'underdark basilisk': 0.02, 'hand of vecna': 0.25, 'gelatinous cube': 0.27, 'treasure vault': 5.72, 'azamuki, treachery incarnate': 0.16, 'rust monster': 0.01, 'dwarfhold champion': 0.01, 'ray of frost': 0.01, 'treasure chest': 0.25, 'valor singer': 0.01, "dragon's disciple": 0.02, 'meteor swarm': 0.12, 'turntimber, serpentine wood': 2.37, 'robe of stars': 3.96, 'check for traps': 0.09, "you find the villains' lair": 0.12, 'hurl through hell': 0.72, 'iron golem': 0.01, 'hobgoblin bandit lord': 1.24, 'bag of devouring': 0.08, "ranger's hawk": 0.02, 'deadly vanity': 0.27, 'deadly dispute': 4.33, 'mistgate pathway': 5.43, 'you find some prisoners': 0.22, 'tok-tok, volcano born': 0.48, 'karazikar, the eye tyrant': 2.89, 'the ringhart crest': 0.18, 'lavaglide pathway': 4.95, 'unexpected windfall': 0.65, 'you see a guard approach': 0.03, 'sea gate, reborn': 12.62, "ranger's longbow": 0.01, 'valiant endeavor': 0.07, 'component pouch': 0.1, 'hobgoblin captain': 0.01, 'silver raven': 0.05, 'bulette': 0.01, 'kalain, reclusive painter': 0.25, 'fevered suspicion': 0.44, 'burning hands': 0.11, 'tangled vale': 0.59, 'you hear something on watch': 0.01, 'revivify': 0.1, 'netherese puzzle-ward': 0.14, 'agadeem, the undercrypt': 14.5, 'tidechannel pathway': 4.95, 'tobita, master of winds': 0.1, 'barbarian class': 0.1, "mordenkainen's polymorph": 0.01, 'goka the unjust': 0.09, 'druid of purification': 5.91, 'bard class': 0.7, 'power of persuasion': 0.01, "berserker's frenzy": 0.1, 'done': 0.02, 'hellish rebuke': 1.37, 'maddening hex': 1.19, 'herd /': 18.75, 'steadfast paladin': 0.01, 'revel in silence': 0.13, 'grim wanderer': 0.11, 'lurking roper': 0.06, 'goblin morningstar': 0.03, 'furious': 0.01, 'clever conjurer': 0.01, '+2 mace': 0.01, "klauth's will": 0.35, 'nassari, dean of expression': 0.11, 'ray of enfeeblement': 0.04, 'the omenkeel': 0.28, 'skullport merchant': 0.32, 'explore the vastlands': 5.81, 'monk class': 0.27, 'fifty feet of rope': 0.03, 'froghemoth': 0.71, 'swarming goblins': 0.01, 'triumphant adventurer': 0.27, 'rally maneuver': 0.01, 'umara skyfalls': 0.02, 'mordenkainen': 2.59, 'lorcan, warlock collector': 0.29, 'lisette, dean of the root': 0.87, 'emeria, shattered skyclave': 4.62, 'air-cult elemental': 0.01, 'boots of speed': 0.04, 'scaled herbalist': 0.05, "dragon's fire": 0.16, "wizard's spellbook": 0.25, 'mantle of the ancients': 1.44, 'aberrant mind sorcerer': 0.01, 'warlock class': 0.14, 'rogue class': 1.07, "krydle of baldur's gate": 0.25, 'you see a pair of goblins': 0.1, 'restorative burst': 0.09, 'leather armor': 0.02, 'boulderloft pathway': 3.82, 'jaraku the interloper': 0.22, 'dueling rapier': 0.02, "hunter's mark": 0.02, 'displacer beast': 0.01, "thieves' tools": 0.02, 'grim bounty': 0.02, 'spikefield cave': 0.19, 'soulknife spy': 0.01, 'song-mad ruins': 0.16, 'kenzo the hardhearted': 0.32, 'greataxe': 0.01, "tergrid's lantern": 3.55, 'find the path': 0.01, 'kraken': 3.15, 'slitherbore pathway': 5.06, 'holy avenger': 0.34, 'clay golem': 0.02, 'inspiring bard': 0.01, 'you happen on a glade': 0.1, 'grim hireling': 14.97, 'moon-blessed cleric': 0.47, 'fighter class': 2.18, 'lightfoot rogue': 0.02, 'flamethrower sonata': 0.11, "fates' reversal": 0.02, 'true polymorph': 0.14, 'delina, wild mage': 1.05, 'curse of the fire penguin creature': 1.37, 'mind flayer': 0.4, 'guardian of faith': 3.32, 'sudden insight': 0.01, 'yuan-ti fang-blade': 0.03, 'throne of death': 0.23, 'arcane endeavor': 0.08, 'circle of the moon druid': 0.01, 'tibalt, cosmic impostor': 8.82, 'echoing equation': 0.19, 'grave endeavor': 0.07, 'the deck of many things': 2.08, 'the prismatic bridge': 8.25, "farideh's fireball": 0.01, 'reckless endeavor': 0.75, "you're ambushed on the road": 0.01, 'skeletal swarming': 0.22, 'you come to a river': 0.02, 'critical hit': 0.03, 'wild shape': 0.1, 'arborea pegasus': 0.01, 'split the party': 0.01, 'planar ally': 0.01, 'orcus, prince of undeath': 0.29, 'clattering skeletons': 0.01, 'gnoll hunter': 0.01, 'dragonborn champion': 0.48, 'imbraham, dean of theory': 0.1, 'wand of orcus': 13.72, 'chaos dragon': 0.42, 'spiked pit trap': 0.01, 'augusta, dean of order': 0.18, 'winged boots': 0.29, "delver's torch": 0.02, 'dragon turtle': 0.21, 'contact other plane': 0.04, 'adult gold dragon': 0.37, 'choose your weapon': 0.08, 'wild-magic sorcerer': 0.45, 'the blackstaff of waterdeep': 0.18, 'secret door': 0.01, 'keen-eared sentry': 0.01, "bull's strength": 0.01, 'neverwinter dryad': 0.02, 'malakir mire': 1.89, 'scion of stygia': 0.01, 'priest of ancient lore': 0.07, 'danse macabre': 0.15, 'you find a cursed idol': 0.03, 'sword of hours': 0.2, 'devour intellect': 0.01, 'paladin class': 3.03, 'sword of the realms': 6.65, 'black dragon': 0.03, 'what /': 0.16, 'sylvan shepherd': 0.01, 'death-priest of myrkul': 0.13, 'akoum teeth': 0.04, 'silundi isle': 0.41, 'beyeen coast': 0.09, 'embrose, dean of shadow': 0.19, 'pelakka caverns': 0.1, 'wulfgar of icewind dale': 1.19, 'autumn-tail, kitsune sage': 0.41, 'search for blex': 1.4, 'feywild trickster': 0.04, 'pixie guide': 0.03, 'sphere of annihilation': 0.21, 'mimic': 0.01, 'white dragon': 0.04, 'extract brain': 0.2, "reaper's talisman": 0.07, 'flumph': 0.32, 'kaldring, the rimestaff': 0.23, 'varis, silverymoon ranger': 0.22, 'song of inspiration': 0.09, 'celestial unicorn': 0.09, 'guild thief': 0.01, 'the tarrasque': 2.8, 'barrowin of clan undurr': 0.11, 'glasspool shore': 3.3, 'spoils of the hunt': 0.01, 'green dragon': 0.03, 'hulking bugbear': 0.03, 'you meet in a tavern': 0.02, 'hama pashar, ruin seeker': 0.03, 'teleportation circle': 2.55, 'journey to the oracle': 0.89, 'loyal warhound': 1.04, 'trelasarra, moon dancer': 0.25, 'inferno of the star mounts': 5.96, 'vastwood thicket': 0.13, 'gretchen titchwillow': 0.11, 'ellywick tumblestrum': 1.32, 'ranger class': 7.44, 'hive of the eye tyrant': 1.73, 'grazilaxx, illithid scholar': 0.94, 'rod of absorption': 0.65, 'kick in the door': 0.02, 'forsworn paladin': 0.38, 'loathsome troll': 0.02, 'share the spoils': 0.33, 'minn, wily illusionist': 0.29, 'ride the avalanche': 0.09, 'targ nar, demon-fang gnoll': 0.06, 'sejiri glacier': 0.43, 'dire wolf prowler': 0.01, 'tiger-tribe hunter': 0.01, 'iymrith, desert doom': 4.21, 'precipitous drop': 0.01, 'instrument of the bards': 0.25, "erayo's essence": 10.27, 'spare dagger': 0.01, 'orb of dragonkind': 0.77, 'zof bloodbog': 0.09, 'fly': 0.02, 'plundering barbarian': 0.06, 'dancing sword': 0.15, 'skyclave basilica': 0.06, 'oswald fiddlebender': 1.66, "paladin's shield": 0.01, 'druid class': 0.99, 'will, scholar of frost': 3.51, 'old gnawbone': 26.87, 'you come to the gnoll camp': 0.01, 'cloister gargoyle': 0.03, 'goblin javelineer': 0.04, 'shidako, broodmistress': 0.19, 'magic missile': 0.17, 'midnight pathlighter': 0.15, 'searstep pathway': 5.65, 'shambling ghast': 0.6, 'neverwinter hydra': 0.4, 'battle cry goblin': 0.48, 'thorough investigation': 0.2, 'baleful beholder': 0.01, 'scarmaker': 0.11, 'chaos channeler': 0.02, 'belt of giant strength': 0.23, 'rimeshield frost giant': 0.01, 'immovable rod': 0.32, 'lukka, wayward bonder': 1.24, 'demilich': 4.9, 'djinni windseer': 0.01, "sasaya's essence": 2.64, 'dungeon descent': 0.18, 'yuan-ti malison': 0.21, 'cleric class': 2.36, 'volo, guide to monsters': 0.67, 'bag of tricks': 0.08, 'ruin': 0.02, "kuon's essence": 1.5, 'price of loyalty': 0.01, 'ingenious smith': 2.4, 'hired hexblade': 0.01, 'vengeful ancestor': 0.71, 'flameskull': 0.7, 'catti-brie of mithral hall': 0.2, 'den of the bugbear': 7.14, 'jaded sell-sword': 0.01, "bucknard's everfull purse": 0.14, 'feign death': 0.21, "kazuul's cliffs": 0.36, "homura's essence": 3.49, 'improvised weaponry': 0.01, 'death tyrant': 1.63, 'hoarding ogre': 0.08, "farideh, devil's chosen": 0.02, 'zalto, fire giant duke': 0.15, "shessra, death's whisper": 0.04, 'harnfel, horn of bounty': 4.05, 'long rest': 0.14, 'the book of vile darkness': 1.23, 'manticore': 0.01, 'valakut stoneforge': 6.41, 'red dragon': 0.1, 'intrepid outlander': 0.03, "toralf's hammer": 1.64, 'prosper, tome-bound': 3.88, 'galea, kindler of hope': 1.81, 'sefris of the hidden ways': 2.95, 'vrondiss, rage of ancients': 1.31, 'klauth, unrivaled ancient': 10.28, 'gyome, master chef': 1.24, 'willowdusk, essence seer': 0.75, 'goblin gang leader': 0, 'croaking counterpart': 0.31, 'rockfall vale': 4.78, 'brutal cathar': 1.52, 'moonrage brute': 1.52, 'howl of the hunt': 0.01, 'sigarda, champion of light': 3.42, 'gavony dawnguard': 0.04, 'curse of shaken faith': 0.27, 'snarling wolf': 0.02, 'pestilent wolf': 0.01, 'curse of leeches': 0.18, 'leeching lurker': 0.18, 'tovolar, dire overlord': 3.18, 'tovolar, the midnight scourge': 3.18, 'consider': 1.92, "saryth, the viper's fang": 2.17, 'kessig naturalist': 0.17, 'lord of the ulvenwald': 0.17, 'herd': 1.28, 'shipwreck marsh': 10.19, 'play with fire': 0.51, 'wrenn and seven': 16.68, "can't stay away": 0.15, 'overgrown farmland': 4.59, 'unnatural growth': 6.91, 'tavern ruffian': 0.01, 'tavern smasher': 0.01, 'brimstone vandal': 0.01, 'vampire socialite': 0.5, 'enduring angel': 1.51, 'angelic enforcer': 1.51, 'infernal grasp': 1.96, 'rite of harmony': 0.79, 'village watch': 0.05, 'village reavers': 0.05, 'faithful mending': 1.64, 'poppet stitcher': 6.75, 'poppet factory': 6.75, 'the celestus': 2.43, 'galvanic iteration': 1.46, 'bladestitched skaab': 0.15, 'join the dance': 0.02, 'lunar frenzy': 0.04, 'haunted ridge': 7.46, 'famished foragers': 0.02, 'triskaidekaphile': 0.58, 'deserted beach': 4.4, 'gisa, glorious resurrector': 1.51, "arlinn, the pack's hope": 12.88, "arlinn, the moon's fury": 12.88, 'champion of the perished': 2.78, 'jadar, ghoulcaller of nephalia': 1.52, 'mentor of evos isle': 0, 'wingsteed trainer': 0, 'freyalise, skyshroud partisan': 0, 'benalish partisan': 0, 'pool of vigorous growth': 0, 'sarkhan’s scorn': 0, 'manor guardian': 0, 'skyshroud lookout': 0, 'baffling defenses': 0, 'managorger phoenix': 0, 'lumbering lightshield': 0, 'shoreline scout': 0, 'boneyard aberration': 0, 'tome of the infinite': 0, 'kiora, the tide’s fury': 0, 'bounty of the deep': 0, 'sarkhan, wanderer to shiv': 0, 'plaguecrafter’s familiar': 0, 'ethereal grasp': 0, 'davriel, soul broker': 0, 'leonin sanctifier': 0, 'davriel’s withering': 0, 'longtusk stalker': 0, 'scion of shiv': 0, 'skyshroud ambush': 0, 'teyo, aegis adept': 0, 'static discharge': 0, 'subversive acolyte': 0, 'faceless agent': 0, 'veteran charger': 0, 'reckless ringleader': 0, "davriel's withering": 0, 'locked in the cemetery': 0.01, 'gorex, the tombshell': 0.28, 'blessed defiance': 0.01, 'dawnhart wardens': 0.01, 'sunrise cavalier': 0.01, 'lunarch veteran': 0.15, 'luminous phantom': 0.15, 'primal adversary': 2.6, 'candletrap': 0.02, 'devoted grafkeeper': 0.03, 'departed soulkeeper': 0.03, 'visions of dread': 0.11, 'curse of the restless dead': 1.32, 'storm skreelix': 0.02, 'burn down the house': 0.33, 'tomb tyrant': 0.79, 'rootcoil creeper': 0.03, 'shady traveler': 0.01, 'stalking predator': 0.01, 'overwhelmed archivist': 0.02, 'archive haunt': 0.02, 'flare of faith': 0.01, 'stuffed bear': 0.01, 'visions of dominance': 0.24, 'geistflame reservoir': 0.2, "sigarda's vanguard": 0.41, 'sigardian savior': 0.87, 'geistwave': 0.04, 'fleshtaker': 0.06, 'crawl from the cellar': 0.02, 'prowling geistcatcher': 0.48, 'diregraf rebirth': 0.1, "jack-o'-lantern": 0.02, 'clarion cathars': 0.01, 'mystic skull': 0.08, 'mystic monstrosity': 0.08, 'crossroads candleguide': 0.02, 'rotten reunion': 0.02, 'old stickfingers': 0.47, 'ardent elementalist': 0.05, 'patrician geist': 0.49, 'homestead courage': 0.01, 'rem karolus, stalwart slayer': 0.41, 'falcon abomination': 0.01, 'drownyard amalgam': 0.01, 'bramble armor': 0.03, 'crowded crypt': 0.92, 'bounding wolf': 0.01, 'might of the old ways': 0.01, 'ecstatic awakener': 0.01, 'awoken demon': 0.01, 'sungold barrage': 0.01, 'sigardian zealot': 0.21, 'morbid opportunist': 1.55, 'visions of ruin': 0.29, 'moonsilver key': 0.94, 'adeline, resplendent cathar': 4.1, 'ghoulish procession': 0.1, 'lord of the forsaken': 2.03, 'bloodthirsty adversary': 5.51, 'hungry for more': 0.03, "moonrager's slash": 0.01, "cathar's call": 0.02, 'light up the night': 0.13, 'hordewing skaab': 0.3, 'winterthorn blessing': 0.01, 'nebelgast intruder': 0.01, 'burly breaker': 0.02, 'dire-strain demolisher': 0.02, 'baneblade scoundrel': 0.02, 'baneclaw marauder': 0.02, 'ruinous intrusion': 0.58, 'spellrune painter': 0.03, 'spellrune howler': 0.03, 'duel for dominance': 0.01, 'abandon the post': 0.01, 'secrets of the key': 0.01, 'firmament sage': 0.01, 'wall of mourning': 0.28, 'bird admirer': 0.02, 'wing shredder': 0.02, 'corpse cobble': 0.01, "pack's betrayal": 0.01, 'voldaren stinger': 0.01, 'storm the festival': 0.4, 'covert cutpurse': 0.01, 'covetous geist': 0.01, 'dreadhound': 0.06, 'mourning patrol': 0.01, 'morning apparition': 0.01, 'larder zombie': 0.01, 'moonveil regent': 2.98, 'fading hope': 0.33, 'sunset revelry': 0.52, 'eloise, nephalia sleuth': 0.36, 'necrosynthesis': 0.03, 'celestus sanctifier': 0.02, 'component collector': 0.01, 'harvesttide sentry': 0.01, 'falkenrath perforator': 0.02, "sigarda's splendor": 0.34, 'curse of conformity': 0.22, "neonate's rush": 0.01, 'kyler, sigardian emissary': 0.36, 'ominous roost': 0.04, 'beloved beggar': 0.02, 'generous soul': 0.02, 'morkrut behemoth': 0.02, 'foul play': 0.01, 'cathar commando': 0.27, 'startle': 0.01, 'curse of unbinding': 1.06, 'shadow kin': 0.5, 'sacred fire': 0.03, 'duelcraft trainer': 0.02, 'lambholt harrier': 0.01, 'empty the laboratory': 0.24, 'harvesttide infiltrator': 0.01, 'harvesttide assailant': 0.01, 'grizzly ghoul': 0.02, 'unblinking observer': 0.02, 'search party captain': 0.01, 'stalwart pathlighter': 0.36, 'voldaren ambusher': 0.01, "dryad's revival": 0.05, 'ritual of hope': 0.01, 'tainted adversary': 6.86, 'no way out': 0.02, 'skaab wrangler': 0.01, 'ravenous rotbelly': 0.32, 'covetous castaway': 0.02, 'ghostly castigator': 0.02, 'raze the effigy': 0.01, 'bloodtithe collector': 0.02, 'outland liberator': 0.36, 'frenzied trapbreaker': 0.36, 'candlegrove witch': 0.01, 'teferi, who slows the sunset': 4.24, 'kurbis, harvest celebrant': 0.29, 'rite of oblivion': 0.14, 'hobbling zombie': 0.03, 'ritual guardian': 0.01, 'cleaver skaab': 0.59, 'gavony silversmith': 0.01, 'flip the switch': 0.01, "olivia's midnight ambush": 0.01, 'purifying dragon': 0.01, "odric's outrider": 0.02, 'organ hoarder': 0.01, 'siege zombie': 0.03, "avacyn's memorial": 1.8, 'slaughter specialist': 0.47, 'silver bolt': 0.02, 'mysterious tome': 0.05, 'chilling chronicle': 0.05, 'heirloom mirror': 0.01, 'inherited fiend': 0.01, 'thraben exorcism': 0.01, 'mask of griselbrand': 0.49, 'eccentric farmer': 0.01, 'burn the accursed': 0.01, 'mounted dreadknight': 0.01, 'ambitious farmhand': 0.1, 'seasoned cathar': 0.1, 'visions of duplicity': 0.11, 'galedrifter': 0.01, 'waildrifter': 0.01, 'stolen vitality': 0.01, 'otherworldly gaze': 0.26, 'contortionist troupe': 0.01, 'bereaved survivor': 0.09, 'dauntless avenger': 0.09, 'defend the celestus': 0.05, 'chaplain of alms': 0.13, 'chapel shieldgeist': 0.13, 'tireless hauler': 0.01, 'dire-strain brawler': 0.01, 'baithook angler': 0.01, 'hook-haunt drifter': 0.01, 'dawnhart rejuvenator': 0.01, "hedgewitch's mask": 0.01, 'stromkirk bloodthief': 0.04, 'electric revelation': 0.01, 'deathbonnet sprout': 0.1, 'deathbonnet hulk': 0.1, 'curse of obsession': 0.3, 'flame channeler': 0.04, 'embodiment of flame': 0.04, 'defenestrate': 0.01, "ghouls' night out": 0.91, 'leinore, autumn sovereign': 0.34, 'blood pact': 0.04, 'curse of clinging webs': 0.31, 'celestial judgment': 0.16, 'seize the storm': 0.01, 'drown in dreams': 1.26, 'eaten alive': 0.09, 'gavony trapper': 0.01, 'arcane infusion': 0.01, 'tapping at the window': 0.02, 'revenge of the drowned': 0.01, 'shipwreck sifters': 0.01, 'florian, voldaren scion': 2.59, 'diregraf horde': 0.02, 'phantom carriage': 0.03, 'rise of the ants': 0.01, 'fangblade brigand': 0.05, 'fangblade eviscerator': 0.05, 'lynde, cheerful tormentor': 3.28, 'celebrate the harvest': 0.26, 'unnatural moonrise': 0.14, 'somberwald beastmaster': 0.39, 'dawnhart mentor': 0.01, 'soul-guide gryff': 0.01, 'heronblade elite': 0.82, 'novice occultist': 0.01, 'path to the festival': 0.01, 'festival crasher': 0.01, 'memory deluge': 7.11, 'hound tamer': 0.1, 'untamed pup': 0.1, 'wilhelt, the rotcleaver': 0.96, 'turn the earth': 0.05, 'candlelit cavalry': 0.01, 'visions of glory': 0.2, 'liesa, forgotten archangel': 1.63, 'shadowbeast sighting': 0.01, 'brood weaver': 0.02, 'borrowed time': 0.05, 'arrogant outlaw': 0.01, 'bat whisperer': 0.01, 'lier, disciple of the drowned': 9.29, 'loyal gryff': 0.01, 'moorland rescuer': 0.24, 'cathartic pyre': 0.24, 'obsessive astronomer': 0.01, 'vengeful strangler': 0.09, 'strangling grasp': 0.09, 'intrepid adversary': 8.32, 'fateful absence': 3.12, 'the meathook massacre': 38.4, 'vanquish the horde': 5.35, "tovolar's huntmaster": 1.55, 'briarbridge tracker': 0.17, 'malevolent hermit': 3.16, 'spectral adversary': 3.4, 'suspicious stowaway': 0.32, 'smoldering egg': 1.9, 'reckless stormseeker': 1.28, 'sungold sentinel': 0.33, 'bloodline culling': 0.14, 'graveyard trespasser': 0.26, 'falkenrath pit fighter': 0.76, 'curse of silence': 0.25, 'siphon insight': 0.66, "lim-dul's vault": 6.45, 'curse of surveillance': 0.15, 'slogurk, the overslime': 0.23, 'sludge monster': 0.45, 'augur of autumn': 5.72, 'katilda, dawnhart prime': 0.53, 'angelfire ignition': 0.26, 'vadrik, astral archmage': 0.22, 'voice of the blessed': 2.04, 'dreadlight monstrosity': 0.02, 'lantern flare': 0.1, 'cloaked cadet': 0.02, 'chief jim hopper': 18.12, 'end the festivities': 0.02, 'geralf, visionary stitcher': 0.89, 'timin, youthful geist': 0.67, 'kamber, the plunderer': 1.11, 'graveyard glutton': 0.26, 'henrika domnathi': 4.96, 'henrika, infernal seer': 4.96, 'wedding ring': 24.97, 'hollowhenge overlord': 3.63, 'wandering mind': 0.18, 'curse of hospitality': 0.33, "vampire's kiss": 0.03, 'pyre spawn': 0.01, 'dominating vampire': 0.24, 'angelic quartermaster': 0.01, 'cemetery illuminator': 4.22, 'retrieve': 0.06, 'jacob hauken, inspector': 1.65, "hauken's insight": 1.65, 'doom weaver': 0.69, 'anje, maid of dishonor': 0.66, "tovolar's packleader": 1.55, 'savior of ollenbock': 1.58, 'fell stinger': 0.23, 'crossway troublemakers': 0.74, 'magma pummeler': 0.01, 'hostile hostel': 1.35, 'creeping inn': 1.35, 'oakshade stalker': 0.03, 'moonlit ambusher': 0.03, 'dormant grove': 0.05, 'gnarled grovestrider': 0.05, 'traveling minister': 0.01, 'thirst for discovery': 0.19, 'cobbled lancer': 0.06, 'lacerate flesh': 0.01, 'jerren, corrupted bishop': 1.16, 'ormendahl, the corrupter': 1.16, 'volatile arsonist': 2.84, 'dire-strain anarchist': 2.84, 'blood petal celebrant': 0.01, "investigator's journal": 0.15, 'ethereal investigator': 0.68, 'rending flame': 0.01, 'consuming tide': 0.31, 'wedding announcement': 0.41, 'wedding festivity': 0.41, "alchemist's gambit": 0.43, 'piercing light': 0.01, 'dying to serve': 0.16, "edgar's awakening": 0.07, 'torens, fist of the angels': 0.74, 'dorothea, vengeful victim': 0.47, "dorothea's retribution": 0.47, 'gluttonous guest': 0.01, 'hallowed respite': 0.17, 'chill of the grave': 0.01, 'distracting geist': 0.02, 'clever distraction': 0.02, 'diver skaab': 0.01, 'hopeful initiate': 0.4, 'whispering wizard': 0.02, 'blood hypnotist': 0.04, 'wolf strike': 0.01, 'cemetery protector': 1.88, 'sanguine statuette': 0.01, 'rhoda, geist avenger': 0.67, 'sinister waltz': 0.68, 'winged portent': 0.16, 'drogskol infantry': 0.01, 'drogskol armaments': 0.01, "vampires' vengeance": 0.09, 'markov retribution': 0.01, 'selhoff entomber': 0.01, 'falkenrath celebrants': 0.01, 'strefan, maurer progenitor': 1.22, 'steelclad spirit': 0.01, 'boarded window': 0.02, 'vilespawn spider': 0.03, 'glass-cast heart': 0.72, 'nurturing presence': 0.01, 'apprentice sharpshooter': 0.01, 'belligerent guest': 0.02, 'bloodtithe harvester': 0.07, 'unholy officiant': 0.02, 'undead butler': 0.21, 'dennick, pious apprentice': 0.27, 'dennick, pious apparition': 0.27, 'geistlight snare': 0.11, 'chandra, dressed to kill': 10.1, 'stormcarved coast': 5.51, 'sigardian paladin': 0.05, 'moldgraf millipede': 0.01, 'katilda, dawnhart martyr': 0.81, "katilda's rising dawn": 0.81, 'honored heirloom': 0.04, 'frenzied devils': 0.01, 'mischievous catgeist': 0.1, 'catlike curiosity': 0.1, "predators' hour": 2.17, 'cultivator colossus': 21.38, 'twinblade geist': 0.09, 'twinblade invocation': 0.09, 'mike, the dungeon master': 18.99, 'massive might': 0.03, 'benevolent geist': 3.16, 'fear of death': 0.01, 'hookhand mariner': 0.01, 'riphook raider': 0.01, 'grolnok, the omnivore': 0.3, 'diregraf scavenger': 0.01, 'dire-strain rampage': 0.23, 'grisly ritual': 0.01, "sigarda's imprisonment": 0.01, 'archghoul of thraben': 0.23, 'mirrorhall mimic': 0.88, 'ghastly mimicry': 0.88, 'scion of opulence': 1.02, 'reckless impulse': 0.13, 'into the night': 0.05, 'blood servitor': 0.01, 'hungry ridgewolf': 0.01, 'sundown pass': 5.6, 'binding geist': 0.01, 'spectral binding': 0.01, 'disorder in the court': 1.08, 'screaming swarm': 0.03, 'inspired idea': 0.16, 'persistent specimen': 0.01, 'fearful villager': 0.01, 'fearsome werewolf': 0.01, 'welcoming vampire': 5.21, 'desperate farmer': 0.01, 'depraved harvester': 0.01, 'toxic scorpion': 0.02, "bride's gown": 0.02, 'soulcipher board': 0.01, 'cipherbound spirit': 0.01, 'spiked ripsaw': 0.03, 'lantern bearer': 0.01, "lanterns' lift": 0.01, 'odric, blood-cursed': 0.13, 'rot-tide gargantua': 0.04, 'flame-blessed bolt': 0.04, "olivia's attendants": 0.23, 'bleed dry': 0.02, 'drogskol reinforcements': 0.77, 'occult epiphany': 0.54, 'ill-tempered loner': 0.36, 'howlpack avenger': 0.36, "witch's web": 0.01, 'sporeback wolf': 0.01, 'storm of souls': 0.83, 'runo stromkirk': 0.31, 'krothuss, lord of the deep': 0.31, 'millicent, restless revenant': 0.89, 'priest of the blessed graf': 0.63, 'bloodvial purveyor': 0.55, 'avabruck caretaker': 15.94, 'hollowhenge huntmaster': 15.94, 'dollhouse of horrors': 0.61, 'ashmouth dragon': 1.9, 'patchwork crawler': 0.18, 'scattered thoughts': 0.03, 'wake to slaughter': 0.14, 'repository skaab': 0.01, 'innocent traveler': 0.05, 'malicious invader': 0.05, 'reclusive taxidermist': 0.09, 'willow geist': 0.39, 'ollenbock escort': 0.05, 'restless bloodseeker': 0.06, 'bloodsoaked reveler': 0.06, 'biolume egg': 0.01, 'biolume serpent': 0.01, 'wanderlight spirit': 0.02, 'creepy puppeteer': 0.09, 'bloodcrazed socialite': 0.01, 'wretched throng': 0.01, 'ascendant packleader': 1.02, "sigarda's summons": 0.23, 'consuming blob': 0.75, 'serpentine ambush': 0.01, 'fierce retribution': 0.02, 'faithbound judge': 2.62, "sinner's judgment": 2.62, 'glorious sunrise': 0.62, 'cemetery desecrator': 0.68, 'wedding security': 0.02, "alchemist's retrieval": 0.02, 'honeymoon hearse': 0.01, 'brine comber': 0.08, 'brinebound gift': 0.08, 'olivia, crimson bride': 11.82, 'undying malice': 0.03, 'graf reaver': 0.18, 'gryffwing cavalry': 0.03, 'shadowgrange archfiend': 1.66, 'old rutstein': 0.23, 'voltaic visionary': 0.02, 'volt-charged berserker': 0.02, 'gift of fangs': 0.01, 'ulvenwald oddity': 0.84, 'ulvenwald behemoth': 0.84, 'change of fortune': 0.69, 'radiant grace': 0.04, 'radiant restraints': 0.04, 'falkenrath forebear': 0.24, 'unhallowed phalanx': 0.02, 'sunstreak phoenix': 0.34, 'imperious mindbreaker': 0.57, 'runebound wolf': 0.07, 'edgar, charmed groom': 1.11, "edgar markov's coffin": 1.11, "nature's embrace": 0.02, 'mind flayer, the shadow': 19.75, 'ragged recluse': 0.01, 'odious witch': 0.01, "olivia's wrath": 1.03, 'heron-blessed geist': 0.01, 'eruth, tormented prophet': 0.21, 'resistance squad': 0.01, 'bloody betrayal': 0.01, 'concealing curtains': 0.19, 'revealing eye': 0.19, 'breathkeeper seraph': 1.35, 'crawling infestation': 0.02, 'wash away': 1.01, 'sudden salvation': 0.73, 'bloodsworn squire': 0.02, 'bloodsworn knight': 0.02, 'weaver of blossoms': 0.05, 'blossom-clad werewolf': 0.05, 'voldaren bloodcaster': 0.73, 'bloodbat summoner': 0.73, 'eleven, the mage': 18.99, 'supernatural rescue': 0.01, 'howling moon': 0.38, 'stensia uprising': 0.13, 'stormchaser drake': 0.08, 'child of the pack': 0.16, 'savage packmate': 0.16, 'estwald shieldbasher': 0.01, 'catapult fodder': 0.05, 'catapult captain': 0.05, 'dreadfeast demon': 0.13, 'dreamshackle geist': 0.2, 'spectral arcanist': 0.3, 'blood fountain': 0.16, 'wolfkin outcast': 0.1, 'wedding crasher': 0.1, 'demonic bargain': 0.19, 'laid to rest': 0.08, 'dig up': 0.8, 'umbris, fear manifest': 15.38, 'pointed discussion': 0.03, 'aim for the head': 0.01, 'nebelgast beguiler': 0.01, 'halana and alena, partners': 0.32, 'ballista watcher': 0.04, 'ballista wielder': 0.04, 'sheltering boughs': 0.01, "groom's finery": 0.02, 'vampire slayer': 0.02, "ghoulcaller's harvest": 0.2, 'fleeting spirit': 0.03, 'markov waltzer': 0.01, 'weary prisoner': 0.01, 'wrathful jailbreaker': 0.01, 'infestation expert': 0.05, 'infested werewolf': 0.05, 'thundering mightmare': 0.86, 'cruel witness': 0.02, 'hiveheart shaman': 0.11, 'arm the cathars': 0.01, 'toxrill, the corrosive': 16.17, 'skull skaab': 0.07, 'sanctify': 0.03, 'shattered sanctum': 6.89, 'haunting imitation': 0.31, 'imposing grandeur': 1.4, 'packsong pup': 0.18, 'howlpack piper': 1.7, 'wildsong howler': 1.7, 'voldaren epicure': 0.05, 'mirage phalanx': 1.29, 'circle of confinement': 0.01, 'markov purifier': 0.1, 'gutter skulker': 0.01, 'gutter shortcut': 0.01, 'lunar rejection': 0.01, 'necroduality': 19.73, 'path of peril': 0.3, 'overcharged amalgam': 1.38, 'hullbreaker horror': 7.71, 'headless rider': 1.41, 'lightning wolf': 0.01, 'militia rallier': 0.01, 'by invitation only': 1.08, 'flourishing hunter': 0.02, 'ancient lumberknot': 0.07, 'foreboding statue': 0.08, 'forsaken thresher': 0.08, 'courier bat': 0.01, 'parasitic grasp': 0.03, 'kessig wolfrider': 0.12, 'wedding invitation': 0.05, 'midnight arsonist': 0.25, 'seafaring werewolf': 0.32, 'ceremonial knife': 0.03, 'bramble wurm': 0.02, 'dreamroot cascade': 5.11, 'sawblade slinger': 0.01, 'arterial alchemy': 0.59, "cartographer's survey": 0.1, 'cradle of safety': 0.01, 'ancestral anger': 0.03, 'kaya, geist hunter': 3.68, 'mindleech ghoul': 0.01, 'skywarp skaab': 0.01, 'parish-blade trainee': 0.02, 'gryff rider': 0.03, 'markov enforcer': 0.37, 'hallowed haunting': 4.53, 'grafted identity': 0.14, 'syphon essence': 0.01, 'skulking killer': 0.03, 'haunted library': 0.98, 'dawnhart disciple': 0.01, 'alluring suitor': 0.07, 'deadly dancer': 0.07, 'storm-charged slasher': 1.28, 'kessig flamebreather': 0.05, 'breath of the sleepless': 0.64, 'dawnhart geist': 0.03, 'kindly ancestor': 0.01, "ancestor's embrace": 0.01, 'stitched assistant': 0.01, 'dread fugue': 0.08, 'lantern of the lost': 0.41, 'heron of hope': 0.02, 'laurine, the diversion': 0.3, 'lambholt raconteur': 0.06, 'lambholt ravager': 0.06, 'manaform hellkite': 7.74, 'deathcap glade': 4.89, 'ludevic, necrogenius': 0.17, "olag, ludevic's hubris": 0.17, 'hamlet vanguard': 0.32, 'cemetery gatekeeper': 7.05, 'cemetery prowler': 8.16, 'spore crawler': 0.01, 'voldaren estate': 0.79, 'daybreak combatants': 0.01, 'sorin the mirthless': 8.31, 'panicked bystander': 0.03, 'cackling culprit': 0.03, 'witness the future': 0.02, 'rural recruit': 0.01}
612,170
612,170
0.669303
103,877
612,170
3.9443
0.141485
0.009914
0.000537
0.000293
0.007688
0.00081
0.000146
0
0
0
0
0.132526
0.127313
612,170
1
612,170
612,170
0.634407
0
0
0
0
1
0.609567
0.000124
0
0
0
0
1
1
0
false
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
null
0
0
0
1
0
0
0
1
0
0
0
1
0
8
fc745cd6ee47b3eed9cd79cdd08e5d095fd7375d
22,145
py
Python
src/pyexample/liquid/receive-send.py
alessandro-saglimbeni/libwally-core
ae84c26519b6c513332c19bc183dc0b584f4bf33
[ "MIT" ]
1
2021-06-06T18:11:23.000Z
2021-06-06T18:11:23.000Z
src/pyexample/liquid/receive-send.py
alessandro-saglimbeni/libwally-core
ae84c26519b6c513332c19bc183dc0b584f4bf33
[ "MIT" ]
1
2022-03-22T12:17:46.000Z
2022-03-22T12:17:46.000Z
src/pyexample/liquid/receive-send.py
alessandro-saglimbeni/libwally-core
ae84c26519b6c513332c19bc183dc0b584f4bf33
[ "MIT" ]
2
2020-08-24T07:39:11.000Z
2020-09-30T22:36:40.000Z
import wallycore as wally import os address_prefix = wally.WALLY_CA_PREFIX_LIQUID_REGTEST network = wally.WALLY_NETWORK_LIQUID_REGTEST wif_prefix = wally.WALLY_ADDRESS_VERSION_WIF_TESTNET mnemonic = "supreme layer police brand month october rather rack proud strike receive joy limit random hill inside brand depend giant success quarter brain butter mechanic" # start-create_p2pkh_address _, seed = wally.bip39_mnemonic_to_seed512(mnemonic, '') wallet_master_key = wally.bip32_key_from_seed( seed, wally.BIP32_VER_TEST_PRIVATE, 0) wallet_derived_key = wally.bip32_key_from_parent( wallet_master_key, 1, wally.BIP32_FLAG_KEY_PRIVATE) address = wally.bip32_key_to_address( wallet_derived_key, wally.WALLY_ADDRESS_TYPE_P2PKH, wally.WALLY_ADDRESS_VERSION_P2PKH_LIQUID_REGTEST) # end-create_p2pkh_address # start-derive_blinding_key master_blinding_key = wally.asset_blinding_key_from_seed(seed) script_pubkey = wally.address_to_scriptpubkey( address, wally.WALLY_NETWORK_LIQUID_REGTEST) private_blinding_key = wally.asset_blinding_key_to_ec_private_key( master_blinding_key, script_pubkey) public_blinding_key = wally.ec_public_key_from_private_key( private_blinding_key) # end-derive_blinding_key # start-create_conf_address confidential_address = wally.confidential_addr_from_addr( address, wally.WALLY_CA_PREFIX_LIQUID_REGTEST, public_blinding_key) # end-create_conf_address tx_hex = """\ 020000000101b4c2af876d9d24bf4e3f3da5b4d2cae4b23228074b1e9a0c95daa3374f23a78701000000171600140c0031f1b57a9363146e7f8412daedb348712062fdffffff030b86ae25b435f740074a9cabd6a9dd56ed23f4da5a7733a0236986c92c7750912108d998d28d0780cb8f12732f20298b53af93f697e3038e39ea1036628d68074854033feb02f8fa4c9a1afe3cdfead7a097e9958ee1dd25f06448df7ac067ed918efe17a914cf5de8a32131ae2a9e439a3b27900379ad23e079870a813de038afb522753b25f1bbb6e6ea783280a955e482d024dd588698125b5e2208b171fb20da2d42aa94c565425826592b3c5ab9a46c8c32235fa94d9eb8cd184803364c9e99314681c70c3c8bf5ac0ff5c7bfa5cc25b1a86d9ececca1fb9451d8451976a9147726e526b5a8675a4485bcd4d5e5d88a7dc7be2688ac0125b251070e29ca19043cf33ccd7324e2ddab03ecc4ae0b5e77c4fc0e5cf6c95a01000000000000553c000000000000000002473044022016663118197f2a2708cc68bea746648e9edea9dce1978454a6f60c8f2a43fbcd02206ab2778e25ffcb90a0da57c689a5b43906979e95ca07ac091893175df257ccc6012103041b5150cca7d970a073c15869b1df699e23831cc25d239da16e8dd0fde230e700430100010f1dce6a97ea615da0e244c030a7c717bc7b97b9f2212a84c56cb7929720f4486a8758ec3f056d5c6b87fff1f25c470abc5a31a5ff1fdf3defd6fc8d774fe37afd0e106032000000000000000126dba401d525c642770fb55e503ec7ed68491fc6a70f4a69cfc1206f296b7412db18eb9977396fb665e36bf335487ba2c9cbb3e140e5d9f1d57860156fbf347f75f00608c37a4ea19f8041b8c41d1d6ae39e6a8fbd8274fa986e9bc2a00bcd2438b5d4204a84e1b9819ddcc323cb2061bd217bc6f83a630f4ec4ba08e0eb1d567b7119f76ce14e03316198bb27836f897f0bd2ba836a78fafaba1017b97fb94157a9ea64e7b051bfbafefb427b991d6e85f8b958478045987d9434faffb8b25b5cdc0d9abfc3a9d2f25630327e62e5e178abfa16e54fe482ee9ebf29e862253f0f2319c59510f062283235452e5c1ad26ba31f2483e21ed82c44112414e88f585d000caaac1f5bdebe590d40cf94a5d6e6c5736e193333f35fd30e9eba4e3b93f6129e6eb53506dcc9dfd3ab7b88f1c471537a6ac20c4b6c3aa2d010bd1545c129a5d73f853bcfde0ddcfde080ba84dd16aa336258bd7e3e6e9b94da7fb4e5f90a8b4f508023046fe3b967e9f171a5146e7f9bb1f01d10bdf394704103a5ef26db8712c2fc2c356cfa731cf1ab0d7a7c21f70c73d225624b96305ee6af27b2ef8b22914ef37d38e6ca5bfb60e1802a193c1cefbc3f825515555fd8003ace845cd2d3d6008e6972cbb1a9ad73f4326791e4f0610a00e9b540650911277f50fd1e406f47539a96610f45197d57b93bd7e9617767daeddd8b42a6431d452efb5cbcb593e8d12a06f3970ad5b80cfd053a59ec09c50e5aadf6cd47fff311f332297b043f94aeeba5675572c1c4671ed53d14a04dca2c6bb99986e5d63b89d5c083c492f65f0b617b38a48031b07c5ce18d43a472c703f3760e4270086102af22daf5aeac5039018582c8cc45ccdd17d3a4a4aa833d4449087d2cfb1c211b6a2ee973542443a70f13fca340e198b24af6be8f8a91d21c0a130da9d238528cbe9f376c641f4e73b1ae5a11a7d0369166b97cdebe4d84b5735064bd1f97b1ad5c234f8a4eee7c897884f937f704d4c30d7c65950e670b925c591093491896bfe030aaeaa3822c81852d5de56e8eb48ceaf8c0de6104f8ed105da7c77c7ff860505d452bed6778648a595fb7cd2b8fa4549ea91576c623b5d9f4868eb2044365aa5019db98eff5d01e1a3f314d00fe9ecca5c35bb4d635acf7e6faa94a5cc1ae1cf465d8520cae53f07c3cd31dd1489fffd869dcdfc5cfe43616b148c98d1f38b579aaf56c4f84144383a213680d5df111bc2ad72d5e6572a699716d02039e652bff4c24f0b3ebe72f660a6c753ae03cb246e5db242e8dd96068439d3a1c74e42ceef1fae94c0c320e910d985ac53300cb5cf07853561ea80dda60154075dba28b904dad9a4cc0b27df6c488b72009b1520c0e6a5b70a9fdb27d51bf040e3d99093035f596baccf206741440b954df75390719c6f6885d1dab1ca6ede6a31dca0fa2824a2ec6e8cfd4cc81a9c657aac0c3c1c23590d52b8a85f0d0ba16e8bf202fed0709bc85216867edc376da0f1194fa59e984087318e54c703eb63685feecb9410d1615c83fcf1c1241f8fc8ffe41cf06c7e28986c1118aff66a0f82712a601829f15b201dc9b2f3de98e416f26e19ebd09b0fbe035fa65bb831636a4e6b8a95f9ad0957baeaea9d96841701a0e0b6af64811a52bd28edc86dc3816d822ec14b85b01419429476f6119d449a68cba580063d29069d933f9ae9e704a6199354b283377b5b2dfcc9e7ce6d1c78b4092152b2cc1e24d9701189e03d9b8bc0df212eefdd4678f16789f853ed7311e327d1b07769d8978494c6593b3034a0d187cf0a432ab98d90d0b62590f0ab687114d9cdbefc043d1d0831dfda11bf476508fef691662315eda7bf6caea740c40b6680c5dd0631a88d92877e0f2bd51eed4236e5fc45fa432aed43625236aede94b199d66ae3e14d417ed6a34579bb48421b312c9f609312827fe23e4a6140e1190738f67ea4d1105dc86a5a626d9531c76067f6d418a89dd054e32f852cbf6ce78583f0b193b9fc7d3ebeba46e5a4241078ed956cc3caa02b6d178f6e0351ed88af30b3a7c4c240c083d4e65ab64193adc34e68e0da6e7a55bbd9cab6e2a73c9d0ff8146669899ee9fa5d7a659ca0c5ad79b716a74fc3d0bb059022baaef366b82e2754dea03ce82d2931548a10f9095a8f34cda88fb396a18ad2ea67dd753a96181c20dd37f9ddb03edb8ac4325a95529fcb523d2d9a74ee997657b670f64462b44a382e303ff9f783e426cec64e7133d82adffb565eed49401a4a6dece7cde12d17d2e79edff8a2cbd8c09aaf036b74dd07e6b6b556ac5437bb0766701e3918dfe2d3a5c6b196c7704d504184d16eee3c35b3d5abd4dae1ce41cc5d3951e67f7e27a774ffc597a52ea729ceeb66eabfea556daa02393d2495475bbd37e505ead6fd7bbe64887c39bc22410afbad0c3381d3318bb8693d2f2862ce653f0bc483a343674c0b3af12a8aa9c020d7f2e94392556d998c8b8fbadc10e0948571ce6058c98a8e385970e9a63b23dd518b1e814a851a8f5ea4c0f723eae891fef5bc9f71b0558ce128498043a7049f11b184d9073da594e9159efa5e43692e10cf56f75a3b2a28709d4d07210d84345f386c7cd6c72c14181d1b65bc607240325c0138c0d1d47e86953b8f2a1d7b6f0edab3187a485bec12d346ba9011e1001ff81161f4f34930fba1be0a1909f5d10e182aa8e78d96245a2302ca35554d0867dfb401413b609b941c1754b568dff54be9986134155ffed7ba714c18f8bbe11fc1e7977a4f15ec8e5ddb1b739b9bfccb6976a45e5bcf8be08667cd7c90023a12cb02b36bdb25cbfa43648b07e51bee64729786825daa1fb2034a8e07ef89e43598d3cbec43bfb69b4c9b22e5b33b18df0747eb34ef046db9dbba6a0ca1d993c6234695aa8db198de3553bb64be2816896532810e173ef2bc7ffa891d2b81ca33a6d20d8df30e84069143601d60cbfb0e60e9333bda0b4677fecc09d2498a57b8d481a54a77a008c22d1a19ece9a1298f2d7784c1f444c3ebeefa6b6b8530e902bca7bf168d8e257527cdb0affe6a6f5d9aa5e27d38d324c6745ad40d1c73fd33ab9c61ed38f873a2a91bb3f5f38e293813fbbd5bfb90cb835b30ff9fd19e29ee7551cf7400540be80effe9c6c4f56447e25ce7291c3eba7d96722a04606b5a95c23b5594f96769eebf7271e5a2f28ce36989f778cfa8e6f5027840f4bcebaa96e7917268668d3dca622e830009e2ba79dfccedf639dbba5512399b5452ce1385eb149fa42b31052dee0c63a2ec0403b38dcfa519dc154ed0a0d3f2814d40a37991e42895ffef7d6f02caa3ba54dd3b5eda3e6ac19210ad94a922b6ce112c13f2d2757332fb9eba18d6ae3759c7a2019f55c32139cd093d105a4ce03986493c808811f1c219104d2f89a6f6197692ea335960754b2b8281776937920a759474cbc31cb0fc821e94dd337669f1df3422392f0aabe36be5d4c22b2d948505b754e4216aed5195d1ed21b5d03350dd9b3c34f05c7ecea0f5b2b85122d145153768f92166f708726b5b27da6a072462b8eb2fa5ef520ffc7119be6f39ea32ea6fdac56d3db7afe05c19db7dcd9858b5c0eebeb850ad64987eafab01c5b9bf0a731b450a76521c27670c4f25881705ba717dc17dcff723bcd59013a4c504b50395f35b8ec498c8ebffc340ad95fcdbda21724e4edd3695af113300d01c571a7494e3af7d389e3d6bfc3efca037b12697812f41a3107f79629a8dfc784d740e364aeec91b2a24f6d6455c5b5a39a980a9b8cbce6171fa7a8b67cf81af5ac3c37006c05013590d888706fb1feae2da7331aff78cfb2df435f771765b94909ae6552cd6d6b938d58f5e7efd54ea3e9ca14cce9a18a891b52e6185f8e2735942678a8520b0a2c65044fe0a6f2fd293b81e3a11b371c53501adce45762cd63453a856a16c93ea3a1cf2025d4d81f621930e1bb6f4f8362adda0fcf6aa7c2442f4329361495c2cb51635ba690dd6d84a960d4fe2c92020ae2dcc3edad40b36885b7efdfbebe91a5059d01e6abe18c7a82d2c86ed65086f312be79db0bfd8e8fe27e0c9f3b18769701f66a7ab944a0df1e22ee840b560bb26679c1fc55295c3a4816ecfe0c31ad7ae76373a0517bbe37f00226ca511f1c51361fcbb7922c799e4055c18fda01086ea0f8bda040b09cdc13fb57adc7fa8a55de30856cc564df25344ddfd99392007bb5b6ecb84d11b580d88bd4000e0a49fd712f2d8cef4a67c9c79654a773d9d7c4083a30da38485aa1614252b03439521cb9084abcab20445c866ff3cdbb0f5a5d055da959917c5b36801383710e678d3d3ab661f74a531bfb74810e5d53f09ac696024a99a30126d5c86f008f1cdb7f55f182c8d99e68b5e3f09559bec98d68b8d48c1b380ccbbdf1a5a3239062e1fc1b9c6fbdb2e6afaa4db0d9c5a3ca2452e40898819ff660991590fe2d7d9d6be154954f08860af6241af565cc52b00f5af9950eaa270e793a3e52fa8408c2cb36e8c4035180dd1e212f665e1cb4f98c1c923d5fdd2d0410b74a159551d5540a3c85466be9a808c3b7ee32a31943d05f249e64d86ea96f4be787a79cd540c68eb9e00ee393234ffda412548f6ec6e84a661cd14cfc51a60cb887036468e218266b878e579791bc1a98364ab5de78f47eb0839174c9a0c76cdfc7d5f77c1afcef4e9c5fd095746cd62ea645be5452cb9667871729308cf2caaaa8c30c0dd5ec2d577f2c8e999435ab1a04892e97ca2de131a98cc52d8c7e1e00dd7a2f9a975915ba4c2a636efb4b11908bd5884d57ada05efbd17183e2b851d4e7949ac58f69cd6faca2d19ef5a3d7c090976c8e56cdda7faf81c03e4adf44dde11f22bc54a130354db5728bdf4356944f07d090abf0f3b71f03f86512c57b8a325425b7d9a441949ccf72b74656ed1a9e1b2b0d329008e169febf26752085753973343379ec1955fbc58ec3d70b9722d3a00ce609cca84a4f534e776f463b917bc368e5c4f63eccbc36197991141089811681781c45f3cc194fc5d7370342e96fee6ffc45d037930691c8e6ab395c3f5a543a9f1a3ddb42cd1f9285b0ae2427f767147fbee9f7f61e80dd6b4a156f1cc81290f607bfe8ad5ba75cf4be245ef41757b7d1e1b543702368a1519f6c17127acbe8e26c1bf80ac93ba0e822eae900ecd090d8d3d15aad8798353fdb5f9127723da52cad1fdcabe766a9fb50e86b313c733c33aa2a84b539052bf0e17fb0263999edecd58cd2f1a9ed3d20514204a6537208866bdce33bf5423003e7de9bff110aba42d40714f7bd0a245866ce8e6d5f04fabef9062e1788af4c1600b8ce50ce4c89cd5a10486db33d75c47dd8195f57dceb2523c909068eaddaea85ac8f00b8cd30c57532a0e35100163c232661ce0824b812ecfad9118878e86248f49f5412dcf9e852f0946afca6fa7868fd0e63ab6f3c2556a4c8a93e8824702a7d784b4a905aa5ff864218b1809c43c7fd7a9bb9c0bf4315fa2e427653168cda2c4bbd30c774f6bdc29190df56658b4cf495c750378fa029073ac647720583683545f1acd595b8923f4c28a24bbd17d0691e4cb7c36f3598153357485ff8929472cebce720388459a8c254c41219ebf29a3c33f5fafae5a696d89b90226def4e6761c045efa3339cc4d4df11d24fbdd16c03d9d7bd48c142e767bfbc87452972a1f48221967016b4728dea61b7d16b02804207dc4c44b37417ce899a5e9bd54a54a802e8881ecba231f246dc2ff257dfb4630b92801b68bc8b3350867d4e0a04051f7cf3fdf11043010001d163502b5bf6d10ca6799c371261ecc633475cd11a26bcd97b473a09dabd61caae7f2121b3db169500100fe536bf4f1e721633d5bb1df29e27dbf3fa515424c6fd4d0b6023000000000000000131f9015e1cf8bb5847a55e0eb809de16a28f96a0416869a57f91088370db6feb1cedb165a7f00fdb834560d909fa80ca26cac9ced13433eb006f699e2d6a17c59c4c40b0d405d5fdd2ea0ea3dd4ae8000615c6c0ac068429e94b124e763e81844275b4c49c26d3d9fb22b94f9662bd57424b8a3c06ff04b41c4235d6f7e389c852fc2651de9c1ea8ca8b7943539296fc0c36562451c22a1d85b603437e17a0391347b041b7cb2f9063e7ca384ec6a15987916664bd8f3faee0423201bab556207fee96322e4a04dff82896ac334a6042600ddbdb81ac5884ac302294bd80b7187d59a50eda4405b396b840787a2a0891c100fd2cb27d4531baa6a3c41f3e72a9bc7ef302399811df17e72972a3f718f4b0d029e83ea14dc5af5f91e2697fb85881a90eb4dfebecb518609af552c497e8a2b7d6523d3bfc3a0dcb0524dba478f2f1e0be391b3889e958a9c12a07239d3f0d71bab5e5ff84fb8436a0b6a7c22a0f3e62908a049f39ebe154a97655152ff308417a9687925481e2049e6ae932d169034901a3382bb031953bd7b93aed838b56da6625c27092d7c51c6c91532bc54f82719d6e029e0dfa309c7c6e981176fe86b6fb5a2b744309b4da313cc5b445dc88c4c305f6aa1a421ab6308412500c4d6489a320bb52124b69afe247dd263a67a474532f2825b600a1b2ef779d708448e5d5dd356c2a55d83bacc7b759a8808577035f9087fe57982809757820b977d01b41b520775d85dab189cf29b950ee7eaaff113615ef1834e5dd3738210a1f10a702369e41959ec05d28ecfcb9b712f74aba5f01efeb02e23cf1d93e202281c46061296f1f8cfeddf8d6f8dd2916d9544a6e4456e5b2ba4717137df3866c0d458ee6fd51035152baaa8108bcbd6ebf19aa0c712213210c52f1c81d3a3606c108c580b4d9c212ba9ec5e34491e0576a1f33f46084f69c12e698b9799b31d3c66458da917859e437e2ca95f7305485af41632d7014c94eb9c815e5a16582e2978c484836f237414259980014a6b8b051713ab237faa3ab61ef2c07f0cf522ab6c3ee17697946109981b94e4ef556d2d85ed3fe241d992a34d6fb07082f0ad01f599d2a220294fbac0bc831c1690fdaf91505da30d902a521627a42813802acb910699ec93533b6352ee2894b9b88e06ade914a2708440ecfb01b1ab9052ff24da7a41822df15be0257439f79d9ffcec1783034aa2573859126e0316a26c4f950ee161e33fdb06951a0c1df3ecebdb8a1fd5818e06e43d70e242ff53ca51fc8c0db4dc73e854513157cd6a908824da3b4638fe419b9f328ad9869ddcadb1959710b9897dbc9155e1d05ec8bbec6cb2dab8004ff58c9943d73344a21d8c974ae689ac54c89356de6a42b5ec3c5bae882b4e3824584f1f879bcec99e7d14a0901ad6dd24fdff986cd6660df50c9b2dc90560de8f023f2a469906e60b532c12b4dd2348eacb04d92f3425af499fd48ffef5fcb48c33cc68b9a7461bfa2a23c0d0b480cf932ec79862f8913f3d64f7f734ba630d454f9b3369ea1329cceea9ffd17e9c027c124377e8790a34543f7c4608c776914251a487952edc91fa3feb52a169e7a51aec9bfbac08f7ef1f4ad94ebc2c9e0f90979d934f5661add09036118e782870491246cb65bbe4026e6daa6bee79fa69234d42155508ebee9459d89ab269f88005e397a44d60989782cc1e751072df82430b0d022708173ea40354aab6bbe09acd9804d68c682b47407ea7f0f216a3d6cb23139932f4bf9fdb00d23b050c58b4a3805a250ab539aa30214df2cc0d1ec2d33035288cead053c6497370b393ee1526958276ef337c6ffaefd1f162fe3fb45458733be38cc695e9c9ec48002c64b2d7c106c12b55172a44c3cdc798a7e7b7b2db6e74980b1aa62f3c7bd22a9392d94515579fa4879b23bc06bf40feb8a879f520c30437dd3db6349122cf0b00568afd5598cc01c985de75ff13e0293783361391eb87273fae1abfe81a495d81a67481c4fe9feeaed68fc1915fc3c045eabc8eed6f62a61b637cca78b846e2b076cd83b0dd72239d5e43068ad920b1706100d66ac9c3c200d6b4e4a2fc29d338fb44e7fbc8e203221de98d7a1bd00b832ef9c7c7fd3811cb8f825e363561d2acabafbb619f2cdbfbe71458babc944c20b289f1b85e169b6da2134dd89acafd7a6a51d0550f5c5cd7b13ea4555d7cedb2cb43b7bb57c37201c5eb8d25e5820eaadf683f423eac23a2ee4c31eedfdc2df76f55b7fe1c7c2809137d4d83b9398e3c61b427173a3880f78ed2d3c62d9c7bef94949ebe745b8d0ff2d8612c389cf28b2c87e45b30b3f5ffdb948039dd07fd27f8b31defde240732c593f82ce667b8df484d1cb733df59c719a37c78e7625fb904b05a71525cc027634136a06277dd5558164c651c4132304c6acfc07c35fd6d44428cf2c84399a63820c8eb57d34a0721b35002e8a325d80d38a52cdff4103da36ecb665530da35a6ebd365cf8345750e315d652c0d0f606ed1eec78ebd7bc9aae5e43ee617cb961a98fb2ce4c0f4dc2daa9324094dba3242e6ff4cfc4c825e1d76d65574bda4c8d81014609a9d5228c81e251112c60373abd829e712b39806485e6e1d4bbe26468a2bde6f45dbb01174b58c1e94cecf460e2770cd13de6a152a9eba47a2334c07beec8d04bf343b342ca76a06bed2391286b1537a41654334ea27a3781e090aae01580a92bf0958b3573e061b73b03a4bd96fa2504804bdfbe3756618699f258b021e51ff7fac2a2f5eeacaaf2ff74e63c866962632673dd8ef92d880592843f24e8dd977ed14fff323a5ff3ac870a15aba994b6d84d6650b3134dc49ff21cbf7d90d08cc3ee8dcddf88add06c9fe487cb658c799a4f3f7c802d8ea6bc976c6796a3c6730c1891ac818418b5c819f3e1bc924a0428defada9fd221139551ba35414059027d17b659f1583060fe035d96319d20e3cd3a29ce795c258a03aea052729c64b86118037d8d5b701c98aa29d447b128601af35aa6d743c62eb8b2e25b8243e7f9a1c3f248de57b49531f45653d4f0bf23815f4169c5b7e887ad5100e5e0311182967912a1147feebb9d6d73064493b8bde54a9c9d58e472650b99c5fa4f37392c9e01bf83dd057b69d0c1f7d0fb0be49b8eeff00b1ac7f5e041b0691974bee5cfea998cdb05f8642ad51e542f2fe1e5805b782cbbe8e120eb62cb1e49018902ae731a3f3bc3d00a4d61e84439bfc8dafc2b7309cdd4da00f5a38579ba4de17e60bfb532bdc76896c827444f8af7f75b4ef99a81aba27081a3f48f230428a942ad080251c2c7b6bf66a019e3618ef00d191b655b27f356d30f9e6b446546679f9633ad8217c15c63b22ca577e6270f845f3bcdabc16b79b38036320116dda6ad52a9c879a95a4b77884a88b9cfaec712b942e430e396a2e29a35aaafda94416e98089ce07ff9eb678aafc2a89d546fe8f16d36e5f9f5e2cf4c933f73274b531d395a8dfade99fd8b23ae1a02be6a818c149b6e5cc38b4285a9916cece697831c9acda14734f1d5ea03ed8e914b84342e2cedcfdc403e2531e27e3220d09573f274ab48bb5590c6a9ef76920f13ffdef19c05fe6c8422512444420c7313dd2d329c01e8361c5c897fb03f355150e4bfd8932b85332d4ace9cc00f70ebe19c19900024bc6c0cd4e21bf5f1864e424d78142177a2c20688deb948b586110af50c5bec1f0ac69a2f03e11371253180351ac29b1aba45d330d9117c620393055cea3370a2396af28ba5e031199bb446433b5c8423bdb614343ee05b50afd3849e7b1f6b3a61e5c93e50149d7042fac214f64fa89d10be4ad16ad0455bf6f4945d4f953b376c2873759aa689da45090340b804de2b9d06d6586615877f2d3d9790cd78ae592043c1b640b15f5b6a9e3451ecabdb13c8f8076d6563630edfc4ccf46b2a72dbd16d8b62e221a7a0f7a5958fed6405bb6691b1443807a663bc4eba2d4cb44a97abfc446b28c62efc7f0b1dc191545b8ebdfa1bfee2ba596c1cee7150a96cd18882a23758fecafad405e033eb3a2093bfe6d62fec4ca2560a0000\ """ # start-create_tx tx = wally.tx_from_hex( tx_hex, wally.WALLY_TX_FLAG_USE_ELEMENTS | wally.WALLY_TX_FLAG_USE_WITNESS) # end-create_tx # start-unblind asset_generators_in = b'' asset_ids_in = b'' values_in = [] abfs_in = b'' vbfs_in = b'' script_pubkeys_in = [] vouts_in = [] num_outputs = wally.tx_get_num_outputs(tx) for vout in range(num_outputs): script_pubkey_out = wally.tx_get_output_script(tx, vout) if script_pubkey_out != script_pubkey: continue vouts_in.append(vout) sender_ephemeral_pubkey = wally.tx_get_output_nonce(tx, vout) rangeproof = wally.tx_get_output_rangeproof(tx, vout) script_pubkey = wally.tx_get_output_script(tx, vout) asset_id = wally.tx_get_output_asset(tx, vout) value_commitment = wally.tx_get_output_value(tx, vout) script_pubkeys_in.append(script_pubkey) value, asset_id, abf, vbf = wally.asset_unblind( sender_ephemeral_pubkey, private_blinding_key, rangeproof, value_commitment, script_pubkey, asset_id) asset_generator = wally.asset_generator_from_bytes(asset_id, abf) asset_generators_in += asset_generator asset_ids_in += asset_id values_in.append(value) abfs_in += abf vbfs_in += vbf # end-unblind destination_address = "AzpwMmJacz8ngdJszGjNeNBeQ2iu5qNYWpZfkqBoZU6acK6tSbEdpt9PsWdRtcb2pxAQcdTySE4KmhJk" fee = 1000 # arbitrary # start-define_outputs total_in = sum(values_in) output_values = [total_in - fee,] confidential_output_addresses = [destination_address,] output_asset_ids = asset_ids_in[:wally.ASSET_TAG_LEN] # end-define_outputs # start-blinding_factors num_inputs = len(values_in) num_outputs = 1 abfs_out = os.urandom(32 * num_outputs) vbfs_out = os.urandom(32 * (num_outputs - 1)) vbfs_out += wally.asset_final_vbf( values_in + output_values, num_inputs, abfs_in + abfs_out, vbfs_in + vbfs_out) # end-blinding_factors # start-decompose_address blinding_pubkeys = [ wally.confidential_addr_to_ec_public_key( confidential_address, address_prefix) for confidential_address in confidential_output_addresses] non_confidential_addresses = [ wally.confidential_addr_to_addr( confidential_address, address_prefix) for confidential_address in confidential_output_addresses] script_pubkeys = [ wally.address_to_scriptpubkey( non_confidential_address, network) for non_confidential_address in non_confidential_addresses] # end-decompose_address # start-create_output_tx version = 2 locktime = 0 output_tx = wally.tx_init(version, locktime, 0, 0) # end-create_output_tx # start-create_outputs for value, blinding_pubkey, script_pubkey in zip( output_values, blinding_pubkeys, script_pubkeys): abf, abfs_out = abfs_out[:32], abfs_out[32:] vbf, vbfs_out = vbfs_out[:32], vbfs_out[32:] asset_id, output_asset_ids = output_asset_ids[:32], output_asset_ids[32:] generator = wally.asset_generator_from_bytes(asset_id, abf) value_commitment = wally.asset_value_commitment( value, vbf, generator) ephemeral_privkey = os.urandom(32) ephemeral_pubkey = wally.ec_public_key_from_private_key( ephemeral_privkey) rangeproof = wally.asset_rangeproof( value, blinding_pubkey, ephemeral_privkey, asset_id, abf, vbf, value_commitment, script_pubkey, generator, 1, # min_value 0, # exponent 36 # bits ) surjectionproof = wally.asset_surjectionproof( asset_id, abf, generator, os.urandom(32), asset_ids_in, abfs_in, asset_generators_in ) wally.tx_add_elements_raw_output( output_tx, script_pubkey, generator, value_commitment, ephemeral_pubkey, surjectionproof, rangeproof, 0 ) # end-create_outputs # start-add_fee BITCOIN = "5ac9f65c0efcc4775e0baec4ec03abdde22473cd3cf33c0419ca290e0751b225" BITCOIN = wally.hex_to_bytes(BITCOIN)[::-1] wally.tx_add_elements_raw_output( output_tx, None, bytearray([0x01]) + BITCOIN, wally.tx_confidential_value_from_satoshi(fee), None, # nonce None, # surjection proof None, # range proof 0) # end-add_fee # start-sign vout = 0 prev_txid = wally.sha256d(wally.tx_to_bytes(tx, 0)) for vin, script_pubkey in zip(vouts_in, script_pubkeys_in): wally.tx_add_elements_raw_input( output_tx, prev_txid, vin, 0xffffffff, None, # scriptSig None, # witness None, # nonce None, # entropy None, # issuance amount None, # inflation keys None, # issuance amount rangeproof None, # inflation keys rangeproof None, # pegin witness vout) privkey = wally.bip32_key_get_priv_key(wallet_derived_key) pubkey = wally.ec_public_key_from_private_key(privkey) sighash = wally.tx_get_btc_signature_hash( output_tx, vout, script_pubkey, 0, wally.WALLY_SIGHASH_ALL, 0) signature = wally.ec_sig_from_bytes( privkey, sighash, wally.EC_FLAG_ECDSA) scriptsig = wally.scriptsig_p2pkh_from_sig( pubkey, signature, wally.WALLY_SIGHASH_ALL) wally.tx_set_input_script(output_tx, vout, scriptsig) # end-sign # start-to_hex tx_hex = wally.tx_to_hex(output_tx, wally.WALLY_TX_FLAG_USE_WITNESS) # end-to_hex
89.65587
15,249
0.917363
910
22,145
21.901099
0.186813
0.007025
0.004014
0.004817
0.044757
0.037381
0.027396
0.020171
0.013046
0.008329
0
0.464839
0.059246
22,145
246
15,250
90.020325
0.491816
0.031158
0
0.225275
0
0.005495
0.726462
0.718896
0
1
0.000654
0
0
1
0
false
0
0.010989
0
0.010989
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
7
5d8360312fd41e0285a25016eebeef6908ca5298
33
py
Python
test/login.py
amazingSLM/Git
9d1da97310666674b5d1b0efc52bc1eb7f537090
[ "MIT" ]
null
null
null
test/login.py
amazingSLM/Git
9d1da97310666674b5d1b0efc52bc1eb7f537090
[ "MIT" ]
null
null
null
test/login.py
amazingSLM/Git
9d1da97310666674b5d1b0efc52bc1eb7f537090
[ "MIT" ]
null
null
null
a = 1 d = 2 b = 2 e = 3 f = 4
3.666667
5
0.30303
10
33
1
0.9
0
0
0
0
0
0
0
0
0
0
0.333333
0.545455
33
8
6
4.125
0.333333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
5db11d5feb50874aacbb83b446900880191d7ace
3,257
py
Python
tests/test_datasets/test_human_image_dataset.py
mingyuan-zhang/mmhuman3d
0cb3236af31f968115c4316ee15686269d0bfe6c
[ "Apache-2.0" ]
null
null
null
tests/test_datasets/test_human_image_dataset.py
mingyuan-zhang/mmhuman3d
0cb3236af31f968115c4316ee15686269d0bfe6c
[ "Apache-2.0" ]
null
null
null
tests/test_datasets/test_human_image_dataset.py
mingyuan-zhang/mmhuman3d
0cb3236af31f968115c4316ee15686269d0bfe6c
[ "Apache-2.0" ]
null
null
null
import numpy as np from mmhuman3d.data.datasets import HumanImageDataset def test_human_image_dataset(): train_dataset = HumanImageDataset( data_prefix='tests/data', pipeline=[], dataset_name='h36m', ann_file='sample_3dpw_test.npz') data_keys = [ 'img_prefix', 'image_path', 'dataset_name', 'sample_idx', 'bbox_xywh', 'center', 'scale', 'keypoints2d', 'keypoints3d', 'has_smpl', 'smpl_body_pose', 'smpl_global_orient', 'smpl_betas', 'smpl_transl' ] for i, data in enumerate(train_dataset): for key in data_keys: assert key in data num_data = 1 test_dataset = HumanImageDataset( data_prefix='tests/data', pipeline=[], dataset_name='pw3d', body_model=dict( type='SMPL', keypoint_src='smpl_45', keypoint_dst='h36m', model_path='data/body_models/smpl'), ann_file='sample_3dpw_test.npz') test_dataset.num_data = 1 outputs = [{ 'keypoints_3d': np.random.rand(num_data, 17, 3), 'image_idx': np.arange(num_data) }] res = test_dataset.evaluate(outputs, res_folder='tests/data') assert 'MPJPE' in res assert 'MPJPE-PA' in res assert res['MPJPE'] > 0 assert res['MPJPE-PA'] > 0 test_dataset = HumanImageDataset( data_prefix='tests/data', pipeline=[], dataset_name='pw3d', body_model=dict( type='SMPL', keypoint_src='smpl_45', keypoint_dst='smpl_24', model_path='data/body_models/smpl'), ann_file='sample_3dpw_test.npz') test_dataset.num_data = 1 outputs = [{ 'keypoints_3d': np.random.rand(num_data, 24, 3), 'image_idx': np.arange(num_data) }] res = test_dataset.evaluate(outputs, res_folder='tests/data') assert 'MPJPE' in res assert 'MPJPE-PA' in res assert res['MPJPE'] > 0 assert res['MPJPE-PA'] > 0 test_dataset = HumanImageDataset( data_prefix='tests/data', pipeline=[], dataset_name='pw3d', body_model=dict( type='SMPL', keypoint_src='smpl_45', keypoint_dst='smpl_49', model_path='data/body_models/smpl'), ann_file='sample_3dpw_test.npz') test_dataset.num_data = 1 outputs = [{ 'keypoints_3d': np.random.rand(num_data, 49, 3), 'image_idx': np.arange(num_data) }] res = test_dataset.evaluate(outputs, res_folder='tests/data') assert 'MPJPE' in res assert 'MPJPE-PA' in res assert res['MPJPE'] > 0 assert res['MPJPE-PA'] > 0 def test_human_image_dataset_smc(): # test loading smc train_dataset = HumanImageDataset( data_prefix='tests/data', pipeline=[], dataset_name='humman', ann_file='sample_humman_test_iphone_ds10.npz') data_keys = [ 'img_prefix', 'image_path', 'image_id', 'dataset_name', 'sample_idx', 'bbox_xywh', 'center', 'scale', 'keypoints2d', 'keypoints3d', 'has_smpl', 'smpl_body_pose', 'smpl_global_orient', 'smpl_betas', 'smpl_transl' ] for i, data in enumerate(train_dataset): for key in data_keys: assert key in data
31.621359
78
0.607614
404
3,257
4.613861
0.20297
0.037554
0.035408
0.091202
0.918455
0.892704
0.881438
0.850322
0.850322
0.850322
0
0.020859
0.264047
3,257
102
79
31.931373
0.756779
0.004913
0
0.75
0
0
0.237419
0.029948
0
0
0
0
0.152174
1
0.021739
false
0
0.021739
0
0.043478
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
5dc26b2b72e61f007a2d08fbcf39627fa8f29508
11,455
py
Python
scripts/main_wmf.py
RACT-CF/RaCT
ced06c9e3398184c82aa42d5eb0cd5679c905375
[ "Apache-2.0" ]
36
2019-06-12T16:35:24.000Z
2022-02-18T02:17:03.000Z
scripts/main_wmf.py
RACT-CF/RaCT
ced06c9e3398184c82aa42d5eb0cd5679c905375
[ "Apache-2.0" ]
1
2019-08-07T06:49:33.000Z
2020-06-20T19:04:50.000Z
scripts/main_wmf.py
RACT-CF/RaCT
ced06c9e3398184c82aa42d5eb0cd5679c905375
[ "Apache-2.0" ]
6
2019-11-19T05:33:59.000Z
2021-05-05T15:44:20.000Z
import sys import os UTILS_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'utils') sys.path.insert(1, UTILS_DIR) from training import train, test if __name__ == '__main__': """ This assumes a pretrained actor at the actor-path. """ BREAK_EARLY = False BATCH_SIZE = 500 for data_subdir in ['ml-20m', 'netflix-prize', 'msd']: actor_path = "WMF_ACTOR_TRAIN_{}".format(data_subdir) train( model_class='wmf', data_subdir=data_subdir, n_epochs_pred_only=100, n_epochs_ac_only=0, n_epochs_pred_and_ac=0, max_kl=0.2, ac_reg_loss_scaler=0.0, actor_reg_loss_scaler=0.0001, evaluation_metric="NDCG", logging_frequency=50, batch_size=BATCH_SIZE, break_early=BREAK_EARLY, verbose=False, positive_weights=5.0, version_tag="FULL_RUN_ON_OTHER_DATASETS", path_to_save_actor=actor_path, log_critic_training_error=False, ) print("Now, hopefully on to testing...") test( model_class='wmf', data_subdir=data_subdir, n_epochs_pred_only=100, n_epochs_ac_only=0, n_epochs_pred_and_ac=0, max_kl=0.2, ac_reg_loss_scaler=0.0, actor_reg_loss_scaler=0.0001, evaluation_metric="NDCG", batch_size=BATCH_SIZE, break_early=BREAK_EARLY, verbose=False, positive_weights=5.0, version_tag="FULL_RUN_ON_OTHER_DATASETS", ) print("On to round 2! Now we'll do the critic.") train( model_class='wmf', data_subdir=data_subdir, n_epochs_pred_only=0, n_epochs_ac_only=50, n_epochs_pred_and_ac=50, max_kl=0.2, ac_reg_loss_scaler=0.0, actor_reg_loss_scaler=0.0001, evaluation_metric="NDCG", logging_frequency=50, batch_size=BATCH_SIZE, break_early=BREAK_EARLY, verbose=False, positive_weights=5.0, version_tag="FULL_RUN_ON_OTHER_DATASETS", restore_trained_actor_path=actor_path, ) print("Now, hopefully on to testing...") test( model_class='wmf', data_subdir=data_subdir, n_epochs_pred_only=0, n_epochs_ac_only=50, n_epochs_pred_and_ac=50, max_kl=0.2, ac_reg_loss_scaler=0.0, actor_reg_loss_scaler=0.0001, evaluation_metric="NDCG", batch_size=BATCH_SIZE, break_early=BREAK_EARLY, verbose=False, positive_weights=5.0, version_tag="FULL_RUN_ON_OTHER_DATASETS", restore_trained_actor_path=actor_path, ) print("Bye bye") exit() # train( # model_class="wmf", # # model_class='multi_vae', # # model_class='warp_encoder', # n_epochs_pred_only=200, # n_epochs_ac_only=0, # n_epochs_pred_and_ac=0, # epochs_to_anneal_over=100, # # min_kl=0.0001, # max_kl=0.0, # ac_reg_loss_scaler=0.0, # actor_reg_loss_scaler=0.0001, # positive_weights=5, # # evaluation_metric='AP', # evaluation_metric="NDCG", # # logging_frequency=25, # # logging_frequency=50, # logging_frequency=50, # batch_size=500, # # batch_size=25, # break_early=False, # verbose=False, # # path_to_save_actor="best_ndcg_trained_150_epochs", # # path_to_save_last_actor="last_actor_after_150_trained_epochs", # version_tag="WMF_VANILLA", # path_to_save_actor="BEST_VANILLA_WMF_MODEL", # # restore_trained_actor_path="last_actor_after_150_trained_epochs" # ) # print("Now, hopefully on to testing...") # test( # model_class="wmf", # # model_class='multi_vae', # # model_class='warp_encoder', # n_epochs_pred_only=200, # n_epochs_ac_only=0, # n_epochs_pred_and_ac=0, # epochs_to_anneal_over=100, # # min_kl=0.0001, # max_kl=0.0, # ac_reg_loss_scaler=0.0, # actor_reg_loss_scaler=0.0001, # positive_weights=5, # # evaluation_metric='AP', # evaluation_metric="NDCG", # # logging_frequency=25, # # logging_frequency=50, # # logging_frequency=50, # batch_size=500, # # batch_size=25, # break_early=False, # verbose=False, # # path_to_save_actor="best_ndcg_trained_150_epochs", # # path_to_save_last_actor="last_actor_after_150_trained_epochs", # version_tag="WMF_VANILLA", # # path_to_save_actor="BEST_VANILLA_WMF_MODEL", # # restore_trained_actor_path="last_actor_after_150_trained_epochs" # ) # print("I hope it gets here successfully.") # print("NOW ON TO DOING IT WITH THE CRITIC") # train( # model_class="wmf", # # model_class='multi_vae', # # model_class='warp_encoder', # n_epochs_pred_only=0, # n_epochs_ac_only=50, # n_epochs_pred_and_ac=100, # epochs_to_anneal_over=100, # # min_kl=0.0001, # max_kl=0.0, # ac_reg_loss_scaler=0.0, # actor_reg_loss_scaler=0.0001, # positive_weights=5, # # evaluation_metric='AP', # evaluation_metric="NDCG", # # logging_frequency=25, # # logging_frequency=50, # logging_frequency=50, # batch_size=500, # # batch_size=25, # break_early=False, # verbose=False, # # path_to_save_actor="best_ndcg_trained_150_epochs", # # path_to_save_last_actor="last_actor_after_150_trained_epochs", # version_tag="WMF_WITH_CRITIC", # # path_to_save_actor="BEST_VANILLA_WMF_MODEL", # restore_trained_actor_path="BEST_VANILLA_WMF_MODEL" # ) # print("Now, hopefully on to testing...") # test( # model_class="wmf", # # model_class='multi_vae', # # model_class='warp_encoder', # n_epochs_pred_only=0, # n_epochs_ac_only=50, # n_epochs_pred_and_ac=100, # epochs_to_anneal_over=100, # # min_kl=0.0001, # max_kl=0.0, # ac_reg_loss_scaler=0.0, # actor_reg_loss_scaler=0.0001, # positive_weights=5, # # evaluation_metric='AP', # evaluation_metric="NDCG", # # logging_frequency=25, # # logging_frequency=50, # # logging_frequency=50, # batch_size=500, # # batch_size=25, # break_early=False, # verbose=False, # # path_to_save_actor="best_ndcg_trained_150_epochs", # # path_to_save_last_actor="last_actor_after_150_trained_epochs", # version_tag="WMF_WITH_CRITIC", # # path_to_save_actor="BEST_VANILLA_WMF_MODEL", # restore_trained_actor_path="BEST_VANILLA_WMF_MODEL" # ) # print("I hope it gets here successfully.") # for positive_weights in [2.0, 5.0, 10.0, 30.0, 50.0, 100.0]: # train( # model_class="wmf", # # model_class='multi_vae', # # model_class='warp_encoder', # n_epochs_pred_only=50, # n_epochs_ac_only=0, # n_epochs_pred_and_ac=0, # epochs_to_anneal_over=50, # max_kl=0.2, # ac_reg_loss_scaler=0.0005, # actor_reg_loss_scaler=0.00001, # positive_weights=positive_weights, # # evaluation_metric='AP', # evaluation_metric="NDCG", # # logging_frequency=25, # # logging_frequency=50, # logging_frequency=50, # batch_size=500, # # batch_size=25, # break_early=False, # verbose=False, # # path_to_save_actor="best_ndcg_trained_150_epochs", # # path_to_save_last_actor="last_actor_after_150_trained_epochs", # version_tag="making_one_trained_on_each_eval_metric", # # path_to_save_actor="test_actor_save", # # restore_trained_actor_path="last_actor_after_150_trained_epochs" # ) # exit("Exiting gracefully!") # # train( # # model_class='multi_vae', # # # model_class='warp_encoder', # # n_epochs_pred_only=0, # # n_epochs_ac_only=50, # # n_epochs_pred_and_ac=100, # # epochs_to_anneal_over=50, # # max_kl=0.2, # # ac_reg_loss_scaler=0.0005, # # # evaluation_metric='AP', # # evaluation_metric="NDCG", # # # logging_frequency=25, # # # logging_frequency=50, # # logging_frequency=50, # # batch_size=500, # # # batch_size=25, # # break_early=False, # # verbose=False, # # # path_to_save_actor="best_ndcg_trained_150_epochs", # # # path_to_save_last_actor="last_actor_after_150_trained_epochs", # # version_tag="making_one_trained_on_each_eval_metric", # # # path_to_save_actor="test_actor_save", # # restore_trained_actor_path="last_actor_after_150_trained_epochs" # # ) # print("Just for good measure, I'm going to run the test function too.") # test( # model_class='multi_vae', # # model_class='warp_encoder', # n_epochs_pred_only=0, # n_epochs_ac_only=50, # n_epochs_pred_and_ac=100, # epochs_to_anneal_over=50, # max_kl=0.2, # ac_reg_loss_scaler=0.0005, # # evaluation_metric='AP', # evaluation_metric="NDCG", # # logging_frequency=25, # # logging_frequency=50, # # logging_frequency=50, # batch_size=500, # # batch_size=25, # break_early=False, # verbose=False, # # path_to_save_actor="best_ndcg_trained_150_epochs", # # path_to_save_last_actor="last_actor_after_150_trained_epochs", # version_tag="making_one_trained_on_each_eval_metric", # # path_to_save_actor="test_actor_save", # restore_trained_actor_path="last_actor_after_150_trained_epochs" # ) # exit("Bye bye now! I doubt it will make it here, but a man can dream.") # for ac_reg_loss_scaler in [0.0, 1e-3, 1e-2, 1e-1]: # train( # model_class='multi_vae', # # model_class='warp_encoder', # n_epochs_pred_only=0, # n_epochs_ac_only=50, # n_epochs_pred_and_ac=50, # epochs_to_anneal_over=50, # max_kl=0.2, # # evaluation_metric='AP', # evaluation_metric="NDCG", # # logging_frequency=25, # logging_frequency=50, # batch_size=500, # # batch_size=25, # break_early=False, # verbose=False, # ac_reg_loss_scaler=ac_reg_loss_scaler, # version_tag="hyperparameter_ac_reg", # # path_to_save_actor="best_ndcg_trained_100_epochs", # # path_to_save_last_actor="last_actor_after_100_trained_epochs", # # path_to_save_actor="test_actor_save", # restore_trained_actor_path="best_ndcg_trained_100_epochs", # )
33.592375
83
0.586556
1,422
11,455
4.235584
0.101266
0.04184
0.041508
0.046488
0.888262
0.880624
0.877636
0.863689
0.863689
0.852731
0
0.050805
0.305805
11,455
340
84
33.691176
0.706615
0.613706
0
0.776471
0
0
0.073092
0.025768
0
0
0
0
0
1
0
false
0
0.035294
0
0.035294
0.047059
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
f8f3fce0b13b395f03924a61ea9553f638e33d9e
66
py
Python
tests/testfunc.py
jmriego/queick
24dcdb2a62ac1ebe8e10b3997aea909b674e704c
[ "MIT" ]
23
2020-11-08T03:41:14.000Z
2022-03-05T15:41:28.000Z
tests/testfunc.py
jmriego/queick
24dcdb2a62ac1ebe8e10b3997aea909b674e704c
[ "MIT" ]
1
2021-07-22T21:58:32.000Z
2021-08-10T10:42:13.000Z
tests/testfunc.py
jmriego/queick
24dcdb2a62ac1ebe8e10b3997aea909b674e704c
[ "MIT" ]
2
2021-04-28T11:53:05.000Z
2021-12-07T21:37:10.000Z
def func(arg): pass def func_return_arg(arg): return arg
11
25
0.666667
11
66
3.818182
0.454545
0.333333
0
0
0
0
0
0
0
0
0
0
0.242424
66
5
26
13.2
0.84
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.25
0
0.25
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
7
5d638f615d20a3cd732102aa419e83f0f29fafbe
481
py
Python
src/radical/entk/utils/__init__.py
radical-cybertools/radical.entk
9b912c8f5f7aa61083d07662d209a888dd08f77a
[ "MIT" ]
15
2018-02-09T10:10:34.000Z
2021-11-16T07:52:45.000Z
src/radical/entk/utils/__init__.py
radical-cybertools/radical.entk
9b912c8f5f7aa61083d07662d209a888dd08f77a
[ "MIT" ]
418
2017-11-21T18:25:19.000Z
2022-03-31T23:26:35.000Z
src/radical/entk/utils/__init__.py
radical-cybertools/radical.entk
9b912c8f5f7aa61083d07662d209a888dd08f77a
[ "MIT" ]
11
2018-12-29T07:18:24.000Z
2021-02-10T19:43:13.000Z
# ------------------------------------------------------------------------------ # from .prof_utils import get_hostmap from .prof_utils import get_hostmap_deprecated from .prof_utils import get_session_profile from .prof_utils import write_session_description from .prof_utils import get_session_description from .prof_utils import write_workflows # ------------------------------------------------------------------------------
34.357143
80
0.488565
40
481
5.475
0.3
0.219178
0.356164
0.520548
0.881279
0.748858
0
0
0
0
0
0
0.168399
481
13
81
37
0.5475
0.326403
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
1
1
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
0
1
0
1
0
0
8
5d6badb27f8ee8d086769a74cae72a87ac6f22ad
6,407
py
Python
loldib/getratings/models/NA/na_yasuo/na_yasuo_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_yasuo/na_yasuo_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_yasuo/na_yasuo_mid.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_Yasuo_Mid_Aatrox(Ratings): pass class NA_Yasuo_Mid_Ahri(Ratings): pass class NA_Yasuo_Mid_Akali(Ratings): pass class NA_Yasuo_Mid_Alistar(Ratings): pass class NA_Yasuo_Mid_Amumu(Ratings): pass class NA_Yasuo_Mid_Anivia(Ratings): pass class NA_Yasuo_Mid_Annie(Ratings): pass class NA_Yasuo_Mid_Ashe(Ratings): pass class NA_Yasuo_Mid_AurelionSol(Ratings): pass class NA_Yasuo_Mid_Azir(Ratings): pass class NA_Yasuo_Mid_Bard(Ratings): pass class NA_Yasuo_Mid_Blitzcrank(Ratings): pass class NA_Yasuo_Mid_Brand(Ratings): pass class NA_Yasuo_Mid_Braum(Ratings): pass class NA_Yasuo_Mid_Caitlyn(Ratings): pass class NA_Yasuo_Mid_Camille(Ratings): pass class NA_Yasuo_Mid_Cassiopeia(Ratings): pass class NA_Yasuo_Mid_Chogath(Ratings): pass class NA_Yasuo_Mid_Corki(Ratings): pass class NA_Yasuo_Mid_Darius(Ratings): pass class NA_Yasuo_Mid_Diana(Ratings): pass class NA_Yasuo_Mid_Draven(Ratings): pass class NA_Yasuo_Mid_DrMundo(Ratings): pass class NA_Yasuo_Mid_Ekko(Ratings): pass class NA_Yasuo_Mid_Elise(Ratings): pass class NA_Yasuo_Mid_Evelynn(Ratings): pass class NA_Yasuo_Mid_Ezreal(Ratings): pass class NA_Yasuo_Mid_Fiddlesticks(Ratings): pass class NA_Yasuo_Mid_Fiora(Ratings): pass class NA_Yasuo_Mid_Fizz(Ratings): pass class NA_Yasuo_Mid_Galio(Ratings): pass class NA_Yasuo_Mid_Gangplank(Ratings): pass class NA_Yasuo_Mid_Garen(Ratings): pass class NA_Yasuo_Mid_Gnar(Ratings): pass class NA_Yasuo_Mid_Gragas(Ratings): pass class NA_Yasuo_Mid_Graves(Ratings): pass class NA_Yasuo_Mid_Hecarim(Ratings): pass class NA_Yasuo_Mid_Heimerdinger(Ratings): pass class NA_Yasuo_Mid_Illaoi(Ratings): pass class NA_Yasuo_Mid_Irelia(Ratings): pass class NA_Yasuo_Mid_Ivern(Ratings): pass class NA_Yasuo_Mid_Janna(Ratings): pass class NA_Yasuo_Mid_JarvanIV(Ratings): pass class NA_Yasuo_Mid_Jax(Ratings): pass class NA_Yasuo_Mid_Jayce(Ratings): pass class NA_Yasuo_Mid_Jhin(Ratings): pass class NA_Yasuo_Mid_Jinx(Ratings): pass class NA_Yasuo_Mid_Kalista(Ratings): pass class NA_Yasuo_Mid_Karma(Ratings): pass class NA_Yasuo_Mid_Karthus(Ratings): pass class NA_Yasuo_Mid_Kassadin(Ratings): pass class NA_Yasuo_Mid_Katarina(Ratings): pass class NA_Yasuo_Mid_Kayle(Ratings): pass class NA_Yasuo_Mid_Kayn(Ratings): pass class NA_Yasuo_Mid_Kennen(Ratings): pass class NA_Yasuo_Mid_Khazix(Ratings): pass class NA_Yasuo_Mid_Kindred(Ratings): pass class NA_Yasuo_Mid_Kled(Ratings): pass class NA_Yasuo_Mid_KogMaw(Ratings): pass class NA_Yasuo_Mid_Leblanc(Ratings): pass class NA_Yasuo_Mid_LeeSin(Ratings): pass class NA_Yasuo_Mid_Leona(Ratings): pass class NA_Yasuo_Mid_Lissandra(Ratings): pass class NA_Yasuo_Mid_Lucian(Ratings): pass class NA_Yasuo_Mid_Lulu(Ratings): pass class NA_Yasuo_Mid_Lux(Ratings): pass class NA_Yasuo_Mid_Malphite(Ratings): pass class NA_Yasuo_Mid_Malzahar(Ratings): pass class NA_Yasuo_Mid_Maokai(Ratings): pass class NA_Yasuo_Mid_MasterYi(Ratings): pass class NA_Yasuo_Mid_MissFortune(Ratings): pass class NA_Yasuo_Mid_MonkeyKing(Ratings): pass class NA_Yasuo_Mid_Mordekaiser(Ratings): pass class NA_Yasuo_Mid_Morgana(Ratings): pass class NA_Yasuo_Mid_Nami(Ratings): pass class NA_Yasuo_Mid_Nasus(Ratings): pass class NA_Yasuo_Mid_Nautilus(Ratings): pass class NA_Yasuo_Mid_Nidalee(Ratings): pass class NA_Yasuo_Mid_Nocturne(Ratings): pass class NA_Yasuo_Mid_Nunu(Ratings): pass class NA_Yasuo_Mid_Olaf(Ratings): pass class NA_Yasuo_Mid_Orianna(Ratings): pass class NA_Yasuo_Mid_Ornn(Ratings): pass class NA_Yasuo_Mid_Pantheon(Ratings): pass class NA_Yasuo_Mid_Poppy(Ratings): pass class NA_Yasuo_Mid_Quinn(Ratings): pass class NA_Yasuo_Mid_Rakan(Ratings): pass class NA_Yasuo_Mid_Rammus(Ratings): pass class NA_Yasuo_Mid_RekSai(Ratings): pass class NA_Yasuo_Mid_Renekton(Ratings): pass class NA_Yasuo_Mid_Rengar(Ratings): pass class NA_Yasuo_Mid_Riven(Ratings): pass class NA_Yasuo_Mid_Rumble(Ratings): pass class NA_Yasuo_Mid_Ryze(Ratings): pass class NA_Yasuo_Mid_Sejuani(Ratings): pass class NA_Yasuo_Mid_Shaco(Ratings): pass class NA_Yasuo_Mid_Shen(Ratings): pass class NA_Yasuo_Mid_Shyvana(Ratings): pass class NA_Yasuo_Mid_Singed(Ratings): pass class NA_Yasuo_Mid_Sion(Ratings): pass class NA_Yasuo_Mid_Sivir(Ratings): pass class NA_Yasuo_Mid_Skarner(Ratings): pass class NA_Yasuo_Mid_Sona(Ratings): pass class NA_Yasuo_Mid_Soraka(Ratings): pass class NA_Yasuo_Mid_Swain(Ratings): pass class NA_Yasuo_Mid_Syndra(Ratings): pass class NA_Yasuo_Mid_TahmKench(Ratings): pass class NA_Yasuo_Mid_Taliyah(Ratings): pass class NA_Yasuo_Mid_Talon(Ratings): pass class NA_Yasuo_Mid_Taric(Ratings): pass class NA_Yasuo_Mid_Teemo(Ratings): pass class NA_Yasuo_Mid_Thresh(Ratings): pass class NA_Yasuo_Mid_Tristana(Ratings): pass class NA_Yasuo_Mid_Trundle(Ratings): pass class NA_Yasuo_Mid_Tryndamere(Ratings): pass class NA_Yasuo_Mid_TwistedFate(Ratings): pass class NA_Yasuo_Mid_Twitch(Ratings): pass class NA_Yasuo_Mid_Udyr(Ratings): pass class NA_Yasuo_Mid_Urgot(Ratings): pass class NA_Yasuo_Mid_Varus(Ratings): pass class NA_Yasuo_Mid_Vayne(Ratings): pass class NA_Yasuo_Mid_Veigar(Ratings): pass class NA_Yasuo_Mid_Velkoz(Ratings): pass class NA_Yasuo_Mid_Vi(Ratings): pass class NA_Yasuo_Mid_Viktor(Ratings): pass class NA_Yasuo_Mid_Vladimir(Ratings): pass class NA_Yasuo_Mid_Volibear(Ratings): pass class NA_Yasuo_Mid_Warwick(Ratings): pass class NA_Yasuo_Mid_Xayah(Ratings): pass class NA_Yasuo_Mid_Xerath(Ratings): pass class NA_Yasuo_Mid_XinZhao(Ratings): pass class NA_Yasuo_Mid_Yasuo(Ratings): pass class NA_Yasuo_Mid_Yorick(Ratings): pass class NA_Yasuo_Mid_Zac(Ratings): pass class NA_Yasuo_Mid_Zed(Ratings): pass class NA_Yasuo_Mid_Ziggs(Ratings): pass class NA_Yasuo_Mid_Zilean(Ratings): pass class NA_Yasuo_Mid_Zyra(Ratings): pass
15.364508
46
0.761667
972
6,407
4.59465
0.151235
0.216301
0.370802
0.463502
0.797582
0.797582
0
0
0
0
0
0
0.173404
6,407
416
47
15.401442
0.843278
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
53a3677a4a0313560dc9d10428fce5a78c30854a
799
py
Python
app/articles_model.py
KaranjaK/News-Api
f8543a4a625b530c58b5f42eebaf3562cbe2fea5
[ "Unlicense" ]
null
null
null
app/articles_model.py
KaranjaK/News-Api
f8543a4a625b530c58b5f42eebaf3562cbe2fea5
[ "Unlicense" ]
null
null
null
app/articles_model.py
KaranjaK/News-Api
f8543a4a625b530c58b5f42eebaf3562cbe2fea5
[ "Unlicense" ]
null
null
null
class Articles: def __init__(self, id, name, title, urlToImage, author, url, publishedAt, description): self.id = id self.name = name self.title = title self.urlToImage = urlToImage self.author = author self.url = url self.publishedAt = publishedAt self.description = description class Display: articles_display = [] def __init__(self, id, name, title, urlToImage, author, url, publishedAt, description): self.id = id self.name = name self.title = title self.urlToImage = urlToImage self.author = author self.url = url self.publishedAt = publishedAt self.description = description def save_display(self): Display.articles_display.append(self)
28.535714
91
0.624531
85
799
5.741176
0.188235
0.04918
0.045082
0.053279
0.815574
0.815574
0.815574
0.815574
0.815574
0.815574
0
0
0.292866
799
28
92
28.535714
0.863717
0
0
0.782609
0
0
0
0
0
0
0
0
0
1
0.130435
false
0
0
0
0.26087
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
53b485d0a5a5ee55998acce762c88863e8ffc43a
5,234
py
Python
tests/test_observable/test_ifthen.py
Affirm/RxPY
7c23939ea497761c85b382257f9f0954998ab91e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/test_observable/test_ifthen.py
Affirm/RxPY
7c23939ea497761c85b382257f9f0954998ab91e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/test_observable/test_ifthen.py
Affirm/RxPY
7c23939ea497761c85b382257f9f0954998ab91e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import unittest from rx.core import Observable from rx.testing import TestScheduler, ReactiveTest on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe subscribed = ReactiveTest.subscribed disposed = ReactiveTest.disposed created = ReactiveTest.created class TestIf_then(unittest.TestCase): def test_if_true(self): scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(210, 1), on_next(250, 2), on_completed(300)) ys = scheduler.create_hot_observable(on_next(310, 3), on_next(350, 4), on_completed(400)) def create(): return Observable.if_then(lambda: True, xs, ys) results = scheduler.start(create=create) results.messages.assert_equal(on_next(210, 1), on_next(250, 2), on_completed(300)) xs.subscriptions.assert_equal(subscribe(200, 300)) ys.subscriptions.assert_equal() def test_if_false(self): scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(210, 1), on_next(250, 2), on_completed(300)) ys = scheduler.create_hot_observable(on_next(310, 3), on_next(350, 4), on_completed(400)) def create(): return Observable.if_then(lambda: False, xs, ys) results = scheduler.start(create=create) results.messages.assert_equal(on_next(310, 3), on_next(350, 4), on_completed(400)) xs.subscriptions.assert_equal() ys.subscriptions.assert_equal(subscribe(200, 400)) def test_if_throw(self): ex = 'ex' scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(210, 1), on_next(250, 2), on_completed(300)) ys = scheduler.create_hot_observable(on_next(310, 3), on_next(350, 4), on_completed(400)) def create(): def condition(): raise Exception(ex) return Observable.if_then(condition, xs, ys) results = scheduler.start(create=create) results.messages.assert_equal(on_error(200, ex)) xs.subscriptions.assert_equal() ys.subscriptions.assert_equal() def test_if_dispose(self): scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(210, 1), on_next(250, 2)) ys = scheduler.create_hot_observable(on_next(310, 3), on_next(350, 4), on_completed(400)) def create(): return Observable.if_then(lambda: True, xs, ys) results = scheduler.start(create=create) results.messages.assert_equal(on_next(210, 1), on_next(250, 2)) xs.subscriptions.assert_equal(subscribe(200, 1000)) ys.subscriptions.assert_equal() def test_if_default_completed(self): b = [False] scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(110, 1), on_next(220, 2), on_next(330, 3), on_completed(440)) def action(scheduler, state): b[0] = True scheduler.schedule_absolute(150, action) def create(): def condition(): return b[0] return Observable.if_then(condition, xs) results = scheduler.start(create) results.messages.assert_equal(on_next(220, 2), on_next(330, 3), on_completed(440)) xs.subscriptions.assert_equal(subscribe(200, 440)) def test_if_default_error(self): ex = 'ex' b = [False] scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(110, 1), on_next(220, 2), on_next(330, 3), on_error(440, ex)) def action(scheduler, state): b[0] = True scheduler.schedule_absolute(150, action) def create(): def condition(): return b[0] return Observable.if_then(condition, xs) results = scheduler.start(create) results.messages.assert_equal(on_next(220, 2), on_next(330, 3), on_error(440, ex)) xs.subscriptions.assert_equal(subscribe(200, 440)) def test_if_default_never(self): b = [False] scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(110, 1), on_next(220, 2), on_next(330, 3)) def action(scheduler, state): b[0] = True scheduler.schedule_absolute(150, action) def create(): def condition(): return b[0] return Observable.if_then(condition, xs) results = scheduler.start(create) results.messages.assert_equal(on_next(220, 2), on_next(330, 3)) xs.subscriptions.assert_equal(subscribe(200, 1000)) def test_if_default_other(self): b = [True] scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(110, 1), on_next(220, 2), on_next(330, 3), on_error(440, 'ex')) def action(scheduler, state): b[0] = False scheduler.schedule_absolute(150, action) def create(): def condition(): return b[0] return Observable.if_then(condition, xs) results = scheduler.start(create) results.messages.assert_equal(on_completed(200)) xs.subscriptions.assert_equal()
36.601399
116
0.644822
667
5,234
4.851574
0.107946
0.077874
0.066749
0.103832
0.840544
0.836218
0.814895
0.764524
0.732386
0.732386
0
0.067003
0.241498
5,234
142
117
36.859155
0.748111
0
0
0.648649
0
0
0.001146
0
0
0
0
0
0.18018
1
0.225225
false
0
0.027027
0.063063
0.369369
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
7
53c819d16e5903ff0f9ac2eaa106a97b18074fd1
1,484
py
Python
libStash/books/migrations/0013_auto_20201030_0228.py
Dev-Rem/libStash
a364e9997c1c91b09f5db8a004deb4df305fa8cf
[ "MIT" ]
null
null
null
libStash/books/migrations/0013_auto_20201030_0228.py
Dev-Rem/libStash
a364e9997c1c91b09f5db8a004deb4df305fa8cf
[ "MIT" ]
null
null
null
libStash/books/migrations/0013_auto_20201030_0228.py
Dev-Rem/libStash
a364e9997c1c91b09f5db8a004deb4df305fa8cf
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-10-30 02:28 import uuid from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0012_auto_20201027_2053'), ] operations = [ migrations.AlterField( model_name='author', name='unique_id', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='book', name='unique_id', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='image', name='unique_id', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='publisher', name='unique_id', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='warehouse', name='unique_id', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), migrations.AlterField( model_name='warehousebook', name='unique_id', field=models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True), ), ]
32.26087
99
0.600404
157
1,484
5.541401
0.286624
0.137931
0.172414
0.2
0.732184
0.732184
0.732184
0.732184
0.732184
0.732184
0
0.034677
0.280997
1,484
45
100
32.977778
0.780694
0.030323
0
0.631579
1
0
0.089074
0.016006
0
0
0
0
0
1
0
false
0
0.052632
0
0.131579
0
0
0
0
null
0
0
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
53d076995b73c97d627ca3cb9996a04897bb88d2
82
py
Python
python/module/cpptools/__init__.py
DerThorsten/cpptools
3664e7d3b14536340d2e078ff72266665936a952
[ "MIT" ]
7
2019-11-13T19:17:26.000Z
2021-07-12T09:02:57.000Z
python/module/cpptools/__init__.py
DerThorsten/cpptools
3664e7d3b14536340d2e078ff72266665936a952
[ "MIT" ]
null
null
null
python/module/cpptools/__init__.py
DerThorsten/cpptools
3664e7d3b14536340d2e078ff72266665936a952
[ "MIT" ]
2
2021-03-19T19:16:57.000Z
2021-07-11T20:07:51.000Z
from . _cpptools import * def pure_python(): """ hello """ pass
9.111111
25
0.512195
8
82
5
1
0
0
0
0
0
0
0
0
0
0
0
0.353659
82
9
26
9.111111
0.754717
0.060976
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0.333333
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
1
0
1
0
0
7
53e138e7365ebe81bca48bdf3cf78902a0bdbf4d
166
py
Python
krlparser/helper.py
d4nuu8/krlparser
4fad417349821f67442a94f51e4f652ad3635cc0
[ "MIT" ]
8
2019-09-30T20:11:41.000Z
2021-07-01T01:24:30.000Z
krlparser/helper.py
d4nuu8/krlparser
4fad417349821f67442a94f51e4f652ad3635cc0
[ "MIT" ]
null
null
null
krlparser/helper.py
d4nuu8/krlparser
4fad417349821f67442a94f51e4f652ad3635cc0
[ "MIT" ]
3
2019-12-24T08:16:23.000Z
2021-04-01T14:09:49.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re def camel_to_snake(camel_string): return re.sub("([A-Z]+)", r"_\1", camel_string).lstrip("_").lower()
18.444444
71
0.620482
26
166
3.730769
0.846154
0.226804
0
0
0
0
0
0
0
0
0
0.020833
0.13253
166
8
72
20.75
0.652778
0.259036
0
0
0
0
0.099174
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
7
4ad230623d270e4ae9d01f089942bd9187ca3110
114
py
Python
test_core.py
danielhuppmann/lecture-fall-2020
aaf2d18e69d2c3ea16fccf5bdf8d74c1e41e5d2c
[ "Apache-2.0" ]
null
null
null
test_core.py
danielhuppmann/lecture-fall-2020
aaf2d18e69d2c3ea16fccf5bdf8d74c1e41e5d2c
[ "Apache-2.0" ]
null
null
null
test_core.py
danielhuppmann/lecture-fall-2020
aaf2d18e69d2c3ea16fccf5bdf8d74c1e41e5d2c
[ "Apache-2.0" ]
2
2020-11-04T09:27:06.000Z
2020-11-06T09:48:11.000Z
from core import foo def test_foo(): assert foo(2) == 3 def test_foo_two_args(): assert foo(2, 3) == 6
12.666667
25
0.622807
21
114
3.190476
0.571429
0.208955
0.298507
0.328358
0
0
0
0
0
0
0
0.05814
0.245614
114
8
26
14.25
0.72093
0
0
0
0
0
0
0
0
0
0
0
0.4
1
0.4
true
0
0.2
0
0.6
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
1
0
0
0
1
0
0
8
ab1d7401da6fda58d3a067f585f5a6508c43f6d8
206
py
Python
traces/operations.py
CompGeoInc/traces
f309da9c37f705e2f51cf5b1c6c8163d81e369eb
[ "MIT" ]
502
2015-11-09T21:12:45.000Z
2022-03-23T14:40:14.000Z
traces/operations.py
CompGeoInc/traces
f309da9c37f705e2f51cf5b1c6c8163d81e369eb
[ "MIT" ]
149
2015-03-31T16:17:04.000Z
2022-03-25T13:07:31.000Z
traces/operations.py
CompGeoInc/traces
f309da9c37f705e2f51cf5b1c6c8163d81e369eb
[ "MIT" ]
73
2015-12-07T21:44:06.000Z
2022-01-13T17:33:06.000Z
from traces import decorators @decorators.ignorant def ignorant_sum(*args, **kwargs): return sum(*args, **kwargs) @decorators.strict def strict_sum(*args, **kwargs): return sum(*args, **kwargs)
17.166667
34
0.708738
26
206
5.538462
0.423077
0.194444
0.361111
0.263889
0.444444
0.444444
0.444444
0
0
0
0
0
0.145631
206
11
35
18.727273
0.818182
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
true
0
0.142857
0.285714
0.714286
0
1
0
0
null
0
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
1
0
0
1
1
0
0
7
db87659f9f7d3c394ec79014d2b94d460169a1e5
22
py
Python
Chapter 04/ch41n.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 04/ch41n.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
Chapter 04/ch41n.py
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
f6a4194684515495d00aa38347a725dd08f39a0c
[ "MIT" ]
null
null
null
print(10<<3>>4) #5
7.333333
17
0.454545
5
22
2
1
0
0
0
0
0
0
0
0
0
0
0.294118
0.227273
22
3
18
7.333333
0.294118
0.045455
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
7
dbdabae6f8f2af6ffb63b33c2eb4fab8acbb9777
1,155
py
Python
tests/test_engine/test_update/test_update_setOnInsert.py
bobuk/montydb
9ee299e7f1d3a7236abb683e0dfe4f7817859b2c
[ "BSD-3-Clause" ]
478
2019-07-31T00:48:11.000Z
2022-03-18T09:12:29.000Z
tests/test_engine/test_update/test_update_setOnInsert.py
bobuk/montydb
9ee299e7f1d3a7236abb683e0dfe4f7817859b2c
[ "BSD-3-Clause" ]
47
2019-07-28T10:12:22.000Z
2022-01-04T16:25:12.000Z
tests/test_engine/test_update/test_update_setOnInsert.py
bobuk/montydb
9ee299e7f1d3a7236abb683e0dfe4f7817859b2c
[ "BSD-3-Clause" ]
26
2019-08-09T14:28:29.000Z
2022-02-22T02:49:51.000Z
def test_update_setOnInsert_1(monty_update, mongo_update): docs = [] spec = {"$setOnInsert": {"a.$[]": 10}} find = {"a": [1]} monty_c = monty_update(docs, spec, find, upsert=True) mongo_c = mongo_update(docs, spec, find, upsert=True) assert next(mongo_c) == next(monty_c) monty_c.rewind() assert next(monty_c) == {"a": [10]} def test_update_setOnInsert_2(monty_update, mongo_update): docs = [] spec = {"$set": {"a": 9}, "$setOnInsert": {"b": 0}} find = {"a": {"$exists": 1}} monty_c = monty_update(docs, spec, find, upsert=True) mongo_c = mongo_update(docs, spec, find, upsert=True) assert next(mongo_c) == next(monty_c) monty_c.rewind() assert next(monty_c) == {"a": 9, "b": 0} def test_update_setOnInsert_3(monty_update, mongo_update): docs = [ {"a": 4} ] spec = {"$set": {"a": 9}, "$setOnInsert": {"b": 0}} find = {"a": {"$exists": 1}} monty_c = monty_update(docs, spec, find, upsert=True) mongo_c = mongo_update(docs, spec, find, upsert=True) assert next(mongo_c) == next(monty_c) monty_c.rewind() assert next(monty_c) == {"a": 9}
27.5
58
0.598268
165
1,155
3.951515
0.157576
0.110429
0.171779
0.165644
0.846626
0.806748
0.720859
0.720859
0.720859
0.720859
0
0.019759
0.211255
1,155
41
59
28.170732
0.695939
0
0
0.62069
0
0
0.065048
0
0
0
0
0
0.206897
1
0.103448
false
0
0
0
0.103448
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
91bc653faa4c89f1a9b0430b02a776165c714729
6,929
py
Python
hohos/core/forms.py
hohosInc/hohos
6c1ad8690aad3528e8e880064c59c797cccfb97b
[ "MIT" ]
2
2018-03-23T06:51:39.000Z
2018-07-01T07:45:21.000Z
hohos/core/forms.py
hohos-iA/hohos
6c1ad8690aad3528e8e880064c59c797cccfb97b
[ "MIT" ]
11
2018-10-04T20:16:07.000Z
2022-03-11T23:19:09.000Z
hohos/core/forms.py
hohosInc/hohos
6c1ad8690aad3528e8e880064c59c797cccfb97b
[ "MIT" ]
1
2018-08-29T06:00:38.000Z
2018-08-29T06:00:38.000Z
from django import forms from django.contrib.auth.models import User from authentication.models import Profile class ProfileFormHuman(forms.ModelForm): first_name = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=30, required=False) last_name = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=30, required=False) job = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) email = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) website = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) home = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) institute = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False, ) status = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=200, required=False, ) birth_date = forms.DateField( widget=forms.TextInput(attrs={'class': 'form-control'}), # max_length=80, required=False, ) quora = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) facebook = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) twitter = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) linkedin = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) want_to_do = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False ) likes_most = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False ) likes_not = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False ) class Meta: model = User fields = ['status', 'first_name', 'last_name', 'want_to_do', 'job', 'institute', 'birth_date', 'home', 'email', 'website', 'quora', 'facebook', 'twitter', 'linkedin' ] class ProfileFormProducts(forms.ModelForm): first_name = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=30, required=False) last_name = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=30, required=False) job = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) email = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) website = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) home = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False) company = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False, ) status = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=200, required=False, ) birth_date = forms.DateField( widget=forms.TextInput(attrs={'class': 'form-control'}), # max_length=80, required=False, ) quora = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) facebook = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) twitter = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) linkedin = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=150, required=False ) want_to_do = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=100, required=False ) class Meta: model = User fields = ['status', 'first_name', 'last_name', 'want_to_do', 'job', 'company', 'birth_date', 'home', 'email', 'website', 'quora', 'facebook', 'twitter', 'linkedin', ] class ChangePasswordForm(forms.ModelForm): id = forms.CharField(widget=forms.HiddenInput()) old_password = forms.CharField( widget=forms.PasswordInput(attrs={'class': 'form-control'}), label="Old password", required=True) new_password = forms.CharField( widget=forms.PasswordInput(attrs={'class': 'form-control'}), label="New password", required=True) confirm_password = forms.CharField( widget=forms.PasswordInput(attrs={'class': 'form-control'}), label="Confirm new password", required=True) class Meta: model = User fields = ['id', 'old_password', 'new_password', 'confirm_password'] def clean(self): super(ChangePasswordForm, self).clean() old_password = self.cleaned_data.get('old_password') new_password = self.cleaned_data.get('new_password') confirm_password = self.cleaned_data.get('confirm_password') id = self.cleaned_data.get('id') user = User.objects.get(pk=id) if not user.check_password(old_password): self._errors['old_password'] = self.error_class([ 'Old password don\'t match']) if new_password and len(new_password) < 4: self._errors['new_password'] = self.error_class( ['Passwords too sort']) if new_password and new_password != confirm_password: self._errors['new_password'] = self.error_class([ 'Passwords don\'t match']) return self.cleaned_data class ProfilePhotoForm(forms.ModelForm): class Meta: model = Profile fields = ['image']
33.8
80
0.592293
718
6,929
5.597493
0.125348
0.093058
0.114954
0.172431
0.818114
0.781787
0.781787
0.781787
0.759891
0.759891
0
0.016822
0.270746
6,929
205
81
33.8
0.778547
0.004185
0
0.661458
0
0
0.141925
0
0
0
0
0
0
1
0.005208
false
0.125
0.015625
0
0.244792
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
1
0
0
0
0
0
8
91d705223316360b8c05954259724a5f7d246440
45,078
py
Python
python/paddle/fluid/tests/unittests/test_optimizer.py
LWhite027/PaddleBox
b14bcdf285dd8829e11ab12cc815ac1b1ab62694
[ "Apache-2.0" ]
10
2021-05-12T07:20:32.000Z
2022-03-04T08:21:56.000Z
python/paddle/fluid/tests/unittests/test_optimizer.py
AFLee/Paddle
311b3b44fc7d51d4d66d90ab8a3fc0d42231afda
[ "Apache-2.0" ]
1
2021-01-07T11:00:58.000Z
2021-01-07T11:00:58.000Z
python/paddle/fluid/tests/unittests/test_optimizer.py
AFLee/Paddle
311b3b44fc7d51d4d66d90ab8a3fc0d42231afda
[ "Apache-2.0" ]
25
2019-12-07T02:14:14.000Z
2021-12-30T06:16:30.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # 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 print_function import unittest import paddle.fluid as fluid import paddle.fluid.framework as framework import paddle.fluid.optimizer as optimizer import paddle.fluid.core as core import paddle.compat as cpt import numpy as np from paddle.fluid.backward import append_backward from paddle.fluid.framework import Program, program_guard class TestOptimizer(unittest.TestCase): def test_sgd_optimizer(self): def check_sgd_optimizer(optimizer_attr): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr=optimizer_attr) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) sgd_optimizer = optimizer.SGDOptimizer(learning_rate=0.01) opts, _ = sgd_optimizer.minimize(mean_out, init_program) return opts opts = check_sgd_optimizer({'learning_rate': 1.1}) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "sgd"]) opts = check_sgd_optimizer({'learning_rate': 1.0}) self.assertEqual(len(opts), 1) self.assertEqual([op.type for op in opts], ["sgd"]) class TestOptimizerBackwardApplygrad(unittest.TestCase): def test_sgd_optimizer(self): def check_sgd_optimizer(optimizer_attr): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr=optimizer_attr) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) sgd_optimizer = optimizer.SGDOptimizer(learning_rate=0.01) with framework.program_guard(program, init_program): p_g = sgd_optimizer.backward(mean_out) opts = sgd_optimizer.apply_gradients(p_g) return opts opts = check_sgd_optimizer({'learning_rate': 1.1}) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "sgd"]) opts = check_sgd_optimizer({'learning_rate': 1.0}) self.assertEqual(len(opts), 1) self.assertEqual([op.type for op in opts], ["sgd"]) class TestMomentumOptimizer(unittest.TestCase): class MockMomentum(optimizer.MomentumOptimizer): def get_accumulators(self): return self._accumulators def get_velocity_str(self): return self._velocity_acc_str def test_vanilla_momentum_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) learning_rate = 0.01 momentum_optimizer = self.MockMomentum( learning_rate=learning_rate, momentum=0.2) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) params_grads = append_backward(mean_out) self.assertEqual(len(params_grads), 1) self.assertEqual(len(momentum_optimizer.get_accumulators()), 0) with framework.program_guard(program, init_program): opts = momentum_optimizer.apply_gradients(params_grads) self.assertEqual(len(opts), 2) sgd_op = opts[-1] self.assertEqual([op.type for op in opts], ["scale", "momentum"]) self.assertFalse(sgd_op.attr('use_nesterov')) # Check accumulators accumulators = momentum_optimizer.get_accumulators() self.assertEqual(len(accumulators), 1) self.assertTrue(momentum_optimizer.get_velocity_str() in accumulators) velocity_acc = accumulators[momentum_optimizer.get_velocity_str()] self.assertEqual(len(velocity_acc), 1) self.assertTrue(mul_x.name in velocity_acc) # Check init_program init_ops = init_program.global_block().ops self.assertEqual(len(init_ops), 2) self.assertEqual(init_ops[0].type, "fill_constant") self.assertAlmostEqual(init_ops[0].attr('value'), learning_rate) self.assertEqual(init_ops[1].type, "fill_constant") self.assertAlmostEqual(init_ops[1].attr('value'), 0.0) def test_nesterov_momentum_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) learning_rate = 0.01 momentum_optimizer = self.MockMomentum( learning_rate=learning_rate, momentum=0.2, use_nesterov=True) params_grads = append_backward(mean_out) self.assertEqual(len(params_grads), 1) self.assertEqual(len(momentum_optimizer.get_accumulators()), 0) with framework.program_guard(program, init_program): opts = momentum_optimizer.apply_gradients(params_grads) self.assertEqual(len(opts), 2) sgd_op = opts[-1] self.assertEqual([op.type for op in opts], ["scale", "momentum"]) self.assertTrue(sgd_op.attr('use_nesterov')) # Check accumulators accumulators = momentum_optimizer.get_accumulators() self.assertEqual(len(accumulators), 1) self.assertTrue(momentum_optimizer.get_velocity_str() in accumulators) velocity_acc = accumulators[momentum_optimizer.get_velocity_str()] self.assertEqual(len(velocity_acc), 1) self.assertTrue(mul_x.name in velocity_acc) # Check init_program init_ops = init_program.global_block().ops self.assertEqual(len(init_ops), 2) self.assertEqual(init_ops[0].type, "fill_constant") self.assertAlmostEqual(init_ops[0].attr('value'), learning_rate) self.assertEqual(init_ops[1].type, "fill_constant") self.assertAlmostEqual(init_ops[1].attr('value'), 0.0) class TestAdagradOptimizer(unittest.TestCase): class MockAdagrad(optimizer.AdagradOptimizer): def get_accumulators(self): return self._accumulators def get_moment_str(self): return self._moment_acc_str def test_adagrad_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) learning_rate = 0.01 adagrad_optimizer = self.MockAdagrad( learning_rate=learning_rate, epsilon=1.0e-6) params_grads = append_backward(mean_out) self.assertEqual(len(params_grads), 1) self.assertEqual(len(adagrad_optimizer.get_accumulators()), 0) with framework.program_guard(program, init_program): opts = adagrad_optimizer.apply_gradients(params_grads) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "adagrad"]) # Check accumulators accumulators = adagrad_optimizer.get_accumulators() self.assertEqual(len(accumulators), 1) self.assertTrue(adagrad_optimizer.get_moment_str() in accumulators) moment_acc = accumulators[adagrad_optimizer.get_moment_str()] self.assertEqual(len(moment_acc), 1) self.assertTrue(mul_x.name in moment_acc) # Check init_program init_ops = init_program.global_block().ops self.assertEqual(len(init_ops), 2) self.assertEqual(init_ops[0].type, "fill_constant") self.assertAlmostEqual(init_ops[0].attr('value'), learning_rate) self.assertEqual(init_ops[1].type, "fill_constant") self.assertAlmostEqual(init_ops[1].attr('value'), 0.0) class TestAdamOptimizer(unittest.TestCase): class MockAdam(optimizer.AdamOptimizer): def get_accumulators(self): return self._accumulators def get_moment1_str(self): return self._moment1_acc_str def get_moment2_str(self): return self._moment2_acc_str def test_adam_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) learning_rate = 0.01 adam_optimizer = self.MockAdam( learning_rate=learning_rate, beta1=0.9, beta2=0.999) params_grads = append_backward(mean_out) self.assertEqual(len(params_grads), 1) self.assertEqual(len(adam_optimizer.get_accumulators()), 0) with framework.program_guard(program, init_program): opts = adam_optimizer.apply_gradients(params_grads) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "adam"]) # Check accumulators accumulators = adam_optimizer.get_accumulators() self.assertEqual(len(accumulators), 4) self.assertTrue(adam_optimizer.get_moment1_str() in accumulators) self.assertTrue(adam_optimizer.get_moment2_str() in accumulators) moment1_acc = accumulators[adam_optimizer.get_moment1_str()] moment2_acc = accumulators[adam_optimizer.get_moment2_str()] self.assertEqual(len(moment1_acc), 1) self.assertEqual(len(moment2_acc), 1) self.assertTrue(mul_x.name in moment1_acc) self.assertTrue(mul_x.name in moment2_acc) # Check init_program init_ops = init_program.global_block().ops self.assertEqual(len(init_ops), 5) self.assertEqual(init_ops[0].type, "fill_constant") self.assertAlmostEqual(init_ops[0].attr('value'), learning_rate) class TestAdamaxOptimizer(unittest.TestCase): class MockAdamax(optimizer.AdamaxOptimizer): def get_accumulators(self): return self._accumulators def get_moment_str(self): return self._moment_acc_str def get_inf_norm_str(self): return self._inf_norm_acc_str def test_adamax_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) learning_rate = 0.01 adamax_optimizer = self.MockAdamax( learning_rate=learning_rate, beta1=0.9, beta2=0.999) params_grads = append_backward(mean_out) self.assertEqual(len(params_grads), 1) self.assertEqual(len(adamax_optimizer.get_accumulators()), 0) with framework.program_guard(program, init_program): opts = adamax_optimizer.apply_gradients(params_grads) self.assertEqual(len(opts), 3) self.assertEqual([op.type for op in opts], ["scale", "adamax", "scale"]) # Check accumulators accumulators = adamax_optimizer.get_accumulators() self.assertEqual(len(accumulators), 3) self.assertTrue(adamax_optimizer.get_moment_str() in accumulators) self.assertTrue(adamax_optimizer.get_inf_norm_str() in accumulators) moment_acc = accumulators[adamax_optimizer.get_moment_str()] inf_norm_acc = accumulators[adamax_optimizer.get_inf_norm_str()] self.assertEqual(len(moment_acc), 1) self.assertEqual(len(inf_norm_acc), 1) self.assertTrue(mul_x.name in moment_acc) self.assertTrue(mul_x.name in inf_norm_acc) # Check init_program init_ops = init_program.global_block().ops self.assertEqual(len(init_ops), 4) self.assertEqual(init_ops[0].type, "fill_constant") self.assertAlmostEqual(init_ops[0].attr('value'), learning_rate) class TestDpsgdOptimizer(unittest.TestCase): def test_dpsgd_optimizer(self): def check_dpsgd_optimizer(optimizer_attr): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr=optimizer_attr) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) dpsgd_optimizer = optimizer.DpsgdOptimizer( learning_rate=0.01, clip=100.0, batch_size=16.0, sigma=0.0) opts, _ = dpsgd_optimizer.minimize(mean_out, init_program) return opts opts = check_dpsgd_optimizer({ 'learning_rate': 1.1, 'clip': 100.0, 'batch_size': 16.0, 'sigma': 4.0 }) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "dpsgd"]) class TestDecayedAdagradOptimizer(unittest.TestCase): class MockDecayedAdagrad(optimizer.DecayedAdagradOptimizer): def get_accumulators(self): return self._accumulators def get_moment_str(self): return self._moment_acc_str def test_decayed_adagrad_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) learning_rate = 0.01 decayed_adagrad_optimizer = self.MockDecayedAdagrad( learning_rate=learning_rate, decay=0.95, epsilon=1.0e-6) params_grads = append_backward(mean_out) self.assertEqual(len(params_grads), 1) self.assertEqual(len(decayed_adagrad_optimizer.get_accumulators()), 0) with framework.program_guard(program, init_program): opts = decayed_adagrad_optimizer.apply_gradients(params_grads) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "decayed_adagrad"]) # Check accumulators accumulators = decayed_adagrad_optimizer.get_accumulators() self.assertEqual(len(accumulators), 1) self.assertTrue( decayed_adagrad_optimizer.get_moment_str() in accumulators) moment_acc = accumulators[decayed_adagrad_optimizer.get_moment_str()] self.assertEqual(len(moment_acc), 1) self.assertTrue(mul_x.name in moment_acc) # Check init_program init_ops = init_program.global_block().ops self.assertEqual(len(init_ops), 2) self.assertEqual(init_ops[0].type, "fill_constant") self.assertAlmostEqual(init_ops[0].attr('value'), learning_rate) self.assertEqual(init_ops[1].type, "fill_constant") self.assertAlmostEqual(init_ops[1].attr('value'), 0.0) class TestFtrlOptimizer(unittest.TestCase): class MockFtrl(optimizer.FtrlOptimizer): def get_accumulators(self): return self._accumulators def get_squared_str(self): return self._squared_acc_str def get_linear_str(self): return self._linear_acc_str def test_ftrl_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) learning_rate = 0.01 ftrl_optimizer = self.MockFtrl( learning_rate=learning_rate, l1=0.0, l2=0.0, lr_power=-0.5) params_grads = append_backward(mean_out) self.assertEqual(len(params_grads), 1) self.assertEqual(len(ftrl_optimizer.get_accumulators()), 0) with framework.program_guard(program, init_program): opts = ftrl_optimizer.apply_gradients(params_grads) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "ftrl"]) # Check accumulators accumulators = ftrl_optimizer.get_accumulators() self.assertEqual(len(accumulators), 2) self.assertTrue(ftrl_optimizer.get_squared_str() in accumulators) self.assertTrue(ftrl_optimizer.get_linear_str() in accumulators) squared_acc = accumulators[ftrl_optimizer.get_squared_str()] linear_acc = accumulators[ftrl_optimizer.get_linear_str()] self.assertEqual(len(squared_acc), 1) self.assertEqual(len(linear_acc), 1) self.assertTrue(mul_x.name in squared_acc) self.assertTrue(mul_x.name in linear_acc) # Check init_program init_ops = init_program.global_block().ops self.assertEqual(len(init_ops), 3) self.assertEqual(init_ops[0].type, "fill_constant") self.assertAlmostEqual(init_ops[0].attr('value'), learning_rate) class TestLookaheadOptimizer(unittest.TestCase): def test_lookahead_optimizer(self): init_program = framework.Program() program = framework.Program() block = program.global_block() init_block = init_program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x", optimize_attr={'learning_rate': 1.1}) init_mul_x = init_block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x") mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) block.append_op( type="mean", inputs={"X": mul_out}, outputs={"Out": mean_out}) sgd = optimizer.SGD(learning_rate=0.01) lookahead = optimizer.LookaheadOptimizer(sgd, alpha=0.5, k=5) with framework.program_guard(program, init_program): opts, _ = lookahead.minimize(mean_out) self.assertEqual(len(opts), 2) self.assertEqual([op.type for op in opts], ["scale", "sgd"]) class TestRecomputeOptimizer(unittest.TestCase): def net(self, return_input=False, with_dropout=False): program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x") mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") if with_dropout == True: mul_out_drop = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out.dropout") mul_out_mask = block.create_var( dtype="uint8", shape=[5, 8], lod_level=0, name="mul.out.mask") b1 = block.create_parameter( dtype="float32", shape=[5, 8], lod_level=0, name="b1") b1_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="b1_out") b2 = block.create_parameter( dtype="float32", shape=[5, 8], lod_level=0, name="b2") b2_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="b2_out") mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) if with_dropout == True: block.append_op( type='dropout', inputs={'X': [mul_out]}, outputs={'Out': [mul_out_drop], 'Mask': [mul_out_mask]}, attrs={'dropout_prob': 0.5, }) block.append_op( type="elementwise_add", inputs={"X": mul_out_drop, "Y": b1}, outputs={"Out": b1_out}) else: block.append_op( type="elementwise_add", inputs={"X": mul_out, "Y": b1}, outputs={"Out": b1_out}) block.append_op( type="elementwise_add", inputs={"X": b1_out, "Y": b2}, outputs={"Out": b2_out}) block.append_op( type="mean", inputs={"X": b2_out}, outputs={"Out": mean_out}) if return_input == True: return mul_x, mul_out, b1_out, b2_out, mean_out return mul_out, b1_out, b2_out, mean_out def test_no_checkpoint(self): mul_out, b1_out, b2_out, mean_out = self.net() self.assertEqual(len(mean_out.block.ops), 4) self.assertEqual([op.type for op in mean_out.block.ops], ["mul", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 12) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add_grad", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_one_checkpoint(self): mul_out, b1_out, b2_out, mean_out = self.net() self.assertEqual(len(mean_out.block.ops), 4) self.assertEqual([op.type for op in mean_out.block.ops], ["mul", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([b1_out]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 13) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add_grad", "mul", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_str_checkpoints(self): mul_out, b1_out, b2_out, mean_out = self.net() self.assertEqual(len(mean_out.block.ops), 4) self.assertEqual([op.type for op in mean_out.block.ops], ["mul", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([b1_out.name]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 13) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add_grad", "mul", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_multi_checkpoint(self): mul_out, b1_out, b2_out, mean_out = self.net() self.assertEqual(len(mean_out.block.ops), 4) self.assertEqual([op.type for op in mean_out.block.ops], ["mul", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([mul_out, b2_out]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 13) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add", "elementwise_add_grad", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_adjacent_checkpoint(self): mul_out, b1_out, b2_out, mean_out = self.net() self.assertEqual(len(mean_out.block.ops), 4) self.assertEqual([op.type for op in mean_out.block.ops], ["mul", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([mul_out, b1_out]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 12) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add_grad", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_out_of_order_checkpoint(self): mul_out, b1_out, b2_out, mean_out = self.net() self.assertEqual(len(mean_out.block.ops), 4) self.assertEqual([op.type for op in mean_out.block.ops], ["mul", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([b2_out, mul_out]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 13) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add", "elementwise_add_grad", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_input_as_checkpoints(self): mul_x, mul_out, b1_out, b2_out, mean_out = self.net(return_input=True) self.assertEqual(len(mean_out.block.ops), 4) self.assertEqual([op.type for op in mean_out.block.ops], ["mul", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([mul_x, b2_out]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 14) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "mul", "elementwise_add", "elementwise_add_grad", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_apply_gradients(self): mul_out, b1_out, b2_out, mean_out = self.net() sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([b1_out]) # apply backward params_grads = recompute_optimizer.backward( mean_out, startup_program=None, parameter_list=None, no_grad_set=None) # apply gradient program = mean_out.block.program with framework.program_guard(program, None): optimize_ops = recompute_optimizer.apply_gradients(params_grads) self.assertEqual(len(mean_out.block.ops), 13) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add_grad", "mul", "elementwise_add_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_load(self): mul_out, b1_out, b2_out, mean_out = self.net() sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([b1_out]) try: state_dict = {} recompute_optimizer.load(state_dict) except NotImplementedError as e: self.assertEqual( "load function is not supported by Recompute Optimizer for now", cpt.get_exception_message(e)) def test_dropout(self): """ If there are dropout layers in the forward nets, we should add a seed op """ mul_out, b1_out, b2_out, mean_out = self.net(with_dropout=True) self.assertEqual(len(mean_out.block.ops), 5) self.assertEqual( [op.type for op in mean_out.block.ops], ["mul", "dropout", "elementwise_add", "elementwise_add", "mean"]) sgd_optimizer = optimizer.SGD(learning_rate=1.0) recompute_optimizer = optimizer.RecomputeOptimizer(sgd_optimizer) recompute_optimizer._set_checkpoints([b1_out]) opts, params_grads = recompute_optimizer.minimize(mean_out) self.assertEqual(len(mean_out.block.ops), 17) self.assertEqual([op.type for op in mean_out.block.ops], [ "mul", "seed", "dropout", "elementwise_add", "elementwise_add", "mean", "fill_constant", "mean_grad", "elementwise_add_grad", "mul", "dropout", "elementwise_add_grad", "dropout_grad", "mul_grad", "sgd", "sgd", "sgd" ]) def test_dropout_with_seed(self): """ when we recompute a dropout op, make sure that the recomputed one is the same as the original var. """ def gen_data(): return { "x": np.random.random(size=(100, 3)).astype('float32'), "y": np.random.randint( 2, size=(100, 1)).astype('int64') } def mlp(input_x, input_y): drop_res = fluid.layers.dropout( input_x, dropout_prob=0.5, name="dropout_with_seed_cpu") prediction = fluid.layers.fc(input=[drop_res], size=2, act='softmax') cost = fluid.layers.cross_entropy(input=prediction, label=input_y) sum_cost = fluid.layers.reduce_mean(cost) return drop_res, prediction, sum_cost main_program = Program() startup_program = Program() scope = fluid.Scope() with fluid.scope_guard(scope): with program_guard(main_program, startup_program): input_x = fluid.layers.data( name="x", shape=[3], dtype='float32') input_y = fluid.layers.data(name="y", shape=[1], dtype='int64') drop_res, prediction, cost = mlp(input_x, input_y) sgd = fluid.optimizer.Adam(learning_rate=0.01) sgd = fluid.optimizer.RecomputeOptimizer(sgd) sgd._set_checkpoints([prediction]) sgd.minimize(cost) place = fluid.CPUPlace() exe = fluid.Executor(place) exe.run(fluid.default_startup_program()) feed_data = gen_data() drop_vec = exe.run(feed=feed_data, program=fluid.default_main_program(), fetch_list=[ "dropout_with_seed_cpu.tmp_1", "dropout_with_seed_cpu.tmp_1.subprog_0" ]) self.assertEqual(drop_vec[0].tolist(), drop_vec[1].tolist()) @unittest.skipIf(not core.is_compiled_with_cuda(), "core is not compiled with CUDA") class TestRecomputeOptimizerCUDA(unittest.TestCase): def test_dropout_with_seed(self): """ when we recompute a dropout op, make sure that the recomputed one is the same as the original var. """ def gen_data(): return { "x": np.random.random(size=(100, 3)).astype('float32'), "y": np.random.randint( 2, size=(100, 1)).astype('int64') } def mlp(input_x, input_y): drop_res = fluid.layers.dropout( input_x, dropout_prob=0.5, name="dropout_with_seed_gpu") prediction = fluid.layers.fc(input=[drop_res], size=2, act='softmax') cost = fluid.layers.cross_entropy(input=prediction, label=input_y) sum_cost = fluid.layers.reduce_mean(cost) return drop_res, prediction, sum_cost main_program = Program() startup_program = Program() scope = fluid.Scope() with fluid.scope_guard(scope): with program_guard(main_program, startup_program): input_x = fluid.layers.data( name="x", shape=[3], dtype='float32') input_y = fluid.layers.data(name="y", shape=[1], dtype='int64') drop_res, prediction, cost = mlp(input_x, input_y) sgd = fluid.optimizer.Adam(learning_rate=0.01) sgd = fluid.optimizer.RecomputeOptimizer(sgd) sgd._set_checkpoints([prediction]) sgd.minimize(cost) place = fluid.CUDAPlace(0) exe = fluid.Executor(place) exe.run(fluid.default_startup_program()) feed_data = gen_data() drop_vec = exe.run(feed=feed_data, program=fluid.default_main_program(), fetch_list=[ "dropout_with_seed_gpu.tmp_1", "dropout_with_seed_gpu.tmp_1.subprog_0" ]) self.assertEqual(drop_vec[0].tolist(), drop_vec[1].tolist()) class TestGradientMergeOptimizer(unittest.TestCase): def net(self): program = framework.Program() block = program.global_block() mul_x = block.create_parameter( dtype="float32", shape=[5, 10], lod_level=0, name="mul.x") mul_y = block.create_var( dtype="float32", shape=[10, 8], lod_level=0, name="mul.y") mul_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="mul.out") b1 = block.create_parameter( dtype="float32", shape=[5, 8], lod_level=0, name="b1") b1_out = block.create_var( dtype="float32", shape=[5, 8], lod_level=0, name="b1_out") mean_out = block.create_var( dtype="float32", shape=[1], lod_level=0, name="mean.out") block.append_op( type="mul", inputs={"X": mul_x, "Y": mul_y}, outputs={"Out": mul_out}, attrs={"x_num_col_dims": 1}) block.append_op( type="elementwise_add", inputs={"X": mul_out, "Y": b1}, outputs={"Out": b1_out}) block.append_op( type="mean", inputs={"X": b1_out}, outputs={"Out": mean_out}) return mean_out def test_program_desc(self, ): cost = self.net() main_program = cost.block.program init_program = framework.Program() self.assertEqual(main_program.num_blocks, 1) self.assertEqual(len(cost.block.ops), 3) self.assertEqual([op.type for op in cost.block.ops], ["mul", "elementwise_add", "mean"]) opt = optimizer.SGD(learning_rate=1.0) opt = optimizer.GradientMergeOptimizer(opt, k_steps=4) with framework.program_guard(main_program, init_program): ops, params_grads = opt.minimize(cost) self.assertEqual(main_program.num_blocks, 4) # main block self.assertEqual(len(cost.block.ops), 17) self.assertEqual([op.type for op in cost.block.ops], [ 'mul', 'elementwise_add', 'mean', 'fill_constant', 'mean_grad', 'elementwise_add_grad', 'mul_grad', 'increment', 'fill_constant', 'fill_constant', 'elementwise_mod', 'cast', 'not_equal', 'logical_not', 'conditional_block', 'conditional_block', 'conditional_block_grad' ]) # merge block self.assertEqual(len(main_program.block(1).ops), 2) self.assertEqual([op.type for op in main_program.block(1).ops], [ 'elementwise_add', 'elementwise_add', ]) # reset block self.assertEqual(len(main_program.block(2).ops), 6) self.assertEqual([op.type for op in main_program.block(2).ops], [ 'elementwise_add', 'scale', 'elementwise_add', 'scale', 'fill_constant', 'fill_constant' ]) # optimize block self.assertEqual(len(main_program.block(3).ops), 2) self.assertEqual([op.type for op in main_program.block(3).ops], ['sgd', 'sgd']) if __name__ == '__main__': unittest.main()
43.054441
80
0.597631
5,418
45,078
4.723883
0.060724
0.072673
0.05134
0.030984
0.838751
0.811557
0.795577
0.779948
0.765453
0.754943
0
0.022627
0.279382
45,078
1,046
81
43.095602
0.765269
0.026887
0
0.725446
0
0
0.090207
0.004388
0
0
0
0
0.175223
1
0.053571
false
0
0.011161
0.018973
0.113839
0.001116
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
91da6dbd420e3254acfd0821cff6489c9d2d8c9f
15,188
py
Python
tests/integration/test_inline_hooks_it.py
cluesblues/okta-sdk-python
c1d839f0d8fb4a0b564b0a1f4570bc18e117e0d7
[ "Apache-2.0" ]
null
null
null
tests/integration/test_inline_hooks_it.py
cluesblues/okta-sdk-python
c1d839f0d8fb4a0b564b0a1f4570bc18e117e0d7
[ "Apache-2.0" ]
null
null
null
tests/integration/test_inline_hooks_it.py
cluesblues/okta-sdk-python
c1d839f0d8fb4a0b564b0a1f4570bc18e117e0d7
[ "Apache-2.0" ]
1
2022-01-19T09:29:14.000Z
2022-01-19T09:29:14.000Z
import pytest from tests.mocks import MockOktaClient import okta.models as models from http import HTTPStatus from okta.errors.okta_api_error import OktaAPIError class TestInlineHooksResource: """ Integration Tests for the Inline Hooks Resource """ SDK_PREFIX = "python_sdk" @pytest.mark.vcr() @pytest.mark.asyncio async def test_create_get_inline_hook(self, fs): # Instantiate Mock Client client = MockOktaClient(fs) # Create Inline Hook inline_hook_model = models.InlineHook({ "name": f"{TestInlineHooksResource.SDK_PREFIX} Test Inline Hook", "version": "1.0.0", "type": models.InlineHookType.COM_OKTA_OAUTH_2_TOKENS_TRANSFORM, "channel": models.InlineHookChannel({ "type": "HTTP", "version": "1.0.0", "config": models.InlineHookChannelConfig({ "uri": "https://www.example.com/inlineHook", "headers": [ models.InlineHookChannelConfigHeaders({ "key": "X-Test-Header", "value": "Test Header Value" }) ], "authScheme": models.InlineHookChannelConfigAuthScheme({ "type": "HEADER", "key": "Authorization", "value": "Test-Api-Key" }) }) }) }) created_inline_hook, _, err = await \ client.create_inline_hook(inline_hook_model) assert err is None assert isinstance(created_inline_hook, models.InlineHook) assert created_inline_hook.id assert created_inline_hook.name == inline_hook_model.name assert created_inline_hook.channel assert created_inline_hook.channel.config assert created_inline_hook.channel.config.uri ==\ inline_hook_model.channel.config.uri # Retrieve retrieved_inline_hook, _, err = await \ client.get_inline_hook(created_inline_hook.id) assert err is None assert isinstance(retrieved_inline_hook, models.InlineHook) assert retrieved_inline_hook.id == created_inline_hook.id assert retrieved_inline_hook.name == created_inline_hook.name # Deactivate & Delete deactivated_inline_hook, _, err = await \ client.deactivate_inline_hook(created_inline_hook.id) assert err is None assert isinstance(deactivated_inline_hook, models.InlineHook) assert deactivated_inline_hook.status == "INACTIVE" _, err = await client.delete_inline_hook(created_inline_hook.id) assert err is None @pytest.mark.vcr() @pytest.mark.asyncio async def test_update_inline_hook(self, fs): # Instantiate Mock Client client = MockOktaClient(fs) # Create Inline Hook inline_hook_model = models.InlineHook({ "name": f"{TestInlineHooksResource.SDK_PREFIX} Test Inline Hook", "version": "1.0.0", "type": models.InlineHookType.COM_OKTA_OAUTH_2_TOKENS_TRANSFORM, "channel": models.InlineHookChannel({ "type": "HTTP", "version": "1.0.0", "config": models.InlineHookChannelConfig({ "uri": "https://www.example.com/inlineHook", "headers": [ models.InlineHookChannelConfigHeaders({ "key": "X-Test-Header", "value": "Test Header Value" }) ], "authScheme": models.InlineHookChannelConfigAuthScheme({ "type": "HEADER", "key": "Authorization", "value": "Test-Api-Key" }) }) }) }) created_inline_hook, _, err = await \ client.create_inline_hook(inline_hook_model) assert err is None assert isinstance(created_inline_hook, models.InlineHook) assert created_inline_hook.id assert created_inline_hook.name == inline_hook_model.name assert created_inline_hook.channel assert created_inline_hook.channel.config assert created_inline_hook.channel.config.uri ==\ inline_hook_model.channel.config.uri # Update updated_inline_hook_model = models.InlineHook({ "name": inline_hook_model.name + "UPDATE", "version": "1.0.0", "type": models.InlineHookType.COM_OKTA_OAUTH_2_TOKENS_TRANSFORM, "channel": models.InlineHookChannel({ "type": "HTTP", "version": "1.0.0", "config": models.InlineHookChannelConfig({ "uri": inline_hook_model.channel.config.uri + "UPDATE", "headers": [ models.InlineHookChannelConfigHeaders({ "key": "X-Test-Header", "value": "Test Header Value UPDATE" }) ], "authScheme": models.InlineHookChannelConfigAuthScheme({ "type": "HEADER", "key": "Authorization", "value": "Test-Api-Key-UPDATE" }) }) }) }) updated_inline_hook, _, err = await \ client.update_inline_hook( created_inline_hook.id, updated_inline_hook_model) assert err is None assert updated_inline_hook.id == created_inline_hook.id assert updated_inline_hook.name == updated_inline_hook_model.name assert updated_inline_hook.channel.config.uri == \ updated_inline_hook_model.channel.config.uri # Retrieve retrieved_inline_hook, _, err = await \ client.get_inline_hook(created_inline_hook.id) assert err is None assert isinstance(retrieved_inline_hook, models.InlineHook) assert retrieved_inline_hook.id == created_inline_hook.id assert retrieved_inline_hook.name == updated_inline_hook.name assert retrieved_inline_hook.version == created_inline_hook.version assert retrieved_inline_hook.type ==\ models.InlineHookType.COM_OKTA_OAUTH_2_TOKENS_TRANSFORM assert retrieved_inline_hook.channel.config.uri ==\ updated_inline_hook.channel.config.uri # Deactivate & Delete deactivated_inline_hook, _, err = await \ client.deactivate_inline_hook(created_inline_hook.id) assert err is None assert isinstance(deactivated_inline_hook, models.InlineHook) assert deactivated_inline_hook.status == "INACTIVE" _, err = await client.delete_inline_hook(created_inline_hook.id) assert err is None @pytest.mark.vcr() @pytest.mark.asyncio async def test_delete_inline_hook(self, fs): # Instantiate Mock Client client = MockOktaClient(fs) # Create Inline Hook inline_hook_model = models.InlineHook({ "name": f"{TestInlineHooksResource.SDK_PREFIX} Test Inline Hook", "version": "1.0.0", "type": models.InlineHookType.COM_OKTA_OAUTH_2_TOKENS_TRANSFORM, "channel": models.InlineHookChannel({ "type": "HTTP", "version": "1.0.0", "config": models.InlineHookChannelConfig({ "uri": "https://www.example.com/inlineHook", "headers": [ models.InlineHookChannelConfigHeaders({ "key": "X-Test-Header", "value": "Test Header Value" }) ], "authScheme": models.InlineHookChannelConfigAuthScheme({ "type": "HEADER", "key": "Authorization", "value": "Test-Api-Key" }) }) }) }) created_inline_hook, _, err = await \ client.create_inline_hook(inline_hook_model) assert err is None assert isinstance(created_inline_hook, models.InlineHook) assert created_inline_hook.id assert created_inline_hook.name == inline_hook_model.name assert created_inline_hook.channel assert created_inline_hook.channel.config assert created_inline_hook.channel.config.uri ==\ inline_hook_model.channel.config.uri # Deactivate & Delete deactivated_inline_hook, _, err = await \ client.deactivate_inline_hook(created_inline_hook.id) assert err is None assert isinstance(deactivated_inline_hook, models.InlineHook) assert deactivated_inline_hook.status == "INACTIVE" _, err = await client.delete_inline_hook(created_inline_hook.id) assert err is None # Retrieve retrieved_inline_hook, resp, err = await \ client.get_inline_hook(created_inline_hook.id) assert err is not None assert isinstance(err, OktaAPIError) assert resp.get_status() == HTTPStatus.NOT_FOUND assert retrieved_inline_hook is None @pytest.mark.vcr() @pytest.mark.asyncio async def test_activate_deactivate_inline_hook(self, fs): # Instantiate Mock Client client = MockOktaClient(fs) # Create Inline Hook inline_hook_model = models.InlineHook({ "name": f"{TestInlineHooksResource.SDK_PREFIX} Test Inline Hook", "version": "1.0.0", "type": models.InlineHookType.COM_OKTA_OAUTH_2_TOKENS_TRANSFORM, "channel": models.InlineHookChannel({ "type": "HTTP", "version": "1.0.0", "config": models.InlineHookChannelConfig({ "uri": "https://www.example.com/inlineHook", "headers": [ models.InlineHookChannelConfigHeaders({ "key": "X-Test-Header", "value": "Test Header Value" }) ], "authScheme": models.InlineHookChannelConfigAuthScheme({ "type": "HEADER", "key": "Authorization", "value": "Test-Api-Key" }) }) }) }) created_inline_hook, _, err = await \ client.create_inline_hook(inline_hook_model) assert err is None assert isinstance(created_inline_hook, models.InlineHook) assert created_inline_hook.id assert created_inline_hook.name == inline_hook_model.name assert created_inline_hook.channel assert created_inline_hook.channel.config assert created_inline_hook.channel.config.uri ==\ inline_hook_model.channel.config.uri assert created_inline_hook.status == "ACTIVE" # Deactivate deactivated_inline_hook, _, err = await \ client.deactivate_inline_hook(created_inline_hook.id) assert err is None assert isinstance(deactivated_inline_hook, models.InlineHook) assert deactivated_inline_hook.status == "INACTIVE" # Retrieve retrieved_inline_hook, _, err = await \ client.get_inline_hook(created_inline_hook.id) assert err is None assert retrieved_inline_hook.status == "INACTIVE" # Activate activated_inline_hook, _, err = await \ client.activate_inline_hook(created_inline_hook.id) assert err is None assert isinstance(activated_inline_hook, models.InlineHook) assert activated_inline_hook.status == "ACTIVE" # Retrieve retrieved_inline_hook, _, err = await \ client.get_inline_hook(created_inline_hook.id) assert err is None assert retrieved_inline_hook.status == "ACTIVE" # Delete & Deactivate _, _, err = await \ client.deactivate_inline_hook(created_inline_hook.id) assert err is None _, err = await client.delete_inline_hook(created_inline_hook.id) assert err is None @pytest.mark.vcr() @pytest.mark.asyncio async def test_list_inline_hooks(self, fs): # Instantiate Mock Client client = MockOktaClient(fs) # Create Inline Hooks NUMBER_OF_HOOKS = 3 created_inline_hooks = [] for index in range(NUMBER_OF_HOOKS): inline_hook_model = models.InlineHook({ "name": f"{TestInlineHooksResource.SDK_PREFIX} IH{index}", "version": "1.0.0", "type": models.InlineHookType. COM_OKTA_OAUTH_2_TOKENS_TRANSFORM, "channel": models.InlineHookChannel({ "type": "HTTP", "version": "1.0.0", "config": models.InlineHookChannelConfig({ "uri": "https://www.example.com/inlineHook", "headers": [ models.InlineHookChannelConfigHeaders({ "key": "X-Test-Header", "value": f"Test Header {index}" }) ], "authScheme": models. InlineHookChannelConfigAuthScheme({ "type": "HEADER", "key": "Authorization", "value": f"Test-Api-Key-{index}" }) }) }) }) created_inline_hook, _, err = await \ client.create_inline_hook(inline_hook_model) assert err is None assert isinstance(created_inline_hook, models.InlineHook) assert created_inline_hook.id assert created_inline_hook.name == inline_hook_model.name assert created_inline_hook.channel assert created_inline_hook.channel.config assert created_inline_hook.channel.config.uri ==\ inline_hook_model.channel.config.uri created_inline_hooks.append(created_inline_hook.id) # List all_inline_hooks, _, err = await client.list_inline_hooks() assert err is None assert isinstance(all_inline_hooks, list) for inline_hook_id in created_inline_hooks: assert next((ih for ih in all_inline_hooks if ih.id == inline_hook_id)) # Deactivate & Delete for inline_hook_id in created_inline_hooks: _, _, err = await \ client.deactivate_inline_hook(inline_hook_id) assert err is None _, err = await client.delete_inline_hook(inline_hook_id) assert err is None
40.938005
77
0.572426
1,458
15,188
5.680384
0.072702
0.195605
0.119053
0.072205
0.881188
0.864405
0.843395
0.843395
0.802101
0.786284
0
0.004409
0.342902
15,188
370
78
41.048649
0.825451
0.029036
0
0.805825
0
0
0.098994
0.012238
0
0
0
0
0.271845
1
0
false
0
0.016181
0
0.022654
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
37dae7537ef33aa33c1d2ecc25a65a657175869a
153
py
Python
django_tenants/tests/__init__.py
OmenApps/django-tenants
d00ce52d2fefcb16ec54cec01a282351ca7297d5
[ "MIT" ]
1
2019-04-20T13:37:12.000Z
2019-04-20T13:37:12.000Z
django_tenants/tests/__init__.py
OmenApps/django-tenants
d00ce52d2fefcb16ec54cec01a282351ca7297d5
[ "MIT" ]
null
null
null
django_tenants/tests/__init__.py
OmenApps/django-tenants
d00ce52d2fefcb16ec54cec01a282351ca7297d5
[ "MIT" ]
null
null
null
from .test_routes import * from .test_tenants import * from .test_cache import * from .test_static_files import * from .test_filesystem_storage import *
25.5
38
0.803922
22
153
5.272727
0.454545
0.344828
0.482759
0
0
0
0
0
0
0
0
0
0.130719
153
5
39
30.6
0.87218
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
5350f53348969e4f70b59a078342356b974684d0
5,479
py
Python
apiTool.py
drogomarks/heimdallv2
960260d0d238811bc7b4e0402aaa2498ee0bdb30
[ "MIT" ]
null
null
null
apiTool.py
drogomarks/heimdallv2
960260d0d238811bc7b4e0402aaa2498ee0bdb30
[ "MIT" ]
null
null
null
apiTool.py
drogomarks/heimdallv2
960260d0d238811bc7b4e0402aaa2498ee0bdb30
[ "MIT" ]
null
null
null
#!/usr/bin/env python import base64 import hashlib import time import requests import json import config # Get Keys & Set User Agent usrkey = config.usrkey scrtkey = config.scrtkey usr_agent = config.usr_agent # Get Date/Time: YYYYMMDDHHmmss tm_stmp = time.strftime("%Y%m%d%H%M%S") # Hash: <User Key><User Agent><Timestamp><Secret Key> hash_str = usrkey + usr_agent + tm_stmp + scrtkey # Get the hash sha1 = base64.b64encode(hashlib.sha1(hash_str).digest()) # Create API Signature api_sig = usrkey + ":" + tm_stmp + ":" + sha1 # Base URL/Headers base_url = "https://api.emailsrvr.com/v1/customers/" headers = {"Accept":"application/json", "User-Agent" : "MigFwdTool", "X-Api-Signature" : api_sig} def user_get(cst_id, domain, mbx_type, user): # Set Mailbox Type key for dict if mbx_type == 'rs': mbx_key = 'rsMailboxes' else: mbx_key = 'mailboxes' url = base_url + cst_id + "/domains/" + domain + "/" + mbx_type + "/mailboxes/" + user request = requests.get(url, headers=headers) data = request.json() data = json.dumps(data, indent=4, sort_keys=True) return data def domain_get(cst_id, domain, mbx_type): # Set Mailbox Type key for dict if mbx_type == 'rs': mbx_key = 'rsMailboxes' else: mbx_key = 'mailboxes' url = base_url + cst_id + "/domains/" + domain request = requests.get(url, headers=headers) data = request.json() data = json.dumps(data, indent=4, sort_keys=True) return data def mbx_get_list(cst_id, domain, mbx_type): # Set Mailbox Type key for dict if mbx_type == 'rs': mbx_key = 'rsMailboxes' else: mbx_key = 'mailboxes' # offset value/url string off_val = 0 off_str = "&offset=%s" % off_val # size value/url string sz_val= 50 sz_str = "?size=%s" % sz_val url = base_url + cst_id + "/domains/" + domain + "/" + mbx_type + "/mailboxes" + sz_str + off_str request = requests.get(url, headers=headers) data = request.json() mbx_total = data['total'] # Empty list for mailboxes global mailboxes mailboxes = [] # Offset Val variable to start at 0 off_val = -50 # While the offset value is less than the total mbx while mbx_total > off_val: # Set off value to self + the size value off_val += sz_val off_str = "&offset=%s" % off_val # Construct URL and make call url = base_url + cst_id + "/domains/" + domain + "/" + mbx_type + "/mailboxes" + sz_str + off_str request = requests.get(url, headers=headers) data = request.json() # Add Users to Mailbox list for key in data[mbx_key]: mbx_usr = key['name'] mbx_usr.encode("utf-8") mailboxes.append(mbx_usr) mailboxes = json.dumps(mailboxes, indent=4, sort_keys=True) return mailboxes def mbx_get(cst_id, domain, mbx_type): # Set Mailbox Type key for dict if mbx_type == 'rs': mbx_key = 'rsMailboxes' else: mbx_key = 'mailboxes' # offset value/url string off_val = 0 off_str = "&offset=%s" % off_val # size value/url string sz_val= 50 sz_str = "?size=%s" % sz_val url = base_url + cst_id + "/domains/" + domain + "/" + mbx_type + "/mailboxes" + sz_str + off_str request = requests.get(url, headers=headers) data = request.json() mbx_total = data['total'] # Empty list for mailboxes global mailboxes mailboxes = [] # Offset Val variable to start at 0 off_val = -50 # While the offset value is less than the total mbx while mbx_total > off_val: # Set off value to self + the size value off_val += sz_val off_str = "&offset=%s" % off_val # Construct URL and make call url = base_url + cst_id + "/domains/" + domain + "/" + mbx_type + "/mailboxes" + sz_str + off_str request = requests.get(url, headers=headers) data = request.json() # Add Users to Mailbox list for key in data[mbx_key]: mbx_usr = key['name'] mbx_usr.encode("utf-8") mailboxes.append(mbx_usr) return mailboxes def user_vex(cst_id, domain, mbx_type, user, user_vex_val): # Set Mailbox Type key for dict if mbx_type == 'rs': mbx_key = 'rsMailboxes' else: mbx_key = 'mailboxes' payload = {'visibleInExchangeGAL' : user_vex_val } url = base_url + cst_id + "/domains/" + domain + "/" + mbx_type + "/mailboxes/" + user request = requests.put(url, headers=headers, data=payload) return "User: '%s' visibleInExchangeGAL has been set to %s" % (user, user_vex_val) def domain_vex(cst_id, domain, mbx_type, domain_vex_val): # Set Mailbox Type key for dict if mbx_type == 'rs': mbx_key = 'rsMailboxes' else: mbx_key = 'mailboxes' payload = {'visibleInExchangeGAL' : domain_vex_val } mbx_get(cst_id, domain, mbx_type) progress = [] for user in mailboxes: url = base_url + cst_id + "/domains/" + domain + "/" + mbx_type + "/mailboxes/" + user request = requests.put(url, headers=headers, data=payload) current_prog = "%s has been updated to %s" % (user, domain_vex_val) print current_prog progress.append(current_prog) return progress
33.408537
107
0.606863
739
5,479
4.315291
0.163735
0.043901
0.057071
0.032612
0.751019
0.751019
0.720916
0.712449
0.712449
0.712449
0
0.006834
0.278883
5,479
163
108
33.613497
0.800304
0.15605
0
0.710526
0
0
0.1338
0
0
0
0
0
0
0
null
null
0
0.052632
null
null
0.008772
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
7
535da048b0306ccff8548afc3c44ddbc2e57bc8b
352
py
Python
devices/cisco/__init__.py
Dom932/device-bug-checker
f1b04813ac4bddc07cc0c3ce62640246fcaaf34f
[ "MIT" ]
null
null
null
devices/cisco/__init__.py
Dom932/device-bug-checker
f1b04813ac4bddc07cc0c3ce62640246fcaaf34f
[ "MIT" ]
null
null
null
devices/cisco/__init__.py
Dom932/device-bug-checker
f1b04813ac4bddc07cc0c3ce62640246fcaaf34f
[ "MIT" ]
null
null
null
from devices.cisco.base_cisco import BaseCisco from devices.cisco.cisco_ios import CiscoIOS from devices.cisco.cisco_ios_telnet import CiscoIOSTelnet from devices.cisco.cisco_ios_ssh_telnet import CiscoIOSSSHTelnet from devices.cisco.cisco_wlc import CiscoWLC from devices.cisco.cisco_asa import CiscoASA from devices.cisco.cisco_nxos import CiscoNXOS
44
64
0.880682
52
352
5.769231
0.346154
0.256667
0.373333
0.42
0.24
0
0
0
0
0
0
0
0.079545
352
7
65
50.285714
0.925926
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
536093bd35bdd159a5fc03e427dc3d29c92817ae
35
py
Python
python_practice/line.py
ccom33/python_practice
9a3551610c46b0bae15542575033e8ed7e967289
[ "MIT" ]
null
null
null
python_practice/line.py
ccom33/python_practice
9a3551610c46b0bae15542575033e8ed7e967289
[ "MIT" ]
null
null
null
python_practice/line.py
ccom33/python_practice
9a3551610c46b0bae15542575033e8ed7e967289
[ "MIT" ]
null
null
null
def line(): print("#","-"*50)
8.75
21
0.4
4
35
3.5
1
0
0
0
0
0
0
0
0
0
0
0.074074
0.228571
35
3
22
11.666667
0.444444
0
0
0
0
0
0.058824
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
1
0
7
726392e8cf51f053a8aaa85efb4b4ab97dbc9108
208
py
Python
python/getalp/wsd/optim/scheduler_fixed.py
getalp/disambiguate-translate
38ef754c786ded085d184633b21acc607902c098
[ "MIT" ]
53
2019-02-12T15:40:22.000Z
2022-03-30T16:54:22.000Z
python/getalp/wsd/optim/scheduler_fixed.py
getalp/disambiguate-translate
38ef754c786ded085d184633b21acc607902c098
[ "MIT" ]
21
2019-06-11T15:21:17.000Z
2022-02-05T11:53:38.000Z
python/getalp/wsd/optim/scheduler_fixed.py
getalp/disambiguate-translate
38ef754c786ded085d184633b21acc607902c098
[ "MIT" ]
19
2019-05-26T10:23:41.000Z
2021-12-06T04:43:08.000Z
class SchedulerFixed(object): def __init__(self, fixed_lr: float): super().__init__() self.fixed_lr = fixed_lr def get_learning_rate(self, step: int): return self.fixed_lr
18.909091
43
0.649038
27
208
4.481481
0.592593
0.231405
0.272727
0.247934
0
0
0
0
0
0
0
0
0.25
208
10
44
20.8
0.775641
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
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
7293a2ba29b443a5acb51e16875eb3e69cac88b8
4,064
py
Python
test/scenarios/mixed-reality/output/ext_Incremental/src/mixed-reality/azext_mixed_reality/generated/custom.py
necusjz/autorest.az
08dd5d35bd7f54f306917d0f1dfa1be4520c4059
[ "MIT" ]
null
null
null
test/scenarios/mixed-reality/output/ext_Incremental/src/mixed-reality/azext_mixed_reality/generated/custom.py
necusjz/autorest.az
08dd5d35bd7f54f306917d0f1dfa1be4520c4059
[ "MIT" ]
null
null
null
test/scenarios/mixed-reality/output/ext_Incremental/src/mixed-reality/azext_mixed_reality/generated/custom.py
necusjz/autorest.az
08dd5d35bd7f54f306917d0f1dfa1be4520c4059
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- # pylint: disable=too-many-lines import json def spatial_anchors_account_regenerate_key(client, resource_group_name, account_name, serial=None): regenerate = {} if serial is not None: regenerate['serial'] = serial else: regenerate['serial'] = 1 return client.regenerate_keys(resource_group_name=resource_group_name, account_name=account_name, regenerate=regenerate) def remote_rendering_account_list(client, resource_group_name=None): if resource_group_name: return client.list_by_resource_group(resource_group_name=resource_group_name) return client.list_by_subscription() def remote_rendering_account_show(client, resource_group_name, account_name): return client.get(resource_group_name=resource_group_name, account_name=account_name) def remote_rendering_account_create(client, resource_group_name, account_name, location, tags=None): remote_rendering_account = {} if tags is not None: remote_rendering_account['tags'] = tags remote_rendering_account['location'] = location remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") return client.create(resource_group_name=resource_group_name, account_name=account_name, remote_rendering_account=remote_rendering_account) def remote_rendering_account_update(client, resource_group_name, account_name, location, tags=None): remote_rendering_account = {} if tags is not None: remote_rendering_account['tags'] = tags remote_rendering_account['location'] = location remote_rendering_account['identity'] = json.loads("{\"type\": \"SystemAssigned\"}") return client.update(resource_group_name=resource_group_name, account_name=account_name, remote_rendering_account=remote_rendering_account) def remote_rendering_account_delete(client, resource_group_name, account_name): return client.delete(resource_group_name=resource_group_name, account_name=account_name) def remote_rendering_account_list_key(client, resource_group_name, account_name): return client.list_keys(resource_group_name=resource_group_name, account_name=account_name) def remote_rendering_account_regenerate_key(client, resource_group_name, account_name, serial=None): regenerate = {} if serial is not None: regenerate['serial'] = serial else: regenerate['serial'] = 1 return client.regenerate_keys(resource_group_name=resource_group_name, account_name=account_name, regenerate=regenerate)
41.050505
87
0.54503
360
4,064
5.791667
0.211111
0.16211
0.203837
0.161151
0.801439
0.785612
0.777458
0.742446
0.676259
0.676259
0
0.00077
0.36122
4,064
98
88
41.469388
0.802388
0.11565
0
0.746479
0
0
0.021211
0
0
0
0
0
0
1
0.112676
false
0
0.014085
0.042254
0.253521
0
0
0
0
null
0
1
1
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
f423ec330a9df0d91892e1b2fcf46389dde5dcf7
175
py
Python
loldib/getratings/models/NA/na_missfortune/__init__.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_missfortune/__init__.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_missfortune/__init__.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from .na_missfortune_top import * from .na_missfortune_jng import * from .na_missfortune_mid import * from .na_missfortune_bot import * from .na_missfortune_sup import *
29.166667
34
0.8
25
175
5.2
0.36
0.230769
0.653846
0.707692
0
0
0
0
0
0
0
0
0.142857
175
5
35
35
0.866667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
7
f43e202d11983a6b9d86a03c926b7a4a9a75f6ab
12,760
py
Python
users/tests.py
coma64/kaffee-kasse-backend
a898caa068cd82d223161fa62a0561f75333d50e
[ "MIT" ]
null
null
null
users/tests.py
coma64/kaffee-kasse-backend
a898caa068cd82d223161fa62a0561f75333d50e
[ "MIT" ]
null
null
null
users/tests.py
coma64/kaffee-kasse-backend
a898caa068cd82d223161fa62a0561f75333d50e
[ "MIT" ]
null
null
null
from contextlib import contextmanager from decimal import Decimal from typing import Iterator from django.contrib.auth.models import User from rest_framework import status from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase @contextmanager def token_auth(test: APITestCase, token: str) -> Iterator[None]: old_creds = test.client._credentials test.client.credentials(HTTP_AUTHORIZATION='Token ' + token) yield test.client.credentials(**old_creds) class UsersTest(APITestCase): password: str user1: User user2: User staff: User user1_token: str staff_token: str api_uri = '/api/users' @classmethod def setUpTestData(cls) -> None: cls.password = '12341324' cls.user1 = User.objects.create_user(username='erni', password=cls.password) cls.user2 = User.objects.create_user(username='ducky', password=cls.password) cls.staff = User.objects.create_superuser( username='staff', password=cls.password ) cls.user1_token = Token.objects.get(user=cls.user1).key cls.staff_token = Token.objects.get(user=cls.staff).key @property def user1_uri(self) -> str: return f'{self.api_uri}/{self.user1.id}/' @property def user2_uri(self) -> str: return f'{self.api_uri}/{self.user2.id}/' def test_me_endpoint(self) -> None: with token_auth(self, self.user1_token): response = self.client.get(f'{self.api_uri}/me/') self.assertEqual(response.data['id'], self.user1.id) def test_token_auth(self) -> None: response = self.client.post( '/api-token-auth/', {'username': self.user1.username, 'password': self.password}, ) self.assertEqual(response.status_code, 200) self.assertIn('token', response.data) def test_anyone_can_create(self) -> None: response = self.client.post( f'{self.api_uri}/', {'username': 'bert', 'password': self.password}, format='json', ) self.assertEqual(response.status_code, status.HTTP_201_CREATED) def test_can_set_profile_fields_on_user_create(self) -> None: response = self.client.post( f'{self.api_uri}/', { 'username': 'bert', 'password': self.password, 'profile': {'bio': 'hi there'}, }, format='json', ) self.assertEqual(response.status_code, status.HTTP_201_CREATED) def test_users_can_list_and_retrieve_all_users(self) -> None: with token_auth(self, self.user1_token): response = self.client.get(f'{self.api_uri}/') self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.get(self.user2_uri) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_users_cant_update_or_delete_other_users(self) -> None: with token_auth(self, self.user1_token): response = self.client.put( self.user2_uri, {'username': 'otto'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) response = self.client.patch( self.user2_uri, {'username': 'otto'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) response = self.client.delete(self.user2_uri) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) def test_users_can_update_and_delete_themselves(self) -> None: with token_auth(self, self.user1_token): response = self.client.put( self.user1_uri, {'username': 'otto', 'password': self.password}, format='json', ) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.patch( self.user1_uri, {'username': 'bernd'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.delete(self.user1_uri) self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT) # Restore user self.user1.save() def test_staff_has_full_access(self) -> None: with token_auth(self, self.staff_token): response = self.client.put( self.user1_uri, {'username': 'otto', 'password': self.password}, format='json', ) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.patch( self.user1_uri, {'username': 'bernd'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.delete(self.user1_uri) self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT) # Restore user self.user1.save() def test_is_staff_query(self) -> None: with token_auth(self, self.user1_token): response = self.client.get(f'{self.api_uri}/?is_staff=1') self.assertEqual(response.status_code, status.HTTP_200_OK) for user in response.data: self.assertTrue(user['is_staff']) response = self.client.get(f'{self.api_uri}/?is_staff=0') self.assertEqual(response.status_code, status.HTTP_200_OK) for user in response.data: self.assertFalse(user['is_staff']) def test_is_staff_query_ignores_wrong_type(self) -> None: with token_auth(self, self.user1_token): response = self.client.get(f'{self.api_uri}/?is_staff=has-to-be-0-or-1') self.assertEqual(response.status_code, status.HTTP_200_OK) def test_username_query(self) -> None: with token_auth(self, self.user1_token): response = self.client.get(f'{self.api_uri}/?username=er') self.assertEqual(response.status_code, status.HTTP_200_OK) for user in response.data: self.assertIn('er', user['username'].lower()) class ProfilesTest(APITestCase): password: str user1: User user2: User staff: User user1_token: str staff_token: str api_uri = '/api/profiles' @classmethod def setUpTestData(cls) -> None: cls.password = '12341234' cls.user1 = User.objects.create_user(username='erni', password=cls.password) cls.user1.profile.bio = 'hi there' cls.user2 = User.objects.create_user(username='ducky', password=cls.password) cls.user2.profile.bio = 'hello' cls.staff = User.objects.create_superuser( username='staff', password=cls.password ) cls.user1_token = Token.objects.get(user=cls.user1).key cls.staff_token = Token.objects.get(user=cls.staff).key @property def profile1_uri(self) -> str: return f'{self.api_uri}/{self.user1.id}/' @property def profile2_uri(self) -> str: return f'{self.api_uri}/{self.user2.id}/' def test_no_one_can_create_or_destroy_profiles(self) -> None: with token_auth(self, self.staff_token): response = self.client.post(f'{self.api_uri}/') self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED) response = self.client.delete(self.profile1_uri) self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED) def test_users_can_update_their_bio(self) -> None: with token_auth(self, self.user1_token): response = self.client.put( self.profile1_uri, {'bio': 'new bio'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.patch( self.profile1_uri, {'bio': 'another bio'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_users_cant_update_balance(self) -> None: with token_auth(self, self.user1_token): response = self.client.put( self.profile1_uri, {'balance': '22.22'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) response = self.client.patch( self.profile1_uri, {'balance': '22.22'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) def test_users_cant_update_is_freeloader(self) -> None: with token_auth(self, self.user1_token): response = self.client.put( self.profile1_uri, {'is_freeloader': True}, format='json' ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) response = self.client.patch( self.profile1_uri, {'is_freeloader': True}, format='json' ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) def test_staff_can_update_balance(self) -> None: with token_auth(self, self.staff_token): response = self.client.put( self.profile1_uri, {'balance': '22.22'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.patch( self.profile1_uri, {'balance': '22.22'}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_staff_can_update_is_freeloader(self) -> None: with token_auth(self, self.staff_token): response = self.client.put( self.profile1_uri, {'is_freeloader': True}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response = self.client.patch( self.profile1_uri, {'is_freeloader': True}, format='json' ) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_users_cant_access_add_balance(self) -> None: with token_auth(self, self.user1_token): response = self.client.patch( f'{self.api_uri}/{self.user1.id}/add-balance/', {'balance': '12.34'}, format='json', ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) def test_staff_can_access_add_balance(self) -> None: with token_auth(self, self.staff_token): response = self.client.patch( f'{self.api_uri}/{self.user1.id}/add-balance/', {'balance': '12.34'}, format='json', ) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_add_balance(self) -> None: with token_auth(self, self.staff_token): self.user1.refresh_from_db() previous_balance = self.user1.profile.balance response = self.client.patch( f'{self.api_uri}/{self.user1.id}/add-balance/', {'balance': '12.34'}, format='json', ) self.assertEqual(response.status_code, status.HTTP_200_OK) self.user1.refresh_from_db() new_balance = self.user1.profile.balance self.assertEqual(new_balance, previous_balance + Decimal('12.34')) def test_is_freeloader_query(self) -> None: with token_auth(self, self.user1_token): response = self.client.get(f'{self.api_uri}/?is_freeloader=1') self.assertEqual(response.status_code, status.HTTP_200_OK) for user in response.data: self.assertTrue(user['is_freeloader']) response = self.client.get(f'{self.api_uri}/?is_freeloader=0') self.assertEqual(response.status_code, status.HTTP_200_OK) for user in response.data: self.assertFalse(user['is_freeloader']) def test_is_freeloader_query_ignores_wrong_type(self) -> None: with token_auth(self, self.user1_token): response = self.client.get( f'{self.api_uri}/?is_freeloader=has-to-be-0-or-1' ) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_bio_query(self) -> None: with token_auth(self, self.user1_token): response = self.client.get(f'{self.api_uri}/?bio=hi') self.assertEqual(response.status_code, status.HTTP_200_OK) for user in response.data: self.assertIn('hi', user['bio'].lower())
38.203593
86
0.617712
1,532
12,760
4.917755
0.093995
0.077648
0.090788
0.142421
0.864746
0.826254
0.822272
0.810327
0.809796
0.808999
0
0.025285
0.265439
12,760
333
87
38.318318
0.778513
0.001959
0
0.588015
0
0
0.091109
0.039507
0
0
0
0
0.172285
1
0.11236
false
0.05618
0.026217
0.014981
0.213483
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
f47ea373770e07eb5e04c9bb153b6262a5cd6d6a
130
py
Python
Module01/bmi-calculator.py
geiyer/cis189-python
2b85ff66277b337aab9f6a7a6fa1c86dccf0178c
[ "MIT" ]
2
2021-02-24T00:32:36.000Z
2021-04-21T00:09:36.000Z
Module01/bmi-calculator.py
geiyer/cis189-python
2b85ff66277b337aab9f6a7a6fa1c86dccf0178c
[ "MIT" ]
null
null
null
Module01/bmi-calculator.py
geiyer/cis189-python
2b85ff66277b337aab9f6a7a6fa1c86dccf0178c
[ "MIT" ]
2
2021-03-30T23:37:49.000Z
2021-04-21T00:08:32.000Z
# height = 1.8 # weight = 72 # bmi = weight/height ** 2 # print(bmi) height = 1.8 weight = 72 bmi = weight/height ** 2 print(bmi)
14.444444
26
0.615385
22
130
3.636364
0.363636
0.175
0.2
0.35
1
1
1
1
1
1
0
0.098039
0.215385
130
9
27
14.444444
0.686275
0.461538
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
0
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
be2e30a5dd54ce0a31b29ad833193c2f0e824140
764
py
Python
myapp/models.py
ruxtain/matrix
00bfaccbd1589cf513de7f690c079a537bff1d19
[ "MIT" ]
4
2019-01-09T09:42:18.000Z
2020-11-05T03:50:54.000Z
myapp/models.py
ruxtain/matrix
00bfaccbd1589cf513de7f690c079a537bff1d19
[ "MIT" ]
null
null
null
myapp/models.py
ruxtain/matrix
00bfaccbd1589cf513de7f690c079a537bff1d19
[ "MIT" ]
null
null
null
from django.db import models class Description(models.Model): '''保存用户提交的描述,可以看看都是些什么人在用我的站''' ip = models.CharField(max_length=20) content = models.TextField() datetime = models.DateTimeField(auto_now_add=True) def __str__(self): return self.content[:100] class Feedback(models.Model): ip = models.CharField(max_length=20) url = models.URLField(default="") content = models.TextField() datetime = models.DateTimeField(auto_now_add=True) def __str__(self): return self.content[:100] class Keyword(models.Model): ip = models.CharField(max_length=20) content = models.TextField() datetime = models.DateTimeField(auto_now_add=True) def __str__(self): return self.content[:100]
30.56
54
0.693717
92
764
5.532609
0.358696
0.064833
0.100196
0.117878
0.776031
0.776031
0.776031
0.776031
0.6778
0.6778
0
0.024194
0.188482
764
25
55
30.56
0.796774
0.032723
0
0.75
0
0
0
0
0
0
0
0
0
1
0.15
false
0
0.05
0.15
1
0
0
0
0
null
0
0
0
0
1
1
1
0
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
1
1
0
0
7
be664c729b4b752bc5fc6308973fcdeffeea3033
27,999
py
Python
test/codes_tests/test_seba.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
1
2019-04-09T09:06:08.000Z
2019-04-09T09:06:08.000Z
test/codes_tests/test_seba.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
null
null
null
test/codes_tests/test_seba.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
import numpy from amuse.test.amusetest import TestWithMPI from amuse.community.seba.interface import SeBaInterface, SeBa from amuse.units import units from amuse.units import constants from amuse.datamodel import Particle from amuse.datamodel import Particles class TestSeBaInterface(TestWithMPI): def test1(self): instance = self.new_instance_of_an_optional_code(SeBaInterface) endtime, mass, radius, luminosity, temperature, time_step, stellar_type, error = instance.evolve_star(1, 4600, 0.02) self.assertEquals(error, 0) self.assertTrue( endtime <= 4600.0) self.assertAlmostRelativeEqual(endtime, 4600.0, 4) self.assertAlmostRelativeEqual(mass, 1.0, 6) self.assertAlmostRelativeEqual(radius, 0.9856, 4) self.assertAlmostRelativeEqual(luminosity, 0.9585, 4) self.assertAlmostRelativeEqual(temperature, 5751, 4) self.assertAlmostRelativeEqual(time_step, 1089.3, 4) self.assertEqual(stellar_type, 1) instance.stop() def test2(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) index,error = instance.new_particle(1.) self.assertEquals(error, 0) self.assertEquals(index, 1) mass, error = instance.get_mass(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 1.0, 6) value, error = instance.get_radius(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 0.88824945029751212, 6) stellar_type, error = instance.get_stellar_type(index) self.assertEquals(error, 0) self.assertEquals(stellar_type, 1) instance.stop() def test3(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) index,error = instance.new_particle(1.) self.assertEquals(error, 0) self.assertEquals(index, 1) error = instance.evolve_model(4600) self.assertEquals(error, 0) mass, error = instance.get_mass(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 1.0, 6) value, error = instance.get_radius(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 0.9856, 4) value, error = instance.get_temperature(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 5751, 4) value, error = instance.get_time_step(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 1089.3, 4) stellar_type, error = instance.get_stellar_type(index) self.assertEquals(error, 0) self.assertEquals(stellar_type, 1) instance.stop() def test4(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) index,error = instance.new_particle(1.) self.assertEquals(error, 0) self.assertEquals(index, 1) for t in range(46): error = instance.evolve_model((t+1) * 100) self.assertEquals(error, 0) mass, error = instance.get_mass(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 1.0, 6) value, error = instance.get_radius(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 0.9856, 4) value, error = instance.get_temperature(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 5751, 4) value, error = instance.get_time_step(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 1089.3, 4) stellar_type, error = instance.get_stellar_type(index) self.assertEquals(error, 0) self.assertEquals(stellar_type, 1) instance.stop() def test5(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) index,error = instance.new_particle([1., 2., 3.]) self.assertEquals(error, 0) self.assertEquals(index, [1,2,3]) mass, error = instance.get_mass(2) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 2 , 6) mass, error = instance.get_mass(3) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 3, 6) error = instance.evolve_model(4600) self.assertEquals(error, 0) mass, error = instance.get_mass(index) print mass self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass[0], 1.0, 6) self.assertAlmostRelativeEqual(mass[1], 0.62973, 4) self.assertAlmostRelativeEqual(mass[2], 0.75012, 4) instance.stop() def test6(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) index,error = instance.new_particle([1., 2., 3.]) self.assertEquals(error, 0) self.assertEquals(index, [1,2,3]) for t in range(46): error = instance.evolve_model((t+1) * 100) self.assertEquals(error, 0) mass, error = instance.get_mass(index) print mass self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, [1.0, 0.62973, 0.75072], 4) instance.stop() def test7(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) index,error = instance.new_particle([1., 2., 3.]) self.assertEquals(error, 0) self.assertEquals(index, [1,2,3]) mass, error = instance.get_mass(2) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 2 , 6) mass, error = instance.get_mass(3) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 3, 6) mass, error = instance.get_mass(4) self.assertEquals(error, -1) error = instance.delete_star(2) self.assertEquals(error, 0) mass, error = instance.get_mass(2) self.assertEquals(error, -1) mass, error = instance.get_mass(3) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 3, 6) index, error = instance.new_particle(4.) self.assertEquals(error, 0) self.assertEquals(index, 4) instance.stop() def test8(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) index,error = instance.new_particle([3.0,1.0,2.0]) self.assertEquals(error, 0) self.assertEquals(index, [1,2,3]) error = instance.delete_star(1) self.assertEquals(error, 0) error = instance.evolve_model(4600); mass, error = instance.get_mass(2) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 1, 6) error = instance.delete_star(3) self.assertEquals(error, 0) index,error = instance.new_particle([5.0]) self.assertEquals(error, 0) mass, error = instance.get_mass(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 5.0, 6) error = instance.evolve_model(5000); mass, error = instance.get_mass(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 0.99057, 4) error = instance.delete_star(2) self.assertEquals(error, 0) error = instance.delete_star(index) self.assertEquals(error, 0) for i in range(4): mass, error = instance.get_mass(index+1) self.assertEquals(error, -1) index,error = instance.new_particle([5.0]) self.assertEquals(error, 0) error = instance.evolve_model(10000); mass, error = instance.get_mass(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 0.99057, 4) instance.stop() def test9(self): instance = SeBaInterface() #self.new_instance_of_an_optional_code(SeBaInterface) error = instance.initialize_code() self.assertEquals(error, 0) instance.set_metallicity(0.001) index,error = instance.new_particle([3.0,0.3]) self.assertEquals(error, 0) self.assertEquals(index, [1,2]) mu = (3.3 | units.MSun) * constants.G orbital_period = 200.0 | units.day semi_major_axis = (((orbital_period / 2.0 * numpy.pi)**2)*mu)**(1.0/3.0) print semi_major_axis.value_in(units.RSun) eccentricity = 0.5 index,error = instance.new_binary( semi_major_axis.value_in(units.RSun), eccentricity, index[0], index[1] ) self.assertEquals(error, 0) self.assertEquals(index, 3) mass, error = instance.get_mass(index) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 3.3, 4) mass, error = instance.get_mass(2) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 0.3, 4) error = instance.evolve_model(300) self.assertEquals(error, 0) mass, error = instance.get_mass(1) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 2.98777, 4) mass, error = instance.get_mass(2) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 0.29999, 4) error = instance.evolve_model(400) self.assertEquals(error, 0) mass, error = instance.get_mass(1) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 0.86679, 4) mass, error = instance.get_mass(2) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(mass, 0.3, 4) error = instance.delete_binary(index) self.assertEquals(error, 0) mass, error = instance.get_mass(index) self.assertEquals(error, -1) # check if singles are still in the mode and evolve value, error = instance.get_age([1,2]) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 400, 4) error = instance.evolve_model(500) self.assertEquals(error, 0) value, error = instance.get_age([1,2]) self.assertEquals(error, 0) self.assertAlmostRelativeEqual(value, 500, 4) class TestSeBa(TestWithMPI): def test1(self): instance = self.new_instance_of_an_optional_code(SeBa) endtime, mass, radius, luminosity, temperature, time_step, stellar_type = instance.evolve_star(1 | units.MSun, 4600 | units.Myr, 0.02) self.assertTrue( endtime <= 4600 | units.Myr) self.assertAlmostRelativeEqual(mass, 1.0 | units.MSun, 4) self.assertAlmostRelativeEqual(radius, 0.9856 | units.RSun, 4) self.assertAlmostRelativeEqual(luminosity, 0.9585 | units.LSun, 4) self.assertAlmostRelativeEqual(temperature, 5751 | units.K, 4) self.assertAlmostRelativeEqual(time_step, 1089.3 | units.Myr, 4) self.assertEqual(stellar_type, 1 | units.stellar_type) def test2(self): instance = self.new_instance_of_an_optional_code(SeBa) p = Particle() p.mass = 5 | units.MSun p.metallicity = 0.02 p = instance.particles.add_particle(p) instance.evolve_model(130 | units.Myr) print p self.assertAlmostRelativeEqual(p.mass, 0.9906 | units.MSun, 4) def test3(self): print "Testing evolution of a close binary system..." instance = self.new_instance_of_an_optional_code(SeBa) instance.commit_parameters() stars = Particles(2) stars[0].mass = 3.0 | units.MSun stars[1].mass = 0.3 | units.MSun mu = (3.3 | units.MSun) * constants.G orbital_period = 200.0 | units.day semi_major_axis = (((orbital_period / (2.0 * numpy.pi))**2)*mu)**(1.0/3.0) instance.particles.add_particles(stars) binaries = Particles(1) binary = binaries[0] binary.semi_major_axis = semi_major_axis binary.eccentricity = 0.5 binary.child1 = stars[0] binary.child2 = stars[1] instance.binaries.add_particles(binaries) from_seba_to_model = instance.particles.new_channel_to(stars) from_seba_to_model.copy() from_seba_to_model_binaries = instance.binaries.new_channel_to(binaries) from_seba_to_model_binaries.copy() previous_type = binary.child1.stellar_type results = [] current_time = 0 | units.Myr while current_time < (480 | units.Myr): instance.update_time_steps() # The next line appears a bit weird, but saves time for this simple test. deltat = max(1.0*instance.binaries[0].time_step, 0.1| units.Myr) current_time = current_time + deltat instance.evolve_model(current_time) from_seba_to_model.copy() from_seba_to_model_binaries.copy() if not binary.child1.stellar_type == previous_type: results.append((binary.age, binary.child1.mass, binary.child1.stellar_type)) previous_type = binary.child1.stellar_type self.assertEqual(len(results), 6) for x in results: print x types = ( "Hertzsprung Gap", "First Giant Branch", "Core Helium Burning", "First Asymptotic Giant Branch", "Giant Branch Naked Helium star", "Carbon/Oxygen White Dwarf", ) for result, expected in zip(results, types): self.assertEquals(str(result[2]), expected) times = ( 377.6369 | units.Myr, 379.8877 | units.Myr, 382.3112 | units.Myr, 473.4804 | units.Myr, 475.4766 | units.Myr, 476.6182 | units.Myr, ) for result, expected in zip(results, times): self.assertAlmostEqual(result[0].value_in(units.Myr), expected.value_in(units.Myr), 0) masses = ( 3.0000 | units.MSun, 3.0000 | units.MSun, 2.9983 | units.MSun, 2.9741 | units.MSun, 0.6710 | units.MSun, 0.6596 | units.MSun, ) for result, expected in zip(results, masses): self.assertAlmostEqual(result[1].value_in(units.MSun), expected.value_in(units.MSun), 2) instance.stop() def test5(self): instance = self.new_instance_of_an_optional_code(SeBa) self.assertAlmostRelativeEquals(instance.parameters.metallicity , 0.02) instance.parameters.metallicity = 0.04 self.assertAlmostRelativeEquals(instance.parameters.metallicity , 0.04) def test6(self): instance = self.new_instance_of_an_optional_code(SeBa) self.assertFalse(instance.parameters.is_logging_of_evolve_enabled) instance.parameters.is_logging_of_evolve_enabled = True self.assertTrue(instance.parameters.is_logging_of_evolve_enabled) def test7(self): instance = self.new_instance_of_an_optional_code(SeBa) instance.commit_parameters() stars = Particles(2) stars[0].mass = 3.0 | units.MSun stars[1].mass = 0.3 | units.MSun mu = (3.3 | units.MSun) * constants.G orbital_period = 200.0 | units.day semi_major_axis = (((orbital_period / (2.0 * numpy.pi))**2)*mu)**(1.0/3.0) instance.particles.add_particles(stars) binaries = Particles(1) binary = binaries[0] binary.semi_major_axis = semi_major_axis binary.eccentricity = 0.5 binary.child1 = stars[0] binary.child2 = stars[1] instance.binaries.add_particles(binaries) self.assertAlmostRelativeEquals(instance.binaries[0].child1.mass, 3.0 | units.MSun, 4) self.assertAlmostRelativeEquals(instance.binaries[0].child2.mass, 0.3 | units.MSun, 4) def xtest7(self): instance = self.new_instance_of_an_optional_code(SeBa) instance.parameters.metallicity = 0.03 p = Particle() p.mass = 99.1605930967 | units.MSun p = instance.particles.add_particle(p) instance.evolve_model(614 | units.Myr) print p.stellar_type self.assertEquals(str(p.stellar_type),'Black Hole') self.assertAlmostRelativeEqual(p.mass, 0.9906 | units.MSun, 4) def test8(self): instance = self.new_instance_of_an_optional_code(SeBa) instance.parameters.supernova_kick_velocity = 0 | units.kms instance.commit_parameters() print "v_kick=", instance.parameters.supernova_kick_velocity stars = Particles(2) stars[0].mass = 10.0 | units.MSun stars[1].mass = 9 | units.MSun semi_major_axis = 10000|units.AU instance.particles.add_particles(stars) binaries = Particles(1) binary = binaries[0] binary.semi_major_axis = semi_major_axis binary.eccentricity = 0 binary.child1 = stars[0] binary.child2 = stars[1] instance.binaries.add_particles(binaries) instance.evolve_model(30|units.Myr) print instance.particles print instance.binaries self.assertAlmostRelativeEquals(instance.binaries[0].eccentricity, 0.7872, 4) def test9(self): instance = self.new_instance_of_an_optional_code(SeBa) stars = Particles(2) stars[0].mass = 10.0 | units.MSun stars[1].mass = 9 | units.MSun instance.particles.add_particles(stars) instance.evolve_model(30|units.Myr) self.assertAlmostRelativeEquals(instance.particles.age, [30,30] |units.Myr) self.assertAlmostRelativeEquals(instance.model_time, 30 | units.Myr) self.assertAlmostRelativeEquals(instance.particles[0].mass, 1.2263 | units.MSun, 4) self.assertAlmostRelativeEquals(instance.particles[1].mass, 8.8682 | units.MSun, 4) stars = Particles(2) stars[0].mass = 10.0 | units.MSun stars[1].mass = 9 | units.MSun instance.particles.add_particles(stars) instance.evolve_model(60|units.Myr) print instance.particles.age print instance.particles.mass self.assertAlmostRelativeEquals(instance.model_time, 60 | units.Myr) self.assertAlmostRelativeEquals(instance.particles.age, [60,60,30,30] |units.Myr) self.assertAlmostRelativeEquals(instance.particles[2].mass, 1.2263 | units.MSun, 4) self.assertAlmostRelativeEquals(instance.particles[3].mass, 8.8682 | units.MSun, 4) def test10(self): """ Test supernova stopping condition """ instance = self.new_instance_of_an_optional_code(SeBa) instance.stopping_conditions.supernova_detection.enable() p = Particle() p.mass = 10 | units.MSun p.metallicity = 0.02 p = instance.particles.add_particle(p) instance.set_supernova_kick_velocity(0.0|units.kms) instance.evolve_model(30 | units.Myr) self.assertEquals(instance.stopping_conditions.supernova_detection.is_set(), True) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[0].key, p.key) self.assertAlmostRelativeEqual(p.age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(p.mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(p.natal_kick_velocity, [0,0,0] | units.kms, 4) def test11(self): """ Test supernova stopping condition in a binary """ instance = self.new_instance_of_an_optional_code(SeBa) instance.stopping_conditions.supernova_detection.enable() stars = Particles(2) stars[0].mass = 10.0 | units.MSun stars[1].mass = 5.0 | units.MSun instance.particles.add_particles(stars) binaries = Particles(1) binary = binaries[0] binary.semi_major_axis = 1.e6|units.RSun binary.eccentricity = 0.1 binary.child1 = stars[0] binary.child2 = stars[1] instance.binaries.add_particles(binaries) instance.evolve_model(30 | units.Myr) self.assertEquals(instance.stopping_conditions.supernova_detection.is_set(), True) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[0].key, instance.binaries[0].child1.key) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[0].key, instance.particles[0].key) print instance.parameters self.assertAlmostRelativeEqual(instance.particles[0].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[1].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[0].mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[1].mass, 5.0 | units.MSun, 4) # self.assertAlmostRelativeEqual(instance.particles[0].natal_kick_velocity, [0,0,0] | units.kms, 4) self.assertAlmostRelativeEqual(instance.binaries[0].child1.age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.binaries[0].child2.age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.binaries[0].child1.mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.binaries[0].child2.mass, 5.0 | units.MSun, 4) # self.assertAlmostRelativeEqual(instance.binaries[0].child1.natal_kick_velocity, [0,0,0] | units.kms, 4) def test12(self): """ Test supernova stopping condition with multiple stars """ instance = self.new_instance_of_an_optional_code(SeBa) instance.stopping_conditions.supernova_detection.enable() stars = Particles(3) stars[0].mass = 10.0 | units.MSun stars[1].mass = 5.0 | units.MSun stars[2].mass = 0.5 | units.MSun instance.particles.add_particles(stars) instance.evolve_model(30 | units.Myr) self.assertEquals(instance.stopping_conditions.supernova_detection.is_set(), True) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[0].key, instance.particles[0].key) self.assertAlmostRelativeEqual(instance.particles[0].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[1].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[2].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[0].mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[1].mass, 5.0 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[2].mass, 0.5 | units.MSun, 4) # self.assertAlmostRelativeEqual(instance.particles[0].natal_kick_velocity, [0,0,0] | units.kms, 4) def test13(self): """ Test supernova stopping condition with multiple stars """ instance = self.new_instance_of_an_optional_code(SeBa) instance.stopping_conditions.supernova_detection.enable() stars = Particles(3) stars[0].mass = 10.0 | units.MSun stars[1].mass = 11.0 | units.MSun stars[2].mass = 0.5 | units.MSun instance.particles.add_particles(stars) instance.evolve_model(30 | units.Myr) self.assertEquals(instance.stopping_conditions.supernova_detection.is_set(), True) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[0].key, instance.particles[1].key) self.assertAlmostRelativeEqual(instance.particles[0].age, 23.08688 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[1].age, 23.08688 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[2].age, 23.08688 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[0].mass, 9.92275 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[1].mass, 1.23645 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[2].mass, 0.5 | units.MSun, 4) # self.assertAlmostRelativeEqual(instance.particles[0].natal_kick_velocity, [0,0,0] | units.kms, 4) instance.evolve_model(30 | units.Myr) self.assertEquals(instance.stopping_conditions.supernova_detection.is_set(), True) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[0].key, instance.particles[0].key) self.assertAlmostRelativeEqual(instance.particles[0].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[1].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[2].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[0].mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[1].mass, 1.23645 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[2].mass, 0.5 | units.MSun, 4) # self.assertAlmostRelativeEqual(instance.particles[0].natal_kick_velocity, [0,0,0] | units.kms, 4) def test14(self): """ Test supernova stopping condition with multiple stars of equal mass """ instance = self.new_instance_of_an_optional_code(SeBa) instance.stopping_conditions.supernova_detection.enable() stars = Particles(3) stars[0].mass = 10.0 | units.MSun stars[1].mass = 10.0 | units.MSun stars[2].mass = 0.5 | units.MSun instance.particles.add_particles(stars) instance.evolve_model(30 | units.Myr) self.assertEquals(instance.stopping_conditions.supernova_detection.is_set(), True) self.assertEquals(len(instance.stopping_conditions.supernova_detection.particles(0)), 2) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[0].key, instance.particles[0].key) self.assertEquals(instance.stopping_conditions.supernova_detection.particles(0)[1].key, instance.particles[1].key) self.assertAlmostRelativeEqual(instance.particles[0].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[1].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[2].age, 27.35866 | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[0].mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[1].mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[2].mass, 0.5 | units.MSun, 4) # self.assertAlmostRelativeEqual(instance.particles[0].natal_kick_velocity, [0,0,0] | units.kms, 4) # self.assertAlmostRelativeEqual(instance.particles[1].natal_kick_velocity, [0,0,0] | units.kms, 4) instance.evolve_model(30 | units.Myr) self.assertEquals(instance.stopping_conditions.supernova_detection.is_set(), False) self.assertAlmostRelativeEqual(instance.particles[0].age, 30. | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[1].age, 30. | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[2].age, 30. | units.Myr, 4) self.assertAlmostRelativeEqual(instance.particles[0].mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[1].mass, 1.22632 | units.MSun, 4) self.assertAlmostRelativeEqual(instance.particles[2].mass, 0.5 | units.MSun, 4)
39.941512
142
0.664095
3,373
27,999
5.391343
0.075304
0.088864
0.080836
0.079846
0.864779
0.823206
0.771515
0.735716
0.71482
0.682925
0
0.055778
0.223937
27,999
700
143
39.998571
0.781122
0.04568
0
0.660342
0
0
0.007497
0
0
0
0
0
0.394687
0
null
null
0
0.013283
null
null
0.024668
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
1
0
0
0
0
0
0
0
0
7
be7986643206344875b12336c761234b747ab429
7,831
py
Python
dwitter/tests/feed/test_post_views.py
jellyedwards/dwitter
88c9c2351c2774db58fff77ba3314e6a95aadf5c
[ "Apache-2.0" ]
714
2015-12-30T01:20:54.000Z
2022-03-29T17:20:10.000Z
dwitter/tests/feed/test_post_views.py
jellyedwards/dwitter
88c9c2351c2774db58fff77ba3314e6a95aadf5c
[ "Apache-2.0" ]
341
2015-12-30T00:30:17.000Z
2022-02-17T06:34:13.000Z
dwitter/tests/feed/test_post_views.py
jellyedwards/dwitter
88c9c2351c2774db58fff77ba3314e6a95aadf5c
[ "Apache-2.0" ]
95
2016-01-26T17:15:42.000Z
2021-11-23T13:09:10.000Z
from django.test import TransactionTestCase, Client from django.contrib.auth.models import User from django.contrib import auth from dwitter.models import Dweet, Comment, Hashtag from django.utils import timezone class PostDweetTestCase(TransactionTestCase): def setUp(self): self.client = Client() self.user = User.objects.create(username="user", password="invalid_pw_hash") self.user.set_password("hunter2") # Created with proper hash so you can log in! self.user.save() self.dweet = Dweet.objects.create(id=1000, code="dweet code", posted=timezone.now(), author=self.user) def login(self): # Log in self.client.post('/accounts/login/', {'username': 'user', 'password': 'hunter2'}, follow=True) user = auth.get_user(self.client) self.assertTrue(user.is_authenticated, "Should be logged in after logging in") return user def test_post_new_dweet(self): user = self.login() response = self.client.post('/dweet', {'code': 'test_code'}, follow=True) self.assertEqual(response.status_code, 200, "Posting dweet return 200. Status code " + str(response.status_code)) dweet = Dweet.objects.get(code='test_code') self.assertEqual(dweet.code, 'test_code') self.assertEqual(dweet.author, user) def test_post_new_dweet_with_first_comment(self): user = self.login() response = self.client.post('/dweet', {'code': 'test_code', 'first-comment': 'hello there'}, follow=True) self.assertEqual(response.status_code, 200, "Posting dweet return 200. Status code " + str(response.status_code)) dweet = Dweet.objects.get(code='test_code') self.assertEqual(dweet.code, 'test_code') self.assertEqual(dweet.author, user) comment = Comment.objects.get(reply_to=dweet) self.assertEqual(comment.text, 'hello there') self.assertEqual(comment.author, user) def test_post_new_dweet_with_first_comment_with_hashtag(self): user = self.login() response = self.client.post('/dweet', {'code': 'test_code', 'first-comment': 'hello there #woo'}, follow=True) self.assertEqual(response.status_code, 200, "Posting dweet return 200. Status code " + str(response.status_code)) dweet = Dweet.objects.get(code='test_code') self.assertEqual(dweet.code, 'test_code') self.assertEqual(dweet.author, user) comment = Comment.objects.get(reply_to=dweet) self.assertEqual(comment.text, 'hello there #woo') self.assertEqual(comment.author, user) hashtag = Hashtag.objects.get(name='woo') self.assertEqual(dweet in hashtag.dweets.all(), True) def test_too_long_dweet_post(self): user = self.login() response = self.client.post('/dweet', {'code': 'test code that is way too long,' + 'wow this looks long in code.' + 'We could fit so much in here.' + 'oh wow. mooooooooooooooooar text.' + 'Getting there.' + 'And BAM tooo long!'}, follow=True) self.assertContains(response, "Dweet code too long!", status_code=400) # shorter code should go through! response = self.client.post('/dweet', {'code': 'test code that is a lot shorter,' + 'wow this looks long in code.' + 'And BAM not tooo long!'}, follow=True) self.assertEqual(response.status_code, 200) dweets = Dweet.objects.filter(author=user) self.assertEqual(dweets.count(), 2) def test_post_dweet_reply(self): user = self.login() response = self.client.post('/d/1000/reply', {'code': 'test_code'}, follow=True) self.assertEqual(response.status_code, 200, "Posting dweet return 200. Status code " + str(response.status_code)) dweet = Dweet.objects.get(code='test_code') self.assertEqual(dweet.code, 'test_code') self.assertEqual(dweet.author, user) self.assertEqual(dweet.reply_to, self.dweet) def test_post_dweet_reply_with_first_comment(self): user = self.login() response = self.client.post('/d/1000/reply', {'code': 'test_code', 'first-comment': 'hello there'}, follow=True) self.assertEqual(response.status_code, 200, "Posting dweet return 200. Status code " + str(response.status_code)) dweet = Dweet.objects.get(code='test_code') self.assertEqual(dweet.code, 'test_code') self.assertEqual(dweet.author, user) self.assertEqual(dweet.reply_to, self.dweet) comment = Comment.objects.get(reply_to=dweet) self.assertEqual(comment.text, 'hello there') self.assertEqual(comment.author, user) def test_post_dweet_reply_with_first_comment_with_hashtag(self): user = self.login() response = self.client.post('/d/1000/reply', {'code': 'test_code', 'first-comment': 'hello there #woo'}, follow=True) self.assertEqual(response.status_code, 200, "Posting dweet return 200. Status code " + str(response.status_code)) dweet = Dweet.objects.get(code='test_code') self.assertEqual(dweet.code, 'test_code') self.assertEqual(dweet.author, user) self.assertEqual(dweet.reply_to, self.dweet) comment = Comment.objects.get(reply_to=dweet) self.assertEqual(comment.text, 'hello there #woo') self.assertEqual(comment.author, user) hashtag = Hashtag.objects.get(name='woo') self.assertEqual(dweet in hashtag.dweets.all(), True) def test_too_long_dweet_reply(self): user = self.login() response = self.client.post('/d/1000/reply', {'code': 'test code that is way too long,' + 'wow this looks long in code.' + 'We could fit so much in here.' + 'oh wow. mooooooooooooooooar text.' + 'Getting there.' + 'And BAM tooo long!'}, follow=True) self.assertContains(response, "Dweet code too long!", status_code=400) # shorter code should go through! response = self.client.post('/d/1000/reply', {'code': 'test code that is a lot shorter,' + 'wow this looks long in code.' + 'And BAM not tooo long!'}, follow=True) self.assertEqual(response.status_code, 200) dweets = Dweet.objects.filter(author=user) self.assertEqual(dweets.count(), 2) def test_like_dweet(self): pass # TODO def test_unlike_dweet(self): pass # TODO def test_delete_dweet(self): pass # TODO def test_GET_requests_fail(self): pass # TODO
43.505556
98
0.551143
845
7,831
4.992899
0.134911
0.124437
0.062574
0.045508
0.839298
0.83835
0.815833
0.815833
0.808485
0.808485
0
0.014743
0.341719
7,831
179
99
43.748603
0.803686
0.017111
0
0.711111
0
0
0.171176
0
0
0
0
0.005587
0.281481
1
0.103704
false
0.051852
0.037037
0
0.155556
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
8
bea71da4977211c3d2957bf916b78fef01639628
3,508
py
Python
pybitcore/api.py
tianshanghong/pybitcore
c6abde8b1c2d43a6f8111db0c4f6ef821251695a
[ "MIT" ]
1
2019-07-23T17:47:17.000Z
2019-07-23T17:47:17.000Z
pybitcore/api.py
tianshanghong/pybitcore
c6abde8b1c2d43a6f8111db0c4f6ef821251695a
[ "MIT" ]
null
null
null
pybitcore/api.py
tianshanghong/pybitcore
c6abde8b1c2d43a6f8111db0c4f6ef821251695a
[ "MIT" ]
1
2019-08-02T05:49:15.000Z
2019-08-02T05:49:15.000Z
import json import requests class BitCoreAPI: def __init__(self, host="127.0.0.1", port=3000): self.url_base = f"http://{host}:{port}" def get_transaction_by_block_height(self, block_height: int): _url = self.url_base + f"/api/BTC/mainnet/tx?blockHeight={block_height}" _str = requests.get(_url).text return json.loads(_str) def get_transaction_by_block_hash(self, block_hash: str): _url = self.url_base + f"/api/BTC/mainnet/tx?blockHash={block_hash}" _str = requests.get(_url).text return json.loads(_str) def get_coins(self, txid: str): _url = self.url_base + f"/api/BTC/mainnet/tx/{txid}/coins" _str = requests.get(_url).text return json.loads(_str) def get_address_transactions(self, address: str): _url = self.url_base + f"/api/BTC/mainnet/address/{address}/txs" _str = requests.get(_url).text return json.loads(_str) def get_transaction_outputs_by_address(self, address: str): _url = self.url_base + f"/api/BTC/mainnet/address/{address}/?unspent=true" _str = requests.get(_url).text return json.loads(_str) def get_balance_for_an_address(self, address: str): _url = self.url_base + f"/api/BTC/mainnet/address/{address}/balance" _str = requests.get(_url).text return json.loads(_str) def get_block(self, block_id: str): _url = self.url_base + f"/api/BTC/mainnet/block/{block_id}" _str = requests.get(_url).text return json.loads(_str) def get_current_height(self): _url = self.url_base + f"/api/BTC/mainnet/block/tip" _str = requests.get(_url).text return json.loads(_str) def get_wallet(self, pub_key: str): _url = self.url_base + f"/api/BTC/mainnet/wallet/{pub_key}" _str = requests.get(_url).text return json.loads(_str) def get_wallet_address(self, pub_key: str): _url = self.url_base + f"/api/BTC/mainnet/wallet/{pub_key}/addresses" _str = requests.get(_url).text return json.loads(_str) def get_wallet_transactions(self, pub_key: str): _url = self.url_base + f"/api/BTC/mainnet/wallet/{pub_key}/transactions" _str = requests.get(_url).text return json.loads(_str) def get_balance(self, pub_key: str): _url = self.url_base + f"/api/BTC/mainnet/wallet/{pub_key}/balance" _str = requests.get(_url).text return json.loads(_str) def get_wallet_utxos(self, pub_key: str): _url = self.url_base + f"/api/BTC/mainnet/wallet/{pub_key}/balance" _str = requests.get(_url).text return json.loads(_str) def get_wallet_utxos(self, pub_key: str): _url = self.url_base + f"/api/BTC/mainnet/wallet/{pub_key}/utxos" _str = requests.get(_url).text return json.loads(_str) def get_fee_estimate_for_within_n_blocks(self, target: int): _url = self.url_base + f"/api/BTC/mainnet/fee/{target}" _str = requests.get(_url).text return json.loads(_str) def get_daily_transactions(self): _url = self.url_base + f"/api/BTC/mainnet/stats/daily-transactions" _str = requests.get(_url).text return json.loads(_str) def get_enabled_chains(self): _url = self.url_base + f"/api/status/enabled-chains" _str = requests.get(_url).text return json.loads(_str)
38.130435
82
0.63683
497
3,508
4.193159
0.130785
0.070537
0.09501
0.103647
0.800384
0.785509
0.785509
0.774952
0.774952
0.675144
0
0.003724
0.234607
3,508
92
83
38.130435
0.772439
0
0
0.520548
0
0
0.192363
0.184098
0
0
0
0
0
1
0.246575
false
0
0.027397
0
0.520548
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
8
fe597c19f3d13db31bd446303d460cc03cfd1cd8
1,335
py
Python
tests/apps/github_webhook/workflow_test.py
Thornycrackers-Forks/busy-beaver
e47d481d217e137ecc2a9e450b9a101b508ce50f
[ "MIT" ]
null
null
null
tests/apps/github_webhook/workflow_test.py
Thornycrackers-Forks/busy-beaver
e47d481d217e137ecc2a9e450b9a101b508ce50f
[ "MIT" ]
null
null
null
tests/apps/github_webhook/workflow_test.py
Thornycrackers-Forks/busy-beaver
e47d481d217e137ecc2a9e450b9a101b508ce50f
[ "MIT" ]
null
null
null
import pytest from busy_beaver.apps.github_webhook.workflow import ( generate_new_issue_message, generate_new_pull_request_message, ) pytest_plugins = ("tests._utilities.fixtures.github",) @pytest.mark.unit def test_generate_new_issue_message_action_is_open(generate_event_subscription_request): data = generate_event_subscription_request(action="opened", issue_html_url="url") result = generate_new_issue_message(data) assert "New Issue" in result assert "url" in result @pytest.mark.unit def test_generate_new_issue_message_action_is_not_open( generate_event_subscription_request ): data = generate_event_subscription_request(action="something_else") result = generate_new_issue_message(data) assert not result @pytest.mark.unit def test_generate_new_pr_message_action_is_open(generate_event_subscription_request): data = generate_event_subscription_request(action="opened", pr_html_url="url") result = generate_new_pull_request_message(data) assert "New Pull Request" in result assert "url" in result @pytest.mark.unit def test_generate_new_pr_message_action_is_not_open( generate_event_subscription_request ): data = generate_event_subscription_request(action="something_else") result = generate_new_pull_request_message(data) assert not result
28.404255
88
0.807491
180
1,335
5.516667
0.216667
0.110775
0.20141
0.257805
0.848943
0.807654
0.787513
0.726083
0.652568
0.652568
0
0
0.123596
1,335
46
89
29.021739
0.848718
0
0
0.5625
1
0
0.081648
0.02397
0
0
0
0
0.1875
1
0.125
false
0
0.0625
0
0.1875
0
0
0
0
null
0
1
1
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
0
0
0
0
0
0
0
0
8
2299a16e5e75a3a64d5bdcd25907ac97a785ea5e
59,415
py
Python
cisco_threatgrid/icon_cisco_threatgrid/actions/search_for_sample_report_by_sha256/schema.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
1
2020-03-18T09:14:55.000Z
2020-03-18T09:14:55.000Z
cisco_threatgrid/icon_cisco_threatgrid/actions/search_for_sample_report_by_sha256/schema.py
OSSSP/insightconnect-plugins
846758dab745170cf1a8c146211a8bea9592e8ff
[ "MIT" ]
null
null
null
cisco_threatgrid/icon_cisco_threatgrid/actions/search_for_sample_report_by_sha256/schema.py
OSSSP/insightconnect-plugins
846758dab745170cf1a8c146211a8bea9592e8ff
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Search for a sample report matching the given hash" class Input: SHA256 = "sha256" class Output: SAMPLE_REPORT_LIST = "sample_report_list" class SearchForSampleReportBySha256Input(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 1 } }, "required": [ "sha256" ] } """) def __init__(self): super(self.__class__, self).__init__(self.schema) class SearchForSampleReportBySha256Output(komand.Output): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "sample_report_list": { "type": "array", "title": "Sample Report List", "description": "Sample report list", "items": { "$ref": "#/definitions/sample_report" }, "order": 1 } }, "required": [ "sample_report_list" ], "definitions": { "analysis": { "type": "object", "title": "analysis", "properties": { "behaviors": { "type": "array", "title": "Behaviors", "description": "Behaviors", "items": { "$ref": "#/definitions/behaviors" }, "order": 1 }, "metadata": { "$ref": "#/definitions/metadata", "title": "Metadata", "description": "Metadata", "order": 3 }, "threat_score": { "type": "integer", "title": "Threat Score", "description": "Threat score", "order": 2 } }, "definitions": { "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "behaviors": { "type": "object", "title": "behaviors", "properties": { "name": { "type": "string", "title": "Name", "description": "Name", "order": 1 }, "threat": { "type": "integer", "title": "Threat", "description": "Threat", "order": 2 }, "title": { "type": "string", "title": "Title", "description": "Title", "order": 3 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "metadata": { "type": "object", "title": "metadata", "properties": { "analyzed_file": { "$ref": "#/definitions/analyzed_file", "title": "Analyzed File", "description": "Analyzed file", "order": 3 }, "general_details": { "$ref": "#/definitions/general_details", "title": "General Details", "description": "General details", "order": 1 }, "malware_desc": { "type": "array", "title": "Malware Description", "description": "Malware description", "items": { "$ref": "#/definitions/malware_desc" }, "order": 5 }, "sandcastle_env": { "$ref": "#/definitions/sandcastle_env", "title": "Sandcastle ENV", "description": "Sandcastle ENV", "order": 2 }, "submitted_file": { "$ref": "#/definitions/analyzed_file", "title": "Submitted File", "description": "Submitted file", "order": 4 } }, "definitions": { "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } }, "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "behaviors": { "type": "object", "title": "behaviors", "properties": { "name": { "type": "string", "title": "Name", "description": "Name", "order": 1 }, "threat": { "type": "integer", "title": "Threat", "description": "Threat", "order": 2 }, "title": { "type": "string", "title": "Title", "description": "Title", "order": 3 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "metadata": { "type": "object", "title": "metadata", "properties": { "analyzed_file": { "$ref": "#/definitions/analyzed_file", "title": "Analyzed File", "description": "Analyzed file", "order": 3 }, "general_details": { "$ref": "#/definitions/general_details", "title": "General Details", "description": "General details", "order": 1 }, "malware_desc": { "type": "array", "title": "Malware Description", "description": "Malware description", "items": { "$ref": "#/definitions/malware_desc" }, "order": 5 }, "sandcastle_env": { "$ref": "#/definitions/sandcastle_env", "title": "Sandcastle ENV", "description": "Sandcastle ENV", "order": 2 }, "submitted_file": { "$ref": "#/definitions/analyzed_file", "title": "Submitted File", "description": "Submitted file", "order": 4 } }, "definitions": { "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } }, "properties": { "type": "object", "title": "properties", "properties": { "metadata": { "type": "object", "title": "Metadata", "description": "Metadata", "order": 1 } } }, "sample_report": { "type": "object", "title": "sample_report", "properties": { "analysis": { "$ref": "#/definitions/analysis", "title": "Analysis", "description": "Analysis", "order": 11 }, "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 7 }, "login": { "type": "string", "title": "Login", "description": "Login", "order": 12 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 15 }, "organization_id": { "type": "integer", "title": "Organization ID", "description": "Organization ID", "order": 8 }, "private": { "type": "boolean", "title": "Private", "description": "Private", "order": 6 }, "properties": { "$ref": "#/definitions/properties", "title": "Properties", "description": "Properties", "order": 14 }, "sample": { "type": "string", "title": "Sample", "description": "Sample", "order": 2 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 3 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 13 }, "state": { "type": "string", "title": "State", "description": "State", "order": 9 }, "status": { "type": "string", "title": "Status", "description": "Status", "order": 1 }, "submitted_at": { "type": "string", "title": "Submitted At", "description": "Submitted at", "order": 4 }, "tags": { "type": "array", "title": "Tags", "description": "Tags", "items": { "type": "string" }, "order": 5 }, "vm_runtime": { "type": "integer", "title": "VM Runtime", "description": "VM runtime", "order": 10 } }, "definitions": { "analysis": { "type": "object", "title": "analysis", "properties": { "behaviors": { "type": "array", "title": "Behaviors", "description": "Behaviors", "items": { "$ref": "#/definitions/behaviors" }, "order": 1 }, "metadata": { "$ref": "#/definitions/metadata", "title": "Metadata", "description": "Metadata", "order": 3 }, "threat_score": { "type": "integer", "title": "Threat Score", "description": "Threat score", "order": 2 } }, "definitions": { "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "behaviors": { "type": "object", "title": "behaviors", "properties": { "name": { "type": "string", "title": "Name", "description": "Name", "order": 1 }, "threat": { "type": "integer", "title": "Threat", "description": "Threat", "order": 2 }, "title": { "type": "string", "title": "Title", "description": "Title", "order": 3 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "metadata": { "type": "object", "title": "metadata", "properties": { "analyzed_file": { "$ref": "#/definitions/analyzed_file", "title": "Analyzed File", "description": "Analyzed file", "order": 3 }, "general_details": { "$ref": "#/definitions/general_details", "title": "General Details", "description": "General details", "order": 1 }, "malware_desc": { "type": "array", "title": "Malware Description", "description": "Malware description", "items": { "$ref": "#/definitions/malware_desc" }, "order": 5 }, "sandcastle_env": { "$ref": "#/definitions/sandcastle_env", "title": "Sandcastle ENV", "description": "Sandcastle ENV", "order": 2 }, "submitted_file": { "$ref": "#/definitions/analyzed_file", "title": "Submitted File", "description": "Submitted file", "order": 4 } }, "definitions": { "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } }, "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "behaviors": { "type": "object", "title": "behaviors", "properties": { "name": { "type": "string", "title": "Name", "description": "Name", "order": 1 }, "threat": { "type": "integer", "title": "Threat", "description": "Threat", "order": 2 }, "title": { "type": "string", "title": "Title", "description": "Title", "order": 3 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "metadata": { "type": "object", "title": "metadata", "properties": { "analyzed_file": { "$ref": "#/definitions/analyzed_file", "title": "Analyzed File", "description": "Analyzed file", "order": 3 }, "general_details": { "$ref": "#/definitions/general_details", "title": "General Details", "description": "General details", "order": 1 }, "malware_desc": { "type": "array", "title": "Malware Description", "description": "Malware description", "items": { "$ref": "#/definitions/malware_desc" }, "order": 5 }, "sandcastle_env": { "$ref": "#/definitions/sandcastle_env", "title": "Sandcastle ENV", "description": "Sandcastle ENV", "order": 2 }, "submitted_file": { "$ref": "#/definitions/analyzed_file", "title": "Submitted File", "description": "Submitted file", "order": 4 } }, "definitions": { "analyzed_file": { "type": "object", "title": "analyzed_file", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 6 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 5 } } }, "general_details": { "type": "object", "title": "general_details", "properties": { "report_created": { "type": "string", "title": "Report Created", "description": "Report created", "order": 2 }, "sandbox_id": { "type": "string", "title": "Sandbox ID", "description": "Sandbox ID", "order": 3 }, "sandbox_version": { "type": "string", "title": "Sandbox Version", "description": "Sandbox version", "order": 1 } } }, "malware_desc": { "type": "object", "title": "malware_desc", "properties": { "filename": { "type": "string", "title": "Filename", "description": "Filename", "order": 3 }, "magic": { "type": "string", "title": "Magic", "description": "Magic", "order": 2 }, "md5": { "type": "string", "title": "MD5", "description": "MD5", "order": 5 }, "sha1": { "type": "string", "title": "SHA1", "description": "SHA1", "order": 1 }, "sha256": { "type": "string", "title": "SHA256", "description": "SHA256", "order": 4 }, "size": { "type": "integer", "title": "Size", "description": "Size", "order": 7 }, "type": { "type": "string", "title": "Type", "description": "Type", "order": 6 } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } }, "properties": { "type": "object", "title": "properties", "properties": { "metadata": { "type": "object", "title": "Metadata", "description": "Metadata", "order": 1 } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } }, "sandcastle_env": { "type": "object", "title": "sandcastle_env", "properties": { "analysis_end": { "type": "string", "title": "Analysis End", "description": "Analysis end", "order": 6 }, "analysis_features": { "type": "array", "title": "Analysis Features", "description": "Analysis features", "items": { "type": "object" }, "order": 9 }, "analysis_start": { "type": "string", "title": "Analysis Start", "description": "Analysis start", "order": 7 }, "controlsubject": { "type": "string", "title": "Control Subject", "description": "Control subject", "order": 4 }, "current_os": { "type": "string", "title": "Current OS", "description": "Current OS", "order": 10 }, "display_name": { "type": "string", "title": "Display Name", "description": "Display name", "order": 1 }, "run_time": { "type": "integer", "title": "Run Time", "description": "Run time", "order": 8 }, "sample_executed": { "type": "integer", "title": "Sample Executed", "description": "Sample executed", "order": 2 }, "sandcastle": { "type": "string", "title": "Sandcastle", "description": "Sandcastle", "order": 3 }, "vm": { "type": "string", "title": "VM", "description": "VM", "order": 5 }, "vm_id": { "type": "string", "title": "VM ID", "description": "VM ID", "order": 11 } } } } } """) def __init__(self): super(self.__class__, self).__init__(self.schema)
29.384273
70
0.321047
3,343
59,415
5.636554
0.032007
0.107732
0.160802
0.020061
0.939341
0.939341
0.939341
0.939341
0.921615
0.921615
0
0.020591
0.530826
59,415
2,021
71
29.398812
0.655367
0.000623
0
0.7749
1
0
0.991613
0.013575
0
0
0
0
0
1
0.000996
false
0
0.000996
0
0.006972
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
1
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
22ce7f815dddf9a2becc067bfc8dc4d38e50ae1d
142
py
Python
datamol/viz/__init__.py
hengwei-chan/fragmentation_and_assemble
35b56dd1c97cfa6731bcbfd68c3eb01bfcd7668f
[ "Apache-2.0" ]
null
null
null
datamol/viz/__init__.py
hengwei-chan/fragmentation_and_assemble
35b56dd1c97cfa6731bcbfd68c3eb01bfcd7668f
[ "Apache-2.0" ]
null
null
null
datamol/viz/__init__.py
hengwei-chan/fragmentation_and_assemble
35b56dd1c97cfa6731bcbfd68c3eb01bfcd7668f
[ "Apache-2.0" ]
null
null
null
from ._viz import to_image from ._conformers import conformers from ._circle_grid import circle_grid from ._circle_grid import MolsCircleGrid
28.4
40
0.859155
20
142
5.7
0.45
0.263158
0.245614
0.350877
0
0
0
0
0
0
0
0
0.112676
142
4
41
35.5
0.904762
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
22d96548e2331c5df3ff532d9696c16905a568ac
106,961
py
Python
napalm_yang/models/openconfig/network_instances/network_instance/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
64
2016-10-20T15:47:18.000Z
2021-11-11T11:57:32.000Z
napalm_yang/models/openconfig/network_instances/network_instance/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
126
2016-10-05T10:36:14.000Z
2019-05-15T08:43:23.000Z
napalm_yang/models/openconfig/network_instances/network_instance/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
63
2016-11-07T15:23:08.000Z
2021-09-22T14:41:16.000Z
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListType from pyangbind.lib.yangtypes import YANGDynClass from pyangbind.lib.yangtypes import ReferenceType from pyangbind.lib.base import PybindBase from collections import OrderedDict from decimal import Decimal from bitarray import bitarray import six # PY3 support of some PY2 keywords (needs improved) if six.PY3: import builtins as __builtin__ long = int elif six.PY2: import __builtin__ class state(PybindBase): """ This class was auto-generated by the PythonClass plugin for PYANG from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/state. Each member element of the container is represented as a class variable - with a specific YANG type. YANG Description: Operational state parameters relating to a network instance """ __slots__ = ( "_path_helper", "_extmethods", "__name", "__type", "__enabled", "__description", "__router_id", "__route_distinguisher", "__enabled_address_families", "__mtu", ) _yang_name = "state" _pybind_generated_by = "container" def __init__(self, *args, **kwargs): self._path_helper = False self._extmethods = False self.__name = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) self.__type = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, }, ), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) self.__enabled = YANGDynClass( base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="boolean", is_config=False, ) self.__description = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) self.__router_id = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" }, ), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="yang:dotted-quad", is_config=False, ) self.__route_distinguisher = YANGDynClass( base=[ RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$" }, ), ], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="oc-ni-types:route-distinguisher", is_config=False, ) self.__enabled_address_families = YANGDynClass( base=TypedListType( allowed_type=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, }, ) ), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) self.__mtu = YANGDynClass( base=RestrictedClassType( base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16 ), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="uint16", is_config=False, ) load = kwargs.pop("load", None) if args: if len(args) > 1: raise TypeError("cannot create a YANG container with >1 argument") all_attr = True for e in self._pyangbind_elements: if not hasattr(args[0], e): all_attr = False break if not all_attr: raise ValueError("Supplied object did not have the correct attributes") for e in self._pyangbind_elements: nobj = getattr(args[0], e) if nobj._changed() is False: continue setmethod = getattr(self, "_set_%s" % e) if load is None: setmethod(getattr(args[0], e)) else: setmethod(getattr(args[0], e), load=load) def _path(self): if hasattr(self, "_parent"): return self._parent._path() + [self._yang_name] else: return ["network-instances", "network-instance", "state"] def _get_name(self): """ Getter method for name, mapped from YANG variable /network_instances/network_instance/state/name (string) YANG Description: An operator-assigned unique name for the forwarding instance """ return self.__name def _set_name(self, v, load=False): """ Setter method for name, mapped from YANG variable /network_instances/network_instance/state/name (string) If this variable is read-only (config: false) in the source YANG file, then _set_name is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_name() directly. YANG Description: An operator-assigned unique name for the forwarding instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """name must be of a type compatible with string""", "defined-type": "string", "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""", } ) self.__name = t if hasattr(self, "_set"): self._set() def _unset_name(self): self.__name = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) def _get_type(self): """ Getter method for type, mapped from YANG variable /network_instances/network_instance/state/type (identityref) YANG Description: The type of network instance. The value of this leaf indicates the type of forwarding entries that should be supported by this network instance """ return self.__type def _set_type(self, v, load=False): """ Setter method for type, mapped from YANG variable /network_instances/network_instance/state/type (identityref) If this variable is read-only (config: false) in the source YANG file, then _set_type is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_type() directly. YANG Description: The type of network instance. The value of this leaf indicates the type of forwarding entries that should be supported by this network instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, }, ), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """type must be of a type compatible with identityref""", "defined-type": "openconfig-network-instance:identityref", "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""", } ) self.__type = t if hasattr(self, "_set"): self._set() def _unset_type(self): self.__type = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, }, ), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) def _get_enabled(self): """ Getter method for enabled, mapped from YANG variable /network_instances/network_instance/state/enabled (boolean) YANG Description: Whether the network instance should be configured to be active on the network element """ return self.__enabled def _set_enabled(self, v, load=False): """ Setter method for enabled, mapped from YANG variable /network_instances/network_instance/state/enabled (boolean) If this variable is read-only (config: false) in the source YANG file, then _set_enabled is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_enabled() directly. YANG Description: Whether the network instance should be configured to be active on the network element """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="boolean", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """enabled must be of a type compatible with boolean""", "defined-type": "boolean", "generated-type": """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""", } ) self.__enabled = t if hasattr(self, "_set"): self._set() def _unset_enabled(self): self.__enabled = YANGDynClass( base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="boolean", is_config=False, ) def _get_description(self): """ Getter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string) YANG Description: A free-form string to be used by the network operator to describe the function of this network instance """ return self.__description def _set_description(self, v, load=False): """ Setter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string) If this variable is read-only (config: false) in the source YANG file, then _set_description is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_description() directly. YANG Description: A free-form string to be used by the network operator to describe the function of this network instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """description must be of a type compatible with string""", "defined-type": "string", "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""", } ) self.__description = t if hasattr(self, "_set"): self._set() def _unset_description(self): self.__description = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) def _get_router_id(self): """ Getter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (yang:dotted-quad) YANG Description: A identifier for the local network instance - typically used within associated routing protocols or signalling routing information in another network instance """ return self.__router_id def _set_router_id(self, v, load=False): """ Setter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (yang:dotted-quad) If this variable is read-only (config: false) in the source YANG file, then _set_router_id is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_router_id() directly. YANG Description: A identifier for the local network instance - typically used within associated routing protocols or signalling routing information in another network instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" }, ), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="yang:dotted-quad", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """router_id must be of a type compatible with yang:dotted-quad""", "defined-type": "yang:dotted-quad", "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""", } ) self.__router_id = t if hasattr(self, "_set"): self._set() def _unset_router_id(self): self.__router_id = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" }, ), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="yang:dotted-quad", is_config=False, ) def _get_route_distinguisher(self): """ Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher) YANG Description: The route distinguisher that should be used for the local VRF or VSI instance when it is signalled via BGP. """ return self.__route_distinguisher def _set_route_distinguisher(self, v, load=False): """ Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher) If this variable is read-only (config: false) in the source YANG file, then _set_route_distinguisher is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_route_distinguisher() directly. YANG Description: The route distinguisher that should be used for the local VRF or VSI instance when it is signalled via BGP. """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=[ RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$" }, ), ], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="oc-ni-types:route-distinguisher", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""", "defined-type": "oc-ni-types:route-distinguisher", "generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""", } ) self.__route_distinguisher = t if hasattr(self, "_set"): self._set() def _unset_route_distinguisher(self): self.__route_distinguisher = YANGDynClass( base=[ RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$" }, ), ], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="oc-ni-types:route-distinguisher", is_config=False, ) def _get_enabled_address_families(self): """ Getter method for enabled_address_families, mapped from YANG variable /network_instances/network_instance/state/enabled_address_families (identityref) YANG Description: The address families that are to be enabled for this network instance. """ return self.__enabled_address_families def _set_enabled_address_families(self, v, load=False): """ Setter method for enabled_address_families, mapped from YANG variable /network_instances/network_instance/state/enabled_address_families (identityref) If this variable is read-only (config: false) in the source YANG file, then _set_enabled_address_families is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_enabled_address_families() directly. YANG Description: The address families that are to be enabled for this network instance. """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=TypedListType( allowed_type=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, }, ) ), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """enabled_address_families must be of a type compatible with identityref""", "defined-type": "openconfig-network-instance:identityref", "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""", } ) self.__enabled_address_families = t if hasattr(self, "_set"): self._set() def _unset_enabled_address_families(self): self.__enabled_address_families = YANGDynClass( base=TypedListType( allowed_type=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, }, ) ), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) def _get_mtu(self): """ Getter method for mtu, mapped from YANG variable /network_instances/network_instance/state/mtu (uint16) YANG Description: The maximum frame size which should be supported for this instance for Layer 2 frames """ return self.__mtu def _set_mtu(self, v, load=False): """ Setter method for mtu, mapped from YANG variable /network_instances/network_instance/state/mtu (uint16) If this variable is read-only (config: false) in the source YANG file, then _set_mtu is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_mtu() directly. YANG Description: The maximum frame size which should be supported for this instance for Layer 2 frames """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=RestrictedClassType( base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16 ), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="uint16", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """mtu must be of a type compatible with uint16""", "defined-type": "uint16", "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""", } ) self.__mtu = t if hasattr(self, "_set"): self._set() def _unset_mtu(self): self.__mtu = YANGDynClass( base=RestrictedClassType( base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16 ), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="uint16", is_config=False, ) name = __builtin__.property(_get_name) type = __builtin__.property(_get_type) enabled = __builtin__.property(_get_enabled) description = __builtin__.property(_get_description) router_id = __builtin__.property(_get_router_id) route_distinguisher = __builtin__.property(_get_route_distinguisher) enabled_address_families = __builtin__.property(_get_enabled_address_families) mtu = __builtin__.property(_get_mtu) _pyangbind_elements = OrderedDict( [ ("name", name), ("type", type), ("enabled", enabled), ("description", description), ("router_id", router_id), ("route_distinguisher", route_distinguisher), ("enabled_address_families", enabled_address_families), ("mtu", mtu), ] ) class state(PybindBase): """ This class was auto-generated by the PythonClass plugin for PYANG from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/state. Each member element of the container is represented as a class variable - with a specific YANG type. YANG Description: Operational state parameters relating to a network instance """ __slots__ = ( "_path_helper", "_extmethods", "__name", "__type", "__enabled", "__description", "__router_id", "__route_distinguisher", "__enabled_address_families", "__mtu", ) _yang_name = "state" _pybind_generated_by = "container" def __init__(self, *args, **kwargs): self._path_helper = False self._extmethods = False self.__name = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) self.__type = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, }, ), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) self.__enabled = YANGDynClass( base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="boolean", is_config=False, ) self.__description = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) self.__router_id = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" }, ), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="yang:dotted-quad", is_config=False, ) self.__route_distinguisher = YANGDynClass( base=[ RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$" }, ), ], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="oc-ni-types:route-distinguisher", is_config=False, ) self.__enabled_address_families = YANGDynClass( base=TypedListType( allowed_type=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, }, ) ), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) self.__mtu = YANGDynClass( base=RestrictedClassType( base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16 ), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="uint16", is_config=False, ) load = kwargs.pop("load", None) if args: if len(args) > 1: raise TypeError("cannot create a YANG container with >1 argument") all_attr = True for e in self._pyangbind_elements: if not hasattr(args[0], e): all_attr = False break if not all_attr: raise ValueError("Supplied object did not have the correct attributes") for e in self._pyangbind_elements: nobj = getattr(args[0], e) if nobj._changed() is False: continue setmethod = getattr(self, "_set_%s" % e) if load is None: setmethod(getattr(args[0], e)) else: setmethod(getattr(args[0], e), load=load) def _path(self): if hasattr(self, "_parent"): return self._parent._path() + [self._yang_name] else: return ["network-instances", "network-instance", "state"] def _get_name(self): """ Getter method for name, mapped from YANG variable /network_instances/network_instance/state/name (string) YANG Description: An operator-assigned unique name for the forwarding instance """ return self.__name def _set_name(self, v, load=False): """ Setter method for name, mapped from YANG variable /network_instances/network_instance/state/name (string) If this variable is read-only (config: false) in the source YANG file, then _set_name is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_name() directly. YANG Description: An operator-assigned unique name for the forwarding instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """name must be of a type compatible with string""", "defined-type": "string", "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""", } ) self.__name = t if hasattr(self, "_set"): self._set() def _unset_name(self): self.__name = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) def _get_type(self): """ Getter method for type, mapped from YANG variable /network_instances/network_instance/state/type (identityref) YANG Description: The type of network instance. The value of this leaf indicates the type of forwarding entries that should be supported by this network instance """ return self.__type def _set_type(self, v, load=False): """ Setter method for type, mapped from YANG variable /network_instances/network_instance/state/type (identityref) If this variable is read-only (config: false) in the source YANG file, then _set_type is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_type() directly. YANG Description: The type of network instance. The value of this leaf indicates the type of forwarding entries that should be supported by this network instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, }, ), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """type must be of a type compatible with identityref""", "defined-type": "openconfig-network-instance:identityref", "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:DEFAULT_INSTANCE': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L3VRF': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2VSI': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2P2P': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}, 'oc-ni-types:L2L3': {'@module': 'openconfig-network-instance-types', '@namespace': 'http://openconfig.net/yang/network-instance-types'}},), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""", } ) self.__type = t if hasattr(self, "_set"): self._set() def _unset_type(self): self.__type = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:DEFAULT_INSTANCE": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L3VRF": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2VSI": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2P2P": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, "oc-ni-types:L2L3": { "@module": "openconfig-network-instance-types", "@namespace": "http://openconfig.net/yang/network-instance-types", }, }, ), is_leaf=True, yang_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) def _get_enabled(self): """ Getter method for enabled, mapped from YANG variable /network_instances/network_instance/state/enabled (boolean) YANG Description: Whether the network instance should be configured to be active on the network element """ return self.__enabled def _set_enabled(self, v, load=False): """ Setter method for enabled, mapped from YANG variable /network_instances/network_instance/state/enabled (boolean) If this variable is read-only (config: false) in the source YANG file, then _set_enabled is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_enabled() directly. YANG Description: Whether the network instance should be configured to be active on the network element """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="boolean", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """enabled must be of a type compatible with boolean""", "defined-type": "boolean", "generated-type": """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=False)""", } ) self.__enabled = t if hasattr(self, "_set"): self._set() def _unset_enabled(self): self.__enabled = YANGDynClass( base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="boolean", is_config=False, ) def _get_description(self): """ Getter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string) YANG Description: A free-form string to be used by the network operator to describe the function of this network instance """ return self.__description def _set_description(self, v, load=False): """ Setter method for description, mapped from YANG variable /network_instances/network_instance/state/description (string) If this variable is read-only (config: false) in the source YANG file, then _set_description is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_description() directly. YANG Description: A free-form string to be used by the network operator to describe the function of this network instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """description must be of a type compatible with string""", "defined-type": "string", "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=False)""", } ) self.__description = t if hasattr(self, "_set"): self._set() def _unset_description(self): self.__description = YANGDynClass( base=six.text_type, is_leaf=True, yang_name="description", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="string", is_config=False, ) def _get_router_id(self): """ Getter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (yang:dotted-quad) YANG Description: A identifier for the local network instance - typically used within associated routing protocols or signalling routing information in another network instance """ return self.__router_id def _set_router_id(self, v, load=False): """ Setter method for router_id, mapped from YANG variable /network_instances/network_instance/state/router_id (yang:dotted-quad) If this variable is read-only (config: false) in the source YANG file, then _set_router_id is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_router_id() directly. YANG Description: A identifier for the local network instance - typically used within associated routing protocols or signalling routing information in another network instance """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" }, ), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="yang:dotted-quad", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """router_id must be of a type compatible with yang:dotted-quad""", "defined-type": "yang:dotted-quad", "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'}), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='yang:dotted-quad', is_config=False)""", } ) self.__router_id = t if hasattr(self, "_set"): self._set() def _unset_router_id(self): self.__router_id = YANGDynClass( base=RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" }, ), is_leaf=True, yang_name="router-id", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="yang:dotted-quad", is_config=False, ) def _get_route_distinguisher(self): """ Getter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher) YANG Description: The route distinguisher that should be used for the local VRF or VSI instance when it is signalled via BGP. """ return self.__route_distinguisher def _set_route_distinguisher(self, v, load=False): """ Setter method for route_distinguisher, mapped from YANG variable /network_instances/network_instance/state/route_distinguisher (oc-ni-types:route-distinguisher) If this variable is read-only (config: false) in the source YANG file, then _set_route_distinguisher is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_route_distinguisher() directly. YANG Description: The route distinguisher that should be used for the local VRF or VSI instance when it is signalled via BGP. """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=[ RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$" }, ), ], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="oc-ni-types:route-distinguisher", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """route_distinguisher must be of a type compatible with oc-ni-types:route-distinguisher""", "defined-type": "oc-ni-types:route-distinguisher", "generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$'}),], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='oc-ni-types:route-distinguisher', is_config=False)""", } ) self.__route_distinguisher = t if hasattr(self, "_set"): self._set() def _unset_route_distinguisher(self): self.__route_distinguisher = YANGDynClass( base=[ RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9]):(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):(65[0-5][0-3][0-5]|[1-5][1-5][0-9][0-9][0-9]|[1-9]?[1-9]?[0-9][0-9]|[1-9])$" }, ), RestrictedClassType( base_type=six.text_type, restriction_dict={ "pattern": "^(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-5]|[0-3][0-9]{9}|[1-9][0-9]{1,8}|[1-9]):(65[0-5][0-3][0-5]|[1-5]{2}[0-9]{3}|[1-9]{0,2}[0-9][0-9]|[1-9])$" }, ), ], is_leaf=True, yang_name="route-distinguisher", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="oc-ni-types:route-distinguisher", is_config=False, ) def _get_enabled_address_families(self): """ Getter method for enabled_address_families, mapped from YANG variable /network_instances/network_instance/state/enabled_address_families (identityref) YANG Description: The address families that are to be enabled for this network instance. """ return self.__enabled_address_families def _set_enabled_address_families(self, v, load=False): """ Setter method for enabled_address_families, mapped from YANG variable /network_instances/network_instance/state/enabled_address_families (identityref) If this variable is read-only (config: false) in the source YANG file, then _set_enabled_address_families is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_enabled_address_families() directly. YANG Description: The address families that are to be enabled for this network instance. """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=TypedListType( allowed_type=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, }, ) ), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """enabled_address_families must be of a type compatible with identityref""", "defined-type": "openconfig-network-instance:identityref", "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV4': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:IPV6': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:MPLS': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'oc-types:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}, 'octypes:L2_ETHERNET': {'@module': 'openconfig-types', '@namespace': 'http://openconfig.net/yang/openconfig-types'}},)), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=False)""", } ) self.__enabled_address_families = t if hasattr(self, "_set"): self._set() def _unset_enabled_address_families(self): self.__enabled_address_families = YANGDynClass( base=TypedListType( allowed_type=RestrictedClassType( base_type=six.text_type, restriction_type="dict_key", restriction_arg={ "IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV4": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:IPV6": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:MPLS": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "oc-types:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, "octypes:L2_ETHERNET": { "@module": "openconfig-types", "@namespace": "http://openconfig.net/yang/openconfig-types", }, }, ) ), is_leaf=False, yang_name="enabled-address-families", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="identityref", is_config=False, ) def _get_mtu(self): """ Getter method for mtu, mapped from YANG variable /network_instances/network_instance/state/mtu (uint16) YANG Description: The maximum frame size which should be supported for this instance for Layer 2 frames """ return self.__mtu def _set_mtu(self, v, load=False): """ Setter method for mtu, mapped from YANG variable /network_instances/network_instance/state/mtu (uint16) If this variable is read-only (config: false) in the source YANG file, then _set_mtu is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_mtu() directly. YANG Description: The maximum frame size which should be supported for this instance for Layer 2 frames """ if hasattr(v, "_utype"): v = v._utype(v) try: t = YANGDynClass( v, base=RestrictedClassType( base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16 ), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="uint16", is_config=False, ) except (TypeError, ValueError): raise ValueError( { "error-string": """mtu must be of a type compatible with uint16""", "defined-type": "uint16", "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=False)""", } ) self.__mtu = t if hasattr(self, "_set"): self._set() def _unset_mtu(self): self.__mtu = YANGDynClass( base=RestrictedClassType( base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16 ), is_leaf=True, yang_name="mtu", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace="http://openconfig.net/yang/network-instance", defining_module="openconfig-network-instance", yang_type="uint16", is_config=False, ) name = __builtin__.property(_get_name) type = __builtin__.property(_get_type) enabled = __builtin__.property(_get_enabled) description = __builtin__.property(_get_description) router_id = __builtin__.property(_get_router_id) route_distinguisher = __builtin__.property(_get_route_distinguisher) enabled_address_families = __builtin__.property(_get_enabled_address_families) mtu = __builtin__.property(_get_mtu) _pyangbind_elements = OrderedDict( [ ("name", name), ("type", type), ("enabled", enabled), ("description", description), ("router_id", router_id), ("route_distinguisher", route_distinguisher), ("enabled_address_families", enabled_address_families), ("mtu", mtu), ] )
48.596547
1,790
0.522284
10,922
106,961
4.960813
0.023256
0.099664
0.101879
0.115167
0.993079
0.989074
0.989074
0.989074
0.989074
0.989074
0
0.029743
0.341797
106,961
2,200
1,791
48.618636
0.739865
0.121829
0
0.838074
0
0.021882
0.391477
0.14622
0
0
0
0
0
1
0.028446
false
0
0.008206
0
0.061816
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
22eadcfa6b1672100ae17cef89852684b3470963
23,975
py
Python
src/backend/tests/fixtures/john_doe.py
NickSchimek/recordexpungPDX
34ed0f3cb5b7368a935a11306d3143d0d154c2de
[ "CNRI-Python", "RSA-MD", "Xnet", "Linux-OpenIB", "FTL", "X11" ]
null
null
null
src/backend/tests/fixtures/john_doe.py
NickSchimek/recordexpungPDX
34ed0f3cb5b7368a935a11306d3143d0d154c2de
[ "CNRI-Python", "RSA-MD", "Xnet", "Linux-OpenIB", "FTL", "X11" ]
93
2019-12-07T01:43:50.000Z
2021-08-01T13:30:44.000Z
src/backend/tests/fixtures/john_doe.py
NickSchimek/recordexpungPDX
34ed0f3cb5b7368a935a11306d3143d0d154c2de
[ "CNRI-Python", "RSA-MD", "Xnet", "Linux-OpenIB", "FTL", "X11" ]
null
null
null
class JohnDoe: RECORD = ''' <html> <head> <link rel="stylesheet" type="text/css" href="CSS/PublicAccess.css"> </head> <body> <?xml version="1.0" encoding="utf-8"?><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td class="ssHeaderTitleBanner">Criminal, Traffic and Parking Case Records Search Results</td></tr></table><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td bgcolor="#000000" height="20px"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td align="left" style="padding-left: 5px"><font size="1"><a class="ssBlackNavBarHyperlink" href="#MainContent">Skip to Main Content</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="logout.aspx">Logout</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="MyAccount.aspx?ReturnURL=default.aspx">My Account</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="default.aspx">Search Menu</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100">Search Criminal, Traffic and Parking Case Records</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100&amp;RefineSearch=1">Refine Search</a>&nbsp;</font></td><td align="center" class="ssBlackNavBarLocation"></td><td align="right" style="padding-right: 10px"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="ssBlackNavBarLocation"> Location : All Locations</td><td><font size="1"><a class="ssBlackNavBarHyperlink" target="_blank" href="#">Help</a></font></td></tr></table></td></tr></table></td></tr></table><a id="MainContent" name="MainContent" tabindex="-1"></a><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="width:85px;"><b>Record Count: </b></td><td style="text-align:left;"><b>168</b></td></tr><tr><td id="SearchParamList" colspan="2"><b>Search By:</b> Defendant&nbsp;&nbsp;&nbsp;<b>Exact Name:</b> on&nbsp;&nbsp;&nbsp;<b>Party Search Mode:</b> Name&nbsp;&nbsp;&nbsp;<b>Last Name:</b> doe&nbsp;&nbsp;&nbsp;<b>First Name:</b> john&nbsp;&nbsp;&nbsp;<b>All</b> All&nbsp;&nbsp;&nbsp;<b>Sort By:</b> Filed Date&nbsp;&nbsp;&nbsp;</td></tr></table><table border="0" cellpadding="2" cellspacing="0" width="100%" style="font-size: 8pt; font-family: arial"><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="25%" /><tr><th class="ssSearchResultHeader" nowrap="true"><b>Case Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Citation Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Defendant Info</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Filed/Location</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Type</b><b>/Status</b></th><th class="ssSearchResultHeader" nowrap="true"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td><b>Charge(s)</b></td></tr></table></th></tr><tr height="3"><td colspan="6"></td></tr><tr><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0001" style="color: blue">X0001</a></td><td nowrap="true" valign="top"><div style="overflow:hidden">C0001</div><div style="overflow:hidden">C0001</div><div style="overflow:hidden">C0001</div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>03/23/1963</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Misdemeanor</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Attempt to Commit a Class C/Unclassified Felony</td></tr><tr><td style="vertical-align:top;">Drug Free Zone Variance</td></tr><tr><td style="vertical-align:top;">Criminal Trespass in the Second Degree</td></tr></table></td></tr><tr bgcolor="#EEEEEE"><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0002" style="color: blue">X0002</a></td><td nowrap="true" valign="top"><div style="overflow:hidden">C0002</div><div style="overflow:hidden">C0002</div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>04/11/1963</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Felony</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Poss Controlled Sub 2 (Reduced - to A Misdemeanor)</td></tr><tr><td style="vertical-align:top;">Drug Free Zone Variance</td></tr></table></td></tr><tr><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0003" style="color: blue">X0003</a></td><td nowrap="true" valign="top"><div style="overflow:hidden"></div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>04/01/2012</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Misdemeanor</div><div>Open</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Poss Controlled Sub 2 (Reduced - to A Misdemeanor)</td></tr></table></td></tr></table> </body> </html> ''' BLANK_RECORD = ''' <html> <head> <link rel="stylesheet" type="text/css" href="CSS/PublicAccess.css"> </head> <body> <?xml version="1.0" encoding="utf-8"?><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td class="ssHeaderTitleBanner">Criminal, Traffic and Parking Case Records Search Results</td></tr></table><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td bgcolor="#000000" height="20px"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td align="left" style="padding-left: 5px"><font size="1"><a class="ssBlackNavBarHyperlink" href="#MainContent">Skip to Main Content</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="logout.aspx">Logout</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="#">My Account</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="default.aspx">Search Menu</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100">Search Criminal, Traffic and Parking Case Records</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100&amp;RefineSearch=1">Refine Search</a>&nbsp;</font></td><td align="center" class="ssBlackNavBarLocation"></td><td align="right" style="padding-right: 10px"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="ssBlackNavBarLocation"> Location : All Locations</td><td><font size="1"><a class="ssBlackNavBarHyperlink" target="_blank" href="#">Help</a></font></td></tr></table></td></tr></table></td></tr></table><a id="MainContent" name="MainContent" tabindex="-1"></a><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="width:85px;"><b>Record Count: </b></td><td style="text-align:left;"><b>0</b></td></tr><tr><td id="SearchParamList" colspan="2"><b>Search By:</b> Defendant&nbsp;&nbsp;&nbsp;<b>Exact Name:</b> on&nbsp;&nbsp;&nbsp;<b>Party Search Mode:</b> Name&nbsp;&nbsp;&nbsp;<b>Last Name:</b> doe&nbsp;&nbsp;&nbsp;<b>First Name:</b> john&nbsp;&nbsp;&nbsp;<b>All</b> All&nbsp;&nbsp;&nbsp;<b>Sort By:</b> Filed Date&nbsp;&nbsp;&nbsp;</td></tr></table><table border="0" cellpadding="2" cellspacing="0" width="100%" style="font-size: 8pt; font-family: arial"><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="25%" /><tr><th class="ssSearchResultHeader" nowrap="true"><b>Case Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Citation Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Defendant Info</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Filed/Location</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Type</b><b>/Status</b></th><th class="ssSearchResultHeader" nowrap="true"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td><b>Charge(s)</b></td></tr></table></th></tr><tr height="3"><td colspan="6"></td></tr><tr height="100"><td colspan="6" align="center"><b>No cases matched your search criteria.</b></td></tr></table> </body> </html> ''' SINGLE_CASE_RECORD = ''' <html> <head> </head> <body> <?xml version="1.0" encoding="utf-8"?><table><tr><td>Criminal, Traffic and Parking Case Records Search Results</td></tr></table><table><tr><td bgcolor="#000000" height="20px"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td align="left" style="padding-left: 5px"><font size="1"><a class="ssBlackNavBarHyperlink" href="#MainContent">Skip to Main Content</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="logout.aspx">Logout</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="MyAccount.aspx?ReturnURL=default.aspx">My Account</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="default.aspx">Search Menu</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100">Search Criminal, Traffic and Parking Case Records</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100&amp;RefineSearch=1">Refine Search</a>&nbsp;</font></td><td align="center" class="ssBlackNavBarLocation"></td><td align="right" style="padding-right: 10px"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="ssBlackNavBarLocation"> Location : All Locations</td><td><font size="1"><a class="ssBlackNavBarHyperlink" target="_blank" href="http://www.courts.oregon.gov/services/online/Documents/OJCIN/OECI/PA_QRefG_OJIN.pdf">Help</a></font></td></tr></table></td></tr></table></td></tr></table><a id="MainContent" name="MainContent" tabindex="-1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="http://www.tylertechnologies.com" xmlns:PublicAccessUser="urn:PublicAccessUser"></a><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="http://www.tylertechnologies.com" xmlns:PublicAccessUser="urn:PublicAccessUser"><tr><td style="width:85px;"><b>Record Count: </b></td><td style="text-align:left;"><b>1</b></td></tr><tr><td id="SearchParamList" colspan="2"><b>Search By:</b> Defendant&nbsp;&nbsp;&nbsp;<b>Exact Name:</b> on&nbsp;&nbsp;&nbsp;<b>Party Search Mode:</b> Name&nbsp;&nbsp;&nbsp;<b>Last Name:</b> doe&nbsp;&nbsp;&nbsp;<b>First Name:</b> john&nbsp;&nbsp;&nbsp;<b>All</b> All&nbsp;&nbsp;&nbsp;<b>Sort By:</b> Filed Date&nbsp;&nbsp;&nbsp;</td></tr></table><table border="0" cellpadding="2" cellspacing="0" width="100%" style="font-size: 8pt; font-family: arial" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="http://www.tylertechnologies.com" xmlns:PublicAccessUser="urn:PublicAccessUser"><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="25%" /><tr><th class="ssSearchResultHeader" nowrap="true"><b>Case Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Citation Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Defendant Info</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Filed/Location</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Type</b><b>/Status</b></th><th class="ssSearchResultHeader" nowrap="true"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td><b>Charge(s)</b></td></tr></table></th></tr><tr height="3"><td colspan="6"></td></tr><tr><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=CASEJD1" style="color: blue">CASEJD1</a></td><td nowrap="true" valign="top"><div style="overflow:hidden">CASEJD1</div></td><td nowrap="true" valign="top"><div>DOE, JOHN</div><div>1969</div></td><td valign="top" nowrap="true"><div>09/05/2008</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Municipal Parking</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Loading Zone </td></tr></table></td></tr></table> </body> </html> ''' RECORD_WITH_CLOSED_CASES = ''' <html> <head> <link rel="stylesheet" type="text/css" href="CSS/PublicAccess.css"> </head> <body> <?xml version="1.0" encoding="utf-8"?><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td class="ssHeaderTitleBanner">Criminal, Traffic and Parking Case Records Search Results</td></tr></table><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td bgcolor="#000000" height="20px"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td align="left" style="padding-left: 5px"><font size="1"><a class="ssBlackNavBarHyperlink" href="#MainContent">Skip to Main Content</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="logout.aspx">Logout</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="MyAccount.aspx?ReturnURL=default.aspx">My Account</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="default.aspx">Search Menu</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100">Search Criminal, Traffic and Parking Case Records</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100&amp;RefineSearch=1">Refine Search</a>&nbsp;</font></td><td align="center" class="ssBlackNavBarLocation"></td><td align="right" style="padding-right: 10px"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="ssBlackNavBarLocation"> Location : All Locations</td><td><font size="1"><a class="ssBlackNavBarHyperlink" target="_blank" href="#">Help</a></font></td></tr></table></td></tr></table></td></tr></table><a id="MainContent" name="MainContent" tabindex="-1"></a><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="width:85px;"><b>Record Count: </b></td><td style="text-align:left;"><b>168</b></td></tr><tr><td id="SearchParamList" colspan="2"><b>Search By:</b> Defendant&nbsp;&nbsp;&nbsp;<b>Exact Name:</b> on&nbsp;&nbsp;&nbsp;<b>Party Search Mode:</b> Name&nbsp;&nbsp;&nbsp;<b>Last Name:</b> doe&nbsp;&nbsp;&nbsp;<b>First Name:</b> john&nbsp;&nbsp;&nbsp;<b>All</b> All&nbsp;&nbsp;&nbsp;<b>Sort By:</b> Filed Date&nbsp;&nbsp;&nbsp;</td></tr></table><table border="0" cellpadding="2" cellspacing="0" width="100%" style="font-size: 8pt; font-family: arial"><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="25%" /><tr><th class="ssSearchResultHeader" nowrap="true"><b>Case Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Citation Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Defendant Info</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Filed/Location</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Type</b><b>/Status</b></th><th class="ssSearchResultHeader" nowrap="true"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td><b>Charge(s)</b></td></tr></table></th></tr><tr height="3"><td colspan="6"></td></tr><tr><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0001" style="color: blue">X0001</a></td><td nowrap="true" valign="top"><div style="overflow:hidden">C0001</div><div style="overflow:hidden">C0001</div><div style="overflow:hidden">C0001</div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>03/23/1963</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Misdemeanor</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Attempt to Commit a Class C/Unclassified Felony</td></tr><tr><td style="vertical-align:top;">Drug Free Zone Variance</td></tr><tr><td style="vertical-align:top;">Criminal Trespass in the Second Degree</td></tr></table></td></tr><tr bgcolor="#EEEEEE"><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0002" style="color: blue">X0002</a></td><td nowrap="true" valign="top"><div style="overflow:hidden">C0002</div><div style="overflow:hidden">C0002</div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>04/11/1963</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Felony</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Poss Controlled Sub 2 (Reduced - to A Misdemeanor)</td></tr><tr><td style="vertical-align:top;">Drug Free Zone Variance</td></tr></table></td></tr><tr><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0003" style="color: blue">X0003</a></td><td nowrap="true" valign="top"><div style="overflow:hidden"></div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>04/01/2012</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Misdemeanor</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Poss Controlled Sub 2 (Reduced - to A Misdemeanor)</td></tr></table></td></tr></table> </body> </html> ''' RECORD_WITH_MISSING_BIRTH_YEAR = ''' <html> <head> <link rel="stylesheet" type="text/css" href="CSS/PublicAccess.css"> </head> <body> <?xml version="1.0" encoding="utf-8"?><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td class="ssHeaderTitleBanner">Criminal, Traffic and Parking Case Records Search Results</td></tr></table><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td bgcolor="#000000" height="20px"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td align="left" style="padding-left: 5px"><font size="1"><a class="ssBlackNavBarHyperlink" href="#MainContent">Skip to Main Content</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="logout.aspx">Logout</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="MyAccount.aspx?ReturnURL=default.aspx">My Account</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="default.aspx">Search Menu</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100">Search Criminal, Traffic and Parking Case Records</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100&amp;RefineSearch=1">Refine Search</a>&nbsp;</font></td><td align="center" class="ssBlackNavBarLocation"></td><td align="right" style="padding-right: 10px"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="ssBlackNavBarLocation"> Location : All Locations</td><td><font size="1"><a class="ssBlackNavBarHyperlink" target="_blank" href="#">Help</a></font></td></tr></table></td></tr></table></td></tr></table><a id="MainContent" name="MainContent" tabindex="-1"></a><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="width:85px;"><b>Record Count: </b></td><td style="text-align:left;"><b>168</b></td></tr><tr><td id="SearchParamList" colspan="2"><b>Search By:</b> Defendant&nbsp;&nbsp;&nbsp;<b>Exact Name:</b> on&nbsp;&nbsp;&nbsp;<b>Party Search Mode:</b> Name&nbsp;&nbsp;&nbsp;<b>Last Name:</b> doe&nbsp;&nbsp;&nbsp;<b>First Name:</b> john&nbsp;&nbsp;&nbsp;<b>All</b> All&nbsp;&nbsp;&nbsp;<b>Sort By:</b> Filed Date&nbsp;&nbsp;&nbsp;</td></tr></table><table border="0" cellpadding="2" cellspacing="0" width="100%" style="font-size: 8pt; font-family: arial"><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="25%" /><tr><th class="ssSearchResultHeader" nowrap="true"><b>Case Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Citation Number</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Defendant Info</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Filed/Location</b></th><th class="ssSearchResultHeader" nowrap="true"><b>Type</b><b>/Status</b></th><th class="ssSearchResultHeader" nowrap="true"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td><b>Charge(s)</b></td></tr></table></th></tr><tr height="3"><td colspan="6"></td></tr><tr><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0001" style="color: blue">X0001</a></td><td nowrap="true" valign="top"><div style="overflow:hidden">C0001</div><div style="overflow:hidden">C0001</div><div style="overflow:hidden">C0001</div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>03/23/1963</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Misdemeanor</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Attempt to Commit a Class C/Unclassified Felony</td></tr><tr><td style="vertical-align:top;">Drug Free Zone Variance</td></tr><tr><td style="vertical-align:top;">Criminal Trespass in the Second Degree</td></tr></table></td></tr><tr bgcolor="#EEEEEE"><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0002" style="color: blue">X0002</a></td><td nowrap="true" valign="top"><div style="overflow:hidden">C0002</div><div style="overflow:hidden">C0002</div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div>1943</div></td><td valign="top" nowrap="true"><div>04/11/1963</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Felony</div><div>Closed</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Poss Controlled Sub 2 (Reduced - to A Misdemeanor)</td></tr><tr><td style="vertical-align:top;">Drug Free Zone Variance</td></tr></table></td></tr><tr><td nowrap="true" valign="top"><a href="CaseDetail.aspx?CaseID=X0003" style="color: blue">X0003</a></td><td nowrap="true" valign="top"><div style="overflow:hidden"></div></td><td nowrap="true" valign="top"><div>Doe, John D</div><div></div></td><td valign="top" nowrap="true"><div>04/01/2012</div><div>Multnomah</div></td><td valign="top" nowrap="true"><div>Offense Misdemeanor</div><div>Open</div></td><td nowrap="true" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed; font-size: 8pt; font-family: arial"><tr><td style="vertical-align:top;">Poss Controlled Sub 2 (Reduced - to A Misdemeanor)</td></tr></table></td></tr></table> </body> </html> '''
399.583333
4,116
0.69147
3,699
23,975
4.477156
0.057313
0.054345
0.024455
0.043476
0.982731
0.981704
0.981704
0.981704
0.979953
0.979953
0
0.033914
0.064067
23,975
59
4,117
406.355932
0.704131
0
0
0.763636
0
0.181818
0.992534
0.522127
0
0
0
0
0
1
0
false
0.054545
0
0
0.109091
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
0
0
0
1
1
0
0
0
1
0
0
1
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
12
fe0a967bb57b6842de086d5d9d71ae20c3dfae22
9,481
py
Python
data/Panoptic/datamodule.py
GuillaumeRochette/HumanViewSynthesis
d65ea8744e284ec956bbc04f294f05e47731360f
[ "Apache-2.0" ]
10
2021-11-30T05:56:10.000Z
2022-03-16T07:06:16.000Z
data/Panoptic/datamodule.py
GuillaumeRochette/HumanViewSynthesis
d65ea8744e284ec956bbc04f294f05e47731360f
[ "Apache-2.0" ]
1
2022-01-10T09:27:22.000Z
2022-01-10T09:27:22.000Z
data/Panoptic/datamodule.py
GuillaumeRochette/HumanViewSynthesis
d65ea8744e284ec956bbc04f294f05e47731360f
[ "Apache-2.0" ]
null
null
null
from typing import Iterable, Union, Tuple from pathlib import Path from tqdm import tqdm from torch.utils.data import ConcatDataset from data.datamodule import DataModule from data.utils import filter from data.Panoptic.dataset import ( PanopticPoseDataset, PanopticImageDataset, PanopticImagePairDataset, ) from data.Panoptic.transform import ( PanopticImageTransform, PanopticImagePairTransform, ) from data.Panoptic.metadata import ( VIEWS, KNOWN_SEQUENCES, TRAIN_KNOWN_INTERVALS, VAL_KNOWN_INTERVALS, TEST_KNOWN_INTERVALS, UNKNOWN_SEQUENCES, TRAIN_UNKNOWN_INTERVALS, VAL_UNKNOWN_INTERVALS, TEST_UNKNOWN_INTERVALS, ) class PanopticPoseDataModule(DataModule): def __init__( self, root: Union[str, Path], known_sequences: Iterable[str] = KNOWN_SEQUENCES, train_intervals: Iterable = TRAIN_KNOWN_INTERVALS, unknown_sequences: Iterable[str] = UNKNOWN_SEQUENCES, views: Iterable[str] = VIEWS, batch_size: int = 1, num_workers: int = 0, ): super(PanopticPoseDataModule, self).__init__( root=root, batch_size=batch_size, num_workers=num_workers, ) self.known_sequences = known_sequences self.train_intervals = train_intervals self.unknown_sequences = unknown_sequences self.views = views def _train_dataset(self): datasets = [] for sequence, intervals in zip( tqdm(self.known_sequences), self.train_intervals ): dir = self.root / sequence / "Databases" / "Images" views = [p.stem for p in sorted(dir.glob("*.lmdb"))] views = [view for view in views if view in self.views] for view in tqdm(views, leave=False): dataset = PanopticPoseDataset( path=self.root / sequence, view=view, ) dataset.keys = filter(dataset.keys, intervals) datasets.append(dataset) dataset = ConcatDataset(datasets) return dataset def _val_dataset(self): datasets = [] for sequence in tqdm(self.unknown_sequences): dir = self.root / sequence / "Databases" / "Images" views = [p.stem for p in sorted(dir.glob("*.lmdb"))] views = [view for view in views if view in self.views] for view in tqdm(views, leave=False): dataset = PanopticPoseDataset( path=self.root / sequence, view=view, ) datasets.append(dataset) dataset = ConcatDataset(datasets) return dataset def _test_dataset(self): datasets = [] for sequence in tqdm(self.unknown_sequences): dir = self.root / sequence / "Databases" / "Images" views = [p.stem for p in sorted(dir.glob("*.lmdb"))] views = [view for view in views if view in self.views] for view in tqdm(views, leave=False): dataset = PanopticPoseDataset( path=self.root / sequence, view=view, ) datasets.append(dataset) dataset = ConcatDataset(datasets) return dataset class PanopticImageDataModule(DataModule): def __init__( self, root: Union[str, Path], sequences: Iterable[str] = KNOWN_SEQUENCES, train_intervals: Iterable = TRAIN_KNOWN_INTERVALS, val_intervals: Iterable = VAL_KNOWN_INTERVALS, test_intervals: Iterable = TEST_KNOWN_INTERVALS, views: Iterable[str] = VIEWS, cr_size: Union[int, Tuple[int, int]] = None, re_size: Union[int, Tuple[int, int]] = None, batch_size: int = 1, num_workers: int = 0, ): super(PanopticImageDataModule, self).__init__( root=root, batch_size=batch_size, num_workers=num_workers, ) self.sequences = sequences self.train_intervals = train_intervals self.val_intervals = val_intervals self.test_intervals = test_intervals self.views = views self.transform = PanopticImageTransform( cr_size=cr_size, re_size=re_size, ) def _train_dataset(self): datasets = [] for sequence, intervals in zip(tqdm(self.sequences), self.train_intervals): dir = self.root / sequence / "Databases" / "Images" views = [p.stem for p in sorted(dir.glob("*.lmdb"))] views = [view for view in views if view in self.views] for view in tqdm(views, leave=False): dataset = PanopticImageDataset( path=self.root / sequence, view=view, transform=self.transform, ) dataset.keys = filter(dataset.keys, intervals) datasets.append(dataset) dataset = ConcatDataset(datasets) return dataset def _val_dataset(self): datasets = [] for sequence, intervals in zip(tqdm(self.sequences), self.val_intervals): dir = self.root / sequence / "Databases" / "Images" views = [p.stem for p in sorted(dir.glob("*.lmdb"))] views = [view for view in views if view in self.views] for view in tqdm(views, leave=False): dataset = PanopticImageDataset( path=self.root / sequence, view=view, transform=self.transform, ) dataset.keys = filter(dataset.keys, intervals, mod=30) datasets.append(dataset) dataset = ConcatDataset(datasets) return dataset def _test_dataset(self): datasets = [] for sequence, intervals in zip(tqdm(self.sequences), self.test_intervals): dir = self.root / sequence / "Databases" / "Images" views = [p.stem for p in sorted(dir.glob("*.lmdb"))] views = [view for view in views if view in self.views] for view in tqdm(views, leave=False): dataset = PanopticImageDataset( path=self.root / sequence, view=view, transform=self.transform, ) dataset.keys = filter(dataset.keys, intervals, mod=30) datasets.append(dataset) dataset = ConcatDataset(datasets) return dataset class PanopticImagePairDataModule(DataModule): def __init__( self, root: Union[str, Path], sequences: Iterable[str] = KNOWN_SEQUENCES, train_intervals: Iterable = TRAIN_KNOWN_INTERVALS, val_intervals: Iterable = VAL_KNOWN_INTERVALS, test_intervals: Iterable = TEST_KNOWN_INTERVALS, in_views: Iterable[str] = VIEWS, out_views: Iterable[str] = VIEWS, cr_size_A: Union[int, Tuple[int, int]] = None, cr_size_B: Union[int, Tuple[int, int]] = None, re_size_A: Union[int, Tuple[int, int]] = None, re_size_B: Union[int, Tuple[int, int]] = None, batch_size: int = 1, num_workers: int = 0, ): super(PanopticImagePairDataModule, self).__init__( root=root, batch_size=batch_size, num_workers=num_workers, ) self.sequences = sequences self.train_intervals = train_intervals self.val_intervals = val_intervals self.test_intervals = test_intervals self.in_views = in_views self.out_views = out_views self.transform = PanopticImagePairTransform( cr_size_A=cr_size_A, cr_size_B=cr_size_B, re_size_A=re_size_A, re_size_B=re_size_B, ) def _train_dataset(self): datasets = [] for sequence, intervals in zip(tqdm(self.sequences), self.train_intervals): dataset = PanopticImagePairDataset( path=self.root / sequence, in_views=self.in_views, out_views=self.out_views, transform=self.transform, ) dataset.keys = filter(dataset.keys, intervals) datasets.append(dataset) datasets = ConcatDataset(datasets) return datasets def _val_dataset(self): datasets = [] for sequence, intervals in zip(tqdm(self.sequences), self.val_intervals): dataset = PanopticImagePairDataset( path=self.root / sequence, in_views=self.in_views, out_views=self.out_views, transform=self.transform, ) dataset.keys = filter(dataset.keys, intervals, mod=30) datasets.append(dataset) datasets = ConcatDataset(datasets) return datasets def _test_dataset(self): datasets = [] for sequence, intervals in zip(tqdm(self.sequences), self.test_intervals): dataset = PanopticImagePairDataset( path=self.root / sequence, in_views=self.in_views, out_views=self.out_views, transform=self.transform, ) dataset.keys = filter(dataset.keys, intervals, mod=30) datasets.append(dataset) datasets = ConcatDataset(datasets) return datasets
35.912879
83
0.587069
985
9,481
5.471066
0.078173
0.026721
0.044535
0.036742
0.817591
0.808313
0.799777
0.790685
0.76118
0.745407
0
0.002195
0.327181
9,481
263
84
36.04943
0.842609
0
0
0.708333
0
0
0.01329
0
0
0
0
0
0
1
0.05
false
0
0.0375
0
0.1375
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
fe1211eaf99fc350f100b8d56047a2a0264241d2
1,632
py
Python
lab4/chapter6.py
MariAbraha/csc121
75db8806d2a62d63b6e7a9d2905a04470021de85
[ "CC0-1.0" ]
null
null
null
lab4/chapter6.py
MariAbraha/csc121
75db8806d2a62d63b6e7a9d2905a04470021de85
[ "CC0-1.0" ]
null
null
null
lab4/chapter6.py
MariAbraha/csc121
75db8806d2a62d63b6e7a9d2905a04470021de85
[ "CC0-1.0" ]
null
null
null
#drawing with functions import arcade SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, "Drawing with Functions") arcade.set_background_color(arcade.color.DARK_BLUE) arcade.start_render() arcade.draw_lrtb_rectangle_filled(0, SCREEN_WIDTH, SCREEN_HEIGHT / 3, 0, arcade.color.AIR_SUPERIORITY_BLUE) # Draw a snow person # Snow arcade.draw_circle_filled(300, 200, 60, arcade.color.WHITE) arcade.draw_circle_filled(300, 280, 50, arcade.color.WHITE) arcade.draw_circle_filled(300, 340, 40, arcade.color.WHITE) # Eyes arcade.draw_circle_filled(285, 350, 5, arcade.color.BLACK) arcade.draw_circle_filled(315, 350, 5, arcade.color.BLACK) # Finish and run arcade.finish_render() arcade.run() main() #create a main() import arcade SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 def main(): arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, "Drawing with Functions") arcade.set_background_color(arcade.color.DARK_BLUE) arcade.start_render() # Draw the ground arcade.draw_lrtb_rectangle_filled(0, SCREEN_WIDTH, SCREEN_HEIGHT / 3, 0, arcade.color.AIR_SUPERIORITY_BLUE) # Draw a snow person # Snow arcade.draw_circle_filled(300, 200, 60, arcade.color.WHITE) arcade.draw_circle_filled(300, 280, 50, arcade.color.WHITE) arcade.draw_circle_filled(300, 340, 40, arcade.color.WHITE) # Eyes arcade.draw_circle_filled(285, 350, 5, arcade.color.BLACK) arcade.draw_circle_filled(315, 350, 5, arcade.color.BLACK) # Finish and run arcade.finish_render() arcade.run() # Call the main function to get the program started. main()
24.727273
111
0.748775
242
1,632
4.826446
0.243802
0.131849
0.136986
0.188356
0.914384
0.914384
0.914384
0.914384
0.844178
0.844178
0
0.067626
0.148284
1,632
66
112
24.727273
0.772662
0.118873
0
0.967742
0
0
0.030834
0
0
0
0
0
0
1
0.032258
false
0
0.064516
0
0.096774
0
0
0
0
null
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
8
a3ee71550a61302de7105f75a682bfcd0fccdf17
4,438
py
Python
dgi_repo/auth/authorization.py
discoverygarden/dgi_repo
1bb30d51a4cefc2ae510f5aeac4b36ed7a78f6a6
[ "Apache-2.0" ]
null
null
null
dgi_repo/auth/authorization.py
discoverygarden/dgi_repo
1bb30d51a4cefc2ae510f5aeac4b36ed7a78f6a6
[ "Apache-2.0" ]
null
null
null
dgi_repo/auth/authorization.py
discoverygarden/dgi_repo
1bb30d51a4cefc2ae510f5aeac4b36ed7a78f6a6
[ "Apache-2.0" ]
null
null
null
""" Helpers for determining authorization rules. @TODO: verify that there are restrictions before returning False. """ import dgi_repo.fcrepo3.relations as relations import dgi_repo.database.read.datastream_relations as datastream_relations import dgi_repo.database.read.object_relations as object_relations from dgi_repo.database.utilities import check_cursor def is_datastream_viewable(ds_db_id, user_id=None, roles=None, cursor=None): """ Check if the datastream is viewable by the given user or roles. """ cursor = check_cursor(cursor) if is_datastream_manageable(ds_db_id, user_id, roles, cursor): return True if user_id is not None: datastream_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_VIEWABLE_BY_USER_PREDICATE, ds_db_id, user_id, cursor=cursor ) if cursor.fetchone(): return True if roles: datastream_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_VIEWABLE_BY_ROLE_PREDICATE, ds_db_id, cursor=cursor ) db_role_info = cursor.fetchall() db_roles = set() for db_role in db_role_info: db_roles.add(db_role['rdf_object']) if db_roles.intersection(roles): return True return False def is_datastream_manageable(ds_db_id, user_id=None, roles=None, cursor=None): """ Check if the datastream is manageable by the given user or roles. """ cursor = check_cursor(cursor) if user_id is not None: datastream_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_MANAGEABLE_BY_USER_PREDICATE, ds_db_id, user_id, cursor=cursor ) if cursor.fetchone(): return True if roles: datastream_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_MANAGEABLE_BY_ROLE_PREDICATE, ds_db_id, cursor=cursor ) db_role_info = cursor.fetchall() db_roles = set() for db_role in db_role_info: db_roles.add(db_role['rdf_object']) if db_roles.intersection(roles): return True return False def is_object_viewable(object_db_id, user_id=None, roles=None, cursor=None): """ Check if the object is viewable by the given user or roles. """ cursor = check_cursor(cursor) if is_object_manageable(object_db_id, user_id, roles, cursor): return True if user_id is not None: object_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_VIEWABLE_BY_USER_PREDICATE, object_db_id, user_id, cursor=cursor ) if cursor.fetchone(): return True if roles: object_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_VIEWABLE_BY_USER_PREDICATE, object_db_id, cursor=cursor ) db_role_info = cursor.fetchall() db_roles = set() for db_role in db_role_info: db_roles.add(db_role['rdf_object']) if db_roles.intersection(roles): return True return False def is_object_manageable(object_db_id, user_id=None, roles=None, cursor=None): """ Check if the object is manageable by the given user or roles. """ cursor = check_cursor(cursor) if user_id is not None: object_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_MANAGEABLE_BY_USER_PREDICATE, object_db_id, user_id, cursor=cursor ) if cursor.fetchone(): return True if roles: object_relations.read_relationship( relations.ISLANDORA_RELS_EXT_NAMESPACE, relations.IS_MANAGEABLE_BY_ROLE_PREDICATE, object_db_id, cursor=cursor ) db_role_info = cursor.fetchall() db_roles = set() for db_role in db_role_info: db_roles.add(db_role['rdf_object']) if db_roles.intersection(roles): return True return False
28.448718
78
0.637449
539
4,438
4.916512
0.113173
0.036226
0.030189
0.037736
0.900755
0.900755
0.875094
0.875094
0.84717
0.84717
0
0.000321
0.298558
4,438
155
79
28.632258
0.850948
0.081794
0
0.830357
0
0
0.009983
0
0
0
0
0.006452
0
1
0.035714
false
0
0.035714
0
0.196429
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
433743acdc272bcd309dd50f4085f74d9ce09dbe
74,974
py
Python
milvus/thrift/MilvusService.py
jielinxu/pymilvus
f1f27de406f046a4599f0c84fae2d225445a7f00
[ "Apache-2.0" ]
null
null
null
milvus/thrift/MilvusService.py
jielinxu/pymilvus
f1f27de406f046a4599f0c84fae2d225445a7f00
[ "Apache-2.0" ]
null
null
null
milvus/thrift/MilvusService.py
jielinxu/pymilvus
f1f27de406f046a4599f0c84fae2d225445a7f00
[ "Apache-2.0" ]
null
null
null
# # Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport all_structs = [] class Iface(object): def CreateTable(self, param): """ @brief Create table method This method is used to create table @param param, use to provide table information to be created. Parameters: - param """ pass def DeleteTable(self, table_name): """ @brief Delete table method This method is used to delete table. @param table_name, table name is going to be deleted. Parameters: - table_name """ pass def AddVector(self, table_name, record_array): """ @brief Add vector array to table This method is used to add vector array to table. @param table_name, table_name is inserted. @param record_array, vector array is inserted. @return vector id array Parameters: - table_name - record_array """ pass def SearchVector(self, table_name, query_record_array, query_range_array, topk): """ @brief Query vector This method is used to query vector in table. @param table_name, table_name is queried. @param query_record_array, all vector are going to be queried. @param query_range_array, optional ranges for conditional search. If not specified, search whole table @param topk, how many similarity vectors will be searched. @return query result array. Parameters: - table_name - query_record_array - query_range_array - topk """ pass def SearchVectorInFiles(self, table_name, file_id_array, query_record_array, query_range_array, topk): """ @brief Internal use query interface This method is used to query vector in specified files. @param file_id_array, specified files id array, queried. @param query_record_array, all vector are going to be queried. @param query_range_array, optional ranges for conditional search. If not specified, search whole table @param topk, how many similarity vectors will be searched. @return query result array. Parameters: - table_name - file_id_array - query_record_array - query_range_array - topk """ pass def DescribeTable(self, table_name): """ @brief Get table schema This method is used to get table schema. @param table_name, target table name. @return table schema Parameters: - table_name """ pass def GetTableRowCount(self, table_name): """ @brief Get table row count This method is used to get table row count. @param table_name, target table name. @return table row count Parameters: - table_name """ pass def ShowTables(self): """ @brief List all tables in database This method is used to list all tables. @return table names. """ pass def Ping(self, cmd): """ @brief Give the server status This method is used to give the server status. @return Server status. Parameters: - cmd """ pass class Client(Iface): def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: self._oprot = oprot self._seqid = 0 def CreateTable(self, param): """ @brief Create table method This method is used to create table @param param, use to provide table information to be created. Parameters: - param """ self.send_CreateTable(param) self.recv_CreateTable() def send_CreateTable(self, param): self._oprot.writeMessageBegin('CreateTable', TMessageType.CALL, self._seqid) args = CreateTable_args() args.param = param args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_CreateTable(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = CreateTable_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def DeleteTable(self, table_name): """ @brief Delete table method This method is used to delete table. @param table_name, table name is going to be deleted. Parameters: - table_name """ self.send_DeleteTable(table_name) self.recv_DeleteTable() def send_DeleteTable(self, table_name): self._oprot.writeMessageBegin('DeleteTable', TMessageType.CALL, self._seqid) args = DeleteTable_args() args.table_name = table_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_DeleteTable(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = DeleteTable_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def AddVector(self, table_name, record_array): """ @brief Add vector array to table This method is used to add vector array to table. @param table_name, table_name is inserted. @param record_array, vector array is inserted. @return vector id array Parameters: - table_name - record_array """ self.send_AddVector(table_name, record_array) return self.recv_AddVector() def send_AddVector(self, table_name, record_array): self._oprot.writeMessageBegin('AddVector', TMessageType.CALL, self._seqid) args = AddVector_args() args.table_name = table_name args.record_array = record_array args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_AddVector(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = AddVector_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "AddVector failed: unknown result") def SearchVector(self, table_name, query_record_array, query_range_array, topk): """ @brief Query vector This method is used to query vector in table. @param table_name, table_name is queried. @param query_record_array, all vector are going to be queried. @param query_range_array, optional ranges for conditional search. If not specified, search whole table @param topk, how many similarity vectors will be searched. @return query result array. Parameters: - table_name - query_record_array - query_range_array - topk """ self.send_SearchVector(table_name, query_record_array, query_range_array, topk) return self.recv_SearchVector() def send_SearchVector(self, table_name, query_record_array, query_range_array, topk): self._oprot.writeMessageBegin('SearchVector', TMessageType.CALL, self._seqid) args = SearchVector_args() args.table_name = table_name args.query_record_array = query_record_array args.query_range_array = query_range_array args.topk = topk args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_SearchVector(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = SearchVector_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "SearchVector failed: unknown result") def SearchVectorInFiles(self, table_name, file_id_array, query_record_array, query_range_array, topk): """ @brief Internal use query interface This method is used to query vector in specified files. @param file_id_array, specified files id array, queried. @param query_record_array, all vector are going to be queried. @param query_range_array, optional ranges for conditional search. If not specified, search whole table @param topk, how many similarity vectors will be searched. @return query result array. Parameters: - table_name - file_id_array - query_record_array - query_range_array - topk """ self.send_SearchVectorInFiles(table_name, file_id_array, query_record_array, query_range_array, topk) return self.recv_SearchVectorInFiles() def send_SearchVectorInFiles(self, table_name, file_id_array, query_record_array, query_range_array, topk): self._oprot.writeMessageBegin('SearchVectorInFiles', TMessageType.CALL, self._seqid) args = SearchVectorInFiles_args() args.table_name = table_name args.file_id_array = file_id_array args.query_record_array = query_record_array args.query_range_array = query_range_array args.topk = topk args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_SearchVectorInFiles(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = SearchVectorInFiles_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "SearchVectorInFiles failed: unknown result") def DescribeTable(self, table_name): """ @brief Get table schema This method is used to get table schema. @param table_name, target table name. @return table schema Parameters: - table_name """ self.send_DescribeTable(table_name) return self.recv_DescribeTable() def send_DescribeTable(self, table_name): self._oprot.writeMessageBegin('DescribeTable', TMessageType.CALL, self._seqid) args = DescribeTable_args() args.table_name = table_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_DescribeTable(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = DescribeTable_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "DescribeTable failed: unknown result") def GetTableRowCount(self, table_name): """ @brief Get table row count This method is used to get table row count. @param table_name, target table name. @return table row count Parameters: - table_name """ self.send_GetTableRowCount(table_name) return self.recv_GetTableRowCount() def send_GetTableRowCount(self, table_name): self._oprot.writeMessageBegin('GetTableRowCount', TMessageType.CALL, self._seqid) args = GetTableRowCount_args() args.table_name = table_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_GetTableRowCount(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = GetTableRowCount_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "GetTableRowCount failed: unknown result") def ShowTables(self): """ @brief List all tables in database This method is used to list all tables. @return table names. """ self.send_ShowTables() return self.recv_ShowTables() def send_ShowTables(self): self._oprot.writeMessageBegin('ShowTables', TMessageType.CALL, self._seqid) args = ShowTables_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_ShowTables(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = ShowTables_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "ShowTables failed: unknown result") def Ping(self, cmd): """ @brief Give the server status This method is used to give the server status. @return Server status. Parameters: - cmd """ self.send_Ping(cmd) return self.recv_Ping() def send_Ping(self, cmd): self._oprot.writeMessageBegin('Ping', TMessageType.CALL, self._seqid) args = Ping_args() args.cmd = cmd args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_Ping(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = Ping_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "Ping failed: unknown result") class Processor(Iface, TProcessor): def __init__(self, handler): self._handler = handler self._processMap = {} self._processMap["CreateTable"] = Processor.process_CreateTable self._processMap["DeleteTable"] = Processor.process_DeleteTable self._processMap["AddVector"] = Processor.process_AddVector self._processMap["SearchVector"] = Processor.process_SearchVector self._processMap["SearchVectorInFiles"] = Processor.process_SearchVectorInFiles self._processMap["DescribeTable"] = Processor.process_DescribeTable self._processMap["GetTableRowCount"] = Processor.process_GetTableRowCount self._processMap["ShowTables"] = Processor.process_ShowTables self._processMap["Ping"] = Processor.process_Ping def process(self, iprot, oprot): (name, type, seqid) = iprot.readMessageBegin() if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() return else: self._processMap[name](self, seqid, iprot, oprot) return True def process_CreateTable(self, seqid, iprot, oprot): args = CreateTable_args() args.read(iprot) iprot.readMessageEnd() result = CreateTable_result() try: self._handler.CreateTable(args.param) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("CreateTable", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_DeleteTable(self, seqid, iprot, oprot): args = DeleteTable_args() args.read(iprot) iprot.readMessageEnd() result = DeleteTable_result() try: self._handler.DeleteTable(args.table_name) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("DeleteTable", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_AddVector(self, seqid, iprot, oprot): args = AddVector_args() args.read(iprot) iprot.readMessageEnd() result = AddVector_result() try: result.success = self._handler.AddVector(args.table_name, args.record_array) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("AddVector", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_SearchVector(self, seqid, iprot, oprot): args = SearchVector_args() args.read(iprot) iprot.readMessageEnd() result = SearchVector_result() try: result.success = self._handler.SearchVector(args.table_name, args.query_record_array, args.query_range_array, args.topk) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("SearchVector", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_SearchVectorInFiles(self, seqid, iprot, oprot): args = SearchVectorInFiles_args() args.read(iprot) iprot.readMessageEnd() result = SearchVectorInFiles_result() try: result.success = self._handler.SearchVectorInFiles(args.table_name, args.file_id_array, args.query_record_array, args.query_range_array, args.topk) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("SearchVectorInFiles", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_DescribeTable(self, seqid, iprot, oprot): args = DescribeTable_args() args.read(iprot) iprot.readMessageEnd() result = DescribeTable_result() try: result.success = self._handler.DescribeTable(args.table_name) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("DescribeTable", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_GetTableRowCount(self, seqid, iprot, oprot): args = GetTableRowCount_args() args.read(iprot) iprot.readMessageEnd() result = GetTableRowCount_result() try: result.success = self._handler.GetTableRowCount(args.table_name) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("GetTableRowCount", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_ShowTables(self, seqid, iprot, oprot): args = ShowTables_args() args.read(iprot) iprot.readMessageEnd() result = ShowTables_result() try: result.success = self._handler.ShowTables() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("ShowTables", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_Ping(self, seqid, iprot, oprot): args = Ping_args() args.read(iprot) iprot.readMessageEnd() result = Ping_result() try: result.success = self._handler.Ping(args.cmd) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except Exception as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("Ping", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() # HELPER FUNCTIONS AND STRUCTURES class CreateTable_args(object): """ Attributes: - param """ def __init__(self, param=None,): self.param = param def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRUCT: self.param = TableSchema() self.param.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CreateTable_args') if self.param is not None: oprot.writeFieldBegin('param', TType.STRUCT, 2) self.param.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(CreateTable_args) CreateTable_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRUCT, 'param', [TableSchema, None], None, ), # 2 ) class CreateTable_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CreateTable_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(CreateTable_result) CreateTable_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class DeleteTable_args(object): """ Attributes: - table_name """ def __init__(self, table_name=None,): self.table_name = table_name def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.table_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('DeleteTable_args') if self.table_name is not None: oprot.writeFieldBegin('table_name', TType.STRING, 2) oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(DeleteTable_args) DeleteTable_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'table_name', 'UTF8', None, ), # 2 ) class DeleteTable_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('DeleteTable_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(DeleteTable_result) DeleteTable_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class AddVector_args(object): """ Attributes: - table_name - record_array """ def __init__(self, table_name=None, record_array=None,): self.table_name = table_name self.record_array = record_array def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.table_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.record_array = [] (_etype10, _size7) = iprot.readListBegin() for _i11 in range(_size7): _elem12 = RowRecord() _elem12.read(iprot) self.record_array.append(_elem12) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('AddVector_args') if self.table_name is not None: oprot.writeFieldBegin('table_name', TType.STRING, 2) oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name) oprot.writeFieldEnd() if self.record_array is not None: oprot.writeFieldBegin('record_array', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.record_array)) for iter13 in self.record_array: iter13.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(AddVector_args) AddVector_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'table_name', 'UTF8', None, ), # 2 (3, TType.LIST, 'record_array', (TType.STRUCT, [RowRecord, None], False), None, ), # 3 ) class AddVector_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype17, _size14) = iprot.readListBegin() for _i18 in range(_size14): _elem19 = iprot.readI64() self.success.append(_elem19) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('AddVector_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.I64, len(self.success)) for iter20 in self.success: oprot.writeI64(iter20) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(AddVector_result) AddVector_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.I64, None, False), None, ), # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class SearchVector_args(object): """ Attributes: - table_name - query_record_array - query_range_array - topk """ def __init__(self, table_name=None, query_record_array=None, query_range_array=None, topk=None,): self.table_name = table_name self.query_record_array = query_record_array self.query_range_array = query_range_array self.topk = topk def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.table_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.query_record_array = [] (_etype24, _size21) = iprot.readListBegin() for _i25 in range(_size21): _elem26 = RowRecord() _elem26.read(iprot) self.query_record_array.append(_elem26) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.query_range_array = [] (_etype30, _size27) = iprot.readListBegin() for _i31 in range(_size27): _elem32 = Range() _elem32.read(iprot) self.query_range_array.append(_elem32) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.topk = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SearchVector_args') if self.table_name is not None: oprot.writeFieldBegin('table_name', TType.STRING, 2) oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name) oprot.writeFieldEnd() if self.query_record_array is not None: oprot.writeFieldBegin('query_record_array', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.query_record_array)) for iter33 in self.query_record_array: iter33.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.query_range_array is not None: oprot.writeFieldBegin('query_range_array', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.query_range_array)) for iter34 in self.query_range_array: iter34.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.topk is not None: oprot.writeFieldBegin('topk', TType.I64, 5) oprot.writeI64(self.topk) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(SearchVector_args) SearchVector_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'table_name', 'UTF8', None, ), # 2 (3, TType.LIST, 'query_record_array', (TType.STRUCT, [RowRecord, None], False), None, ), # 3 (4, TType.LIST, 'query_range_array', (TType.STRUCT, [Range, None], False), None, ), # 4 (5, TType.I64, 'topk', None, None, ), # 5 ) class SearchVector_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype38, _size35) = iprot.readListBegin() for _i39 in range(_size35): _elem40 = TopKQueryResult() _elem40.read(iprot) self.success.append(_elem40) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SearchVector_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter41 in self.success: iter41.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(SearchVector_result) SearchVector_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [TopKQueryResult, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class SearchVectorInFiles_args(object): """ Attributes: - table_name - file_id_array - query_record_array - query_range_array - topk """ def __init__(self, table_name=None, file_id_array=None, query_record_array=None, query_range_array=None, topk=None,): self.table_name = table_name self.file_id_array = file_id_array self.query_record_array = query_record_array self.query_range_array = query_range_array self.topk = topk def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.table_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.file_id_array = [] (_etype45, _size42) = iprot.readListBegin() for _i46 in range(_size42): _elem47 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.file_id_array.append(_elem47) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.query_record_array = [] (_etype51, _size48) = iprot.readListBegin() for _i52 in range(_size48): _elem53 = RowRecord() _elem53.read(iprot) self.query_record_array.append(_elem53) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.LIST: self.query_range_array = [] (_etype57, _size54) = iprot.readListBegin() for _i58 in range(_size54): _elem59 = Range() _elem59.read(iprot) self.query_range_array.append(_elem59) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.I64: self.topk = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SearchVectorInFiles_args') if self.table_name is not None: oprot.writeFieldBegin('table_name', TType.STRING, 2) oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name) oprot.writeFieldEnd() if self.file_id_array is not None: oprot.writeFieldBegin('file_id_array', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.file_id_array)) for iter60 in self.file_id_array: oprot.writeString(iter60.encode('utf-8') if sys.version_info[0] == 2 else iter60) oprot.writeListEnd() oprot.writeFieldEnd() if self.query_record_array is not None: oprot.writeFieldBegin('query_record_array', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.query_record_array)) for iter61 in self.query_record_array: iter61.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.query_range_array is not None: oprot.writeFieldBegin('query_range_array', TType.LIST, 5) oprot.writeListBegin(TType.STRUCT, len(self.query_range_array)) for iter62 in self.query_range_array: iter62.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.topk is not None: oprot.writeFieldBegin('topk', TType.I64, 6) oprot.writeI64(self.topk) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(SearchVectorInFiles_args) SearchVectorInFiles_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'table_name', 'UTF8', None, ), # 2 (3, TType.LIST, 'file_id_array', (TType.STRING, 'UTF8', False), None, ), # 3 (4, TType.LIST, 'query_record_array', (TType.STRUCT, [RowRecord, None], False), None, ), # 4 (5, TType.LIST, 'query_range_array', (TType.STRUCT, [Range, None], False), None, ), # 5 (6, TType.I64, 'topk', None, None, ), # 6 ) class SearchVectorInFiles_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype66, _size63) = iprot.readListBegin() for _i67 in range(_size63): _elem68 = TopKQueryResult() _elem68.read(iprot) self.success.append(_elem68) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SearchVectorInFiles_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter69 in self.success: iter69.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(SearchVectorInFiles_result) SearchVectorInFiles_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [TopKQueryResult, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class DescribeTable_args(object): """ Attributes: - table_name """ def __init__(self, table_name=None,): self.table_name = table_name def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.table_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('DescribeTable_args') if self.table_name is not None: oprot.writeFieldBegin('table_name', TType.STRING, 2) oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(DescribeTable_args) DescribeTable_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'table_name', 'UTF8', None, ), # 2 ) class DescribeTable_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TableSchema() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('DescribeTable_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(DescribeTable_result) DescribeTable_result.thrift_spec = ( (0, TType.STRUCT, 'success', [TableSchema, None], None, ), # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class GetTableRowCount_args(object): """ Attributes: - table_name """ def __init__(self, table_name=None,): self.table_name = table_name def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.table_name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('GetTableRowCount_args') if self.table_name is not None: oprot.writeFieldBegin('table_name', TType.STRING, 2) oprot.writeString(self.table_name.encode('utf-8') if sys.version_info[0] == 2 else self.table_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(GetTableRowCount_args) GetTableRowCount_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'table_name', 'UTF8', None, ), # 2 ) class GetTableRowCount_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.I64: self.success = iprot.readI64() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('GetTableRowCount_result') if self.success is not None: oprot.writeFieldBegin('success', TType.I64, 0) oprot.writeI64(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(GetTableRowCount_result) GetTableRowCount_result.thrift_spec = ( (0, TType.I64, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class ShowTables_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ShowTables_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(ShowTables_args) ShowTables_args.thrift_spec = ( ) class ShowTables_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype73, _size70) = iprot.readListBegin() for _i74 in range(_size70): _elem75 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem75) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ShowTables_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter76 in self.success: oprot.writeString(iter76.encode('utf-8') if sys.version_info[0] == 2 else iter76) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(ShowTables_result) ShowTables_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) class Ping_args(object): """ Attributes: - cmd """ def __init__(self, cmd=None,): self.cmd = cmd def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.cmd = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Ping_args') if self.cmd is not None: oprot.writeFieldBegin('cmd', TType.STRING, 2) oprot.writeString(self.cmd.encode('utf-8') if sys.version_info[0] == 2 else self.cmd) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(Ping_args) Ping_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'cmd', 'UTF8', None, ), # 2 ) class Ping_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = Exception() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Ping_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(Ping_result) Ping_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [Exception, None], None, ), # 1 ) fix_spec(all_structs) del all_structs
33.878897
159
0.58735
8,035
74,974
5.2458
0.035345
0.028612
0.025836
0.021352
0.868446
0.844223
0.829395
0.810249
0.80605
0.80344
0
0.00847
0.314963
74,974
2,212
160
33.894213
0.812208
0.064849
0
0.790382
1
0
0.035549
0.001375
0
0
0
0
0
1
0.106658
false
0.005549
0.004932
0.033292
0.202219
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
4ab8f602aa91e33161e314eee20caa0418875d2a
94,612
py
Python
aries_cloudagent/protocols/present_proof/dif/tests/test_data.py
mduffin95/aries-cloudagent-python
cb102bcb796dd6e7aec95eb4fe753b10f0c612b3
[ "Apache-2.0" ]
2
2021-11-14T16:28:57.000Z
2022-02-10T11:01:28.000Z
aries_cloudagent/protocols/present_proof/dif/tests/test_data.py
estrehle/aries-cloudagent-python
1460b2d32c933944b4677cf25a78c4ace07346c8
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/protocols/present_proof/dif/tests/test_data.py
estrehle/aries-cloudagent-python
1460b2d32c933944b4677cf25a78c4ace07346c8
[ "Apache-2.0" ]
null
null
null
"""Data for DIFPresExchHandler.""" import json from pyld import jsonld from pyld.jsonld import JsonLdProcessor from .....storage.vc_holder.vc_record import VCRecord from ..pres_exch import PresentationDefinition def create_vcrecord(cred_dict: dict, expanded_types: list): given_id = cred_dict.get("id") contexts = [ctx for ctx in cred_dict.get("@context") if type(ctx) is str] # issuer issuer = cred_dict.get("issuer") if type(issuer) is dict: issuer = issuer.get("id") # subjects subjects = cred_dict.get("credentialSubject") if type(subjects) is dict: subjects = [subjects] subject_ids = [subject.get("id") for subject in subjects if subject.get("id")] # Schemas schemas = cred_dict.get("credentialSchema", []) if type(schemas) is dict: schemas = [schemas] schema_ids = [schema.get("id") for schema in schemas] # Proofs (this can be done easier if we use the expanded version) proofs = cred_dict.get("proof") or [] proof_types = None if type(proofs) is dict: proofs = [proofs] if proofs: proof_types = [proof.get("type") for proof in proofs] return VCRecord( contexts=contexts, expanded_types=expanded_types, issuer_id=issuer, subject_ids=subject_ids, proof_types=proof_types, given_id=given_id, cred_value=cred_dict, schema_ids=schema_ids, ) is_holder_pd = PresentationDefinition.deserialize( { "id": "32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements": [ { "name": "European Union Citizenship Proofs", "rule": "all", "from": "A", } ], "input_descriptors": [ { "id": "citizenship_input_1", "group": ["A"], "schema": [ {"uri": "https://www.w3.org/2018/credentials#VerifiableCredential"}, {"uri": "https://w3id.org/citizenship#PermanentResidentCard"}, ], "constraints": { "is_holder": [ { "directive": "required", "field_id": ["1f44d55f-f161-4938-a659-f8026467f126"], } ], "fields": [ { "id": "1f44d55f-f161-4938-a659-f8026467f126", "path": ["$.issuanceDate", "$.vc.issuanceDate"], "filter": { "type": "string", "format": "date", "maximum": "2014-5-16", }, } ], }, } ], } ) is_holder_pd_multiple_fields_included = PresentationDefinition.deserialize( { "id": "32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements": [ { "name": "European Union Citizenship Proofs", "rule": "all", "from": "A", } ], "input_descriptors": [ { "id": "citizenship_input_1", "group": ["A"], "schema": [ {"uri": "https://www.w3.org/2018/credentials#VerifiableCredential"}, {"uri": "https://w3id.org/citizenship#PermanentResidentCard"}, ], "constraints": { "is_holder": [ { "directive": "required", "field_id": [ "1f44d55f-f161-4938-a659-f8026467f126", "1f44d55f-f161-4938-a659-f8026467f127", ], } ], "fields": [ { "id": "1f44d55f-f161-4938-a659-f8026467f126", "path": ["$.issuanceDate", "$.vc.issuanceDate"], "filter": { "type": "string", "format": "date", "maximum": "2014-5-16", }, }, { "id": "1f44d55f-f161-4938-a659-f8026467f127", "path": ["$.issuanceDate", "$.vc.issuanceDate"], "filter": { "type": "string", "format": "date", "minimum": "2005-5-16", }, }, ], }, } ], } ) is_holder_pd_multiple_fields_excluded = PresentationDefinition.deserialize( { "id": "32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements": [ { "name": "European Union Citizenship Proofs", "rule": "all", "from": "A", } ], "input_descriptors": [ { "id": "citizenship_input_1", "group": ["A"], "schema": [ {"uri": "https://www.w3.org/2018/credentials#VerifiableCredential"}, {"uri": "https://w3id.org/citizenship#PermanentResidentCard"}, ], "constraints": { "is_holder": [ { "directive": "required", "field_id": ["1f44d55f-f161-4938-a659-f8026467f126"], } ], "fields": [ { "id": "1f44d55f-f161-4938-a659-f8026467f126", "path": ["$.issuanceDate", "$.vc.issuanceDate"], "filter": { "type": "string", "format": "date", "maximum": "2014-5-16", }, }, { "id": "1f44d55f-f161-4938-a659-f8026467f127", "path": ["$.issuanceDate", "$.vc.issuanceDate"], "filter": { "type": "string", "format": "date", "minimum": "2005-5-16", }, }, ], }, } ], } ) creds_with_no_id = [ create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "type": ["PermanentResident", "Person"], "givenName": "TEST", "familyName": "SMITH", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Bahamas", "birthDate": "1958-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "mMEjznbr4lN5xQT0OuLJ94pKSSBEwBxKNHBPxfjwhRq2NnDaTH/mb+PdPnmfUgKvA8h5hI9Ho3qfY8TWmJtLsYSmJFZoG/FARQuwJJbTW/tVZoA2FVVKZGEsGt2MHsr1z/W30cXnmRyQzgqh4lnhQg==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "type": ["PermanentResident", "Person"], "givenName": "TEST", "familyName": "SMITH", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Bahamas", "birthDate": "1958-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "rf5LlOFiB5oAl/hSEeaN/H3vx+3AXVpL4O4abtLmYb1aUF+WBOX3HBx5SrTkcwUgJBAPNoFX9l2PVDjTGy/eCjDerDG0DN5ZR+YwjebcZeclzE3Yv2hsnan1M/OTAc9GTNWE3p9lXbRxHNvwTXX6ug==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), ] bbs_signed_cred_no_credsubjectid = [ create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627465", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "identifier": "83627465", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2019-12-03T12:19:52Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "type": ["PermanentResident", "Person"], "givenName": "JOHN", "familyName": "SMITH", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Bahamas", "birthDate": "1958-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "hG9cNGyjjAgPkDmtNv/+28ciBZFUVcAG2gfvLBlTWeFyYJu6DARo16RwQAoSnrgVRQn3n7KCSdnSrPb3op1+vSTu2vo+LF3GfSfqlei44bwA+c2FBIRk7S3FKY6Lm5mqOtC2Q4LStC9HtaOj8vQhgA==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "credentialSubject": { "birthCountry": "Bahamas", "birthDate": "1958-07-17", "familyName": "SMITH", "gender": "Female", "givenName": "ALICE", "type": ["PermanentResident", "Person"], }, "issuanceDate": "2020-01-01T12:00:00Z", "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "type": ["VerifiableCredential", "PermanentResidentCard"], "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "haUMgpZE4hPiIEvzdEWyGsvXh1enQvhsOq2cMf3q80u29ybRDi74zU0O+fug1bWiMxeFOboxsfuEKXGC4Ldw0sCsIs+90Jn4EuTqhY4ml8YWsKY9Kjpxvtpc0e24SOl++oo48EICfUxb24HYlQ35pw==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://example.gov/credentials/3732", "type": ["VerifiableCredential", "UniversityDegreeCredential"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "issuanceDate": "2020-03-10T04:24:12.164Z", "credentialSubject": { "degree": { "type": "BachelorDegree", "name": "Bachelor of Science and Arts", "degreeType": "Underwater Basket Weaving", }, "college": "Contoso University", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "iRArJRSvmIwx5YH2HXg5OJD+0v5sD1HoqhBsiJiw59t3Eb6nSntyOnENEnqnpzQwCjtbvOsU18eBlVi2/ign1u1ysz0iOLxSRHvIKtDDpr1dTDwQCbuZo2gUnY+8Dy+xEst8MDtcXwzNQW8Y3l1XzA==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://example.org/examples#UniversityDegreeCredential", ], ), ] bbs_signed_cred_credsubjectid = [ create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627465", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "identifier": "83627465", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2019-12-03T12:19:52Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "JOHN", "familyName": "SMITH", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Bahamas", "birthDate": "1958-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "s++A89p+SvIHvY9pnIKIPsLjrLGGk2cs+LfpTWCsE0S1Y5Rg1h9OA5c84Vzqlc3kGfM3zdYpHrO9v0/vBFLQ3HV9wH7xgmD9MPVN+klsaQJdobRpJMjlBni7/QA2/+0szT2P1FJ537lGjyuRboVWng==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://example.gov/credentials/3732", "type": ["VerifiableCredential", "UniversityDegreeCredential"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "issuanceDate": "2020-03-10T04:24:12.164Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "degree": { "type": "BachelorDegree", "name": "Bachelor of Science and Arts", "degreeType": "Underwater Basket Weaving", }, "college": "Contoso University", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "iGAQ4bOxuqkoCbX3RoxTqFkJsoqPcEeRN2vqIzd/zWLS+VHCwYkQHu/TeMOrit4eb6eugbJFUBaoenZyy2VU/7Rsj614sNzumJFuJ6ZaDTlv0k70CkO9GheQTc+Gwv749Y3JzPJ0dwYGUzzcyytFCQ==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://example.org/examples#UniversityDegreeCredential", ], ), ] bbs_bls_number_filter_creds = [ create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627465", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:example:489398593", "identifier": "83627465", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "JOHN", "familyName": "SMITH", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Bahamas", "birthDate": "1958-07-17", "test": 2, }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:example:489398593#test", "created": "2021-04-13T23:23:56.045014", "proofPurpose": "assertionMethod", "proofValue": "rhD+4HOhPfLywBuhLYMi1i0kWa/L2Qipt+sqTRiebjoo4OF3ESoGnm+L4Movz128Mjns60H0Bz7W+aqN1dPP9uhU/FGBKW/LEIGJX1rrrYgn17CkWp46z/hwQy+8c9ulOCn0Yq3BDqB37euoBTZbOQ==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627466", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:example:489398593", "identifier": "83627466", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Theodor", "familyName": "Major", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2017-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Canada", "birthDate": "1968-07-17", "test": 2, }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:example:489398593#test", "created": "2021-04-13T23:33:05.798834", "proofPurpose": "assertionMethod", "proofValue": "jp8ahSYYFhRAk+1ahfG8qu7iEjQnEXp3P3fWgTrc4khxmw9/9mGACq67YW9r917/aKYTQcVyojelN3cBHrjBvaOzb7bZ6Ps0Wf6WFq1gc0QFUrdiN0mJRl5YAz8R16sLxrPsoS/8ji1MoabjqmlnWQ==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627467", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:example:489398593", "identifier": "83627467", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Cai", "familyName": "Leblanc", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-9989", "commuterClassification": "C1", "birthCountry": "Canada", "birthDate": "1975-07-17", "test": 3, }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:example:489398593#test", "created": "2021-04-13T23:40:44.835154", "proofPurpose": "assertionMethod", "proofValue": "t8+TPbYqF/dGlEn+qNnEFL1L0QeUjgXlYfJ7AelzOhb7cr2CjP/MIcG5bAQ5l6F2OZKNyE8RsPY14xedrkxpyv1oyWPmXzOwr0gt6ElLJm9jAUwFoZ7xAYHSedcR3Lh4FFuqmxfBHYF3A6VgSlMSfA==", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), ] edd_jsonld_creds = [ create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627465", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:example:489398593", "identifier": "83627465", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "JOHN", "familyName": "SMITH", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Bahamas", "birthDate": "1958-07-17", }, "proof": { "type": "Ed25519Signature2018", "verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", "created": "2021-05-07T08:47:13.090322", "proofPurpose": "assertionMethod", "jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0IjogWyJiNjQiXX0..HHEpbiQp781YtXdxmYr3xO9a8OtHSePjySbgwGaSqiHGjd9hO0AnhkFxlBlrGukp5rkiJccr4p9KV3uKDzkqDA", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627466", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:example:489398593", "identifier": "83627466", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Theodor", "familyName": "Major", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2017-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Canada", "birthDate": "1968-07-17", }, "proof": { "type": "Ed25519Signature2018", "verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", "created": "2021-05-07T08:48:49.702706", "proofPurpose": "assertionMethod", "jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0IjogWyJiNjQiXX0..r88-rSvqp_JLr2fnGr8nKEU--Hu6UhzjXOmdWpt082Wc6ojWpOANvv2wbgKrs5kXF5ATb8-AZ01VPpHdv4m9CQ", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), create_vcrecord( { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627467", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:example:489398593", "identifier": "83627467", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Cai", "familyName": "Leblanc", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-9989", "commuterClassification": "C1", "birthCountry": "Canada", "birthDate": "1975-07-17", }, "proof": { "type": "Ed25519Signature2018", "verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", "created": "2021-05-07T08:50:17.626625", "proofPurpose": "assertionMethod", "jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0IjogWyJiNjQiXX0..rubQvgig7cN-F6cYn_AJF1BCSaMpkoR517Ot_4pqwdJnQ-JwKXq6d6cNos5JR73E9WkwYISXapY0fYTIG9-fBA", }, }, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ), ] CRED_LIST = [ { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627465", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "identifier": "83627465", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "JOHN", "familyName": "SMITH", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Bahamas", "birthDate": "1958-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "ssut7SPH6KiY44z5w9N/dD+L8KxS7pXF5irVyty0IlafX7hn5AZNd1rb7fhzVz6wZo9nK/nu/bYs9zhuJggTbuQNPWyOWiFmd3uSxr+CrTYUZ/u31s7gaqEYv4pUBoKgMx6WKkOApELtOI4e0PFddA==", }, }, { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627466", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "identifier": "83627466", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Theodor", "familyName": "Major", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2017-01-01", "lprCategory": "C09", "lprNumber": "999-999-999", "commuterClassification": "C1", "birthCountry": "Canada", "birthDate": "1968-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "tnRgimJXy8mP7Amk8dPiJnJc+WhAFiYPF8hpRlqOPsSom4cF1VAxaiAN2o3io1kYajUtmXAJLxNNLOZkXDBblcqZAu5mHKEPWc/nctu3vNs4gs5f7tWZX7lm6JK71pLJq8lWbyIufIm/BnCjeIll5g==", }, }, { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627467", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:sov:2wJPyULfLLnYTEFYzByfUR", "identifier": "83627467", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Cai", "familyName": "Leblanc", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2015-01-01", "lprCategory": "C09", "lprNumber": "999-999-9989", "commuterClassification": "C1", "birthCountry": "Canada", "birthDate": "1975-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "l1sdjvIhlkAPb+Y1vUYgIVH9YhiWSFjJFOL1ntzN9jXvOqv7/RMFhoAxg0BTYU1ITHK5l/6Q5lwmtkKxJMt/Z+QPZ8yWDIwqX8kVXFxKo9st8T45ChYiizc75E+Rd7Z5qIidmuulyPvpHlpgHYLZsQ==", }, }, { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627468", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:example:489398593", "identifier": "83627468", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Jamel", "familyName": "Huber", "gender": "Female", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2012-01-01", "lprCategory": "C09", "lprNumber": "999-999-000", "commuterClassification": "C1", "birthCountry": "United States", "birthDate": "1959-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "rtG10rBsv8zXHBGWqHTeGyH9Y3oMa6xHjBvsJ5YHeocUBxOCge2WEs1tr60hjI4SEpi3JHSJOfd1wJEvfvMg/x6YnTZoA2UXiHBu/6vANx43EfTgbq4YDrrf1aTtQgpZDp/J4GaKoeUshuPXyf8LyA==", }, }, { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627469", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:sov:2wJPyULfLLnYTEFYzByfUR", "identifier": "83627469", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Vivek", "familyName": "Easton", "gender": "Male", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2019-01-01", "lprCategory": "C09", "lprNumber": "999-999-888", "commuterClassification": "C1", "birthCountry": "India", "birthDate": "1990-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "pvo7gqDgu9mMjcZafvS8gRz0mIRfFnRCNmp39cZ/92R3UDG5bmxPhh4nG2k1kjaza8wFfaqjaBxsonV+FkQUMzUWbZkn2vstEcGCJllDHFBQiDcf8MVCiCcbGBLpU9MXjnyzhwA5AteG9a2YcvRh/w==", }, }, { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "id": "https://issuer.oidp.uscis.gov/credentials/83627470", "type": ["VerifiableCredential", "PermanentResidentCard"], "issuer": "did:sov:2wJPyULfLLnYTEFYzByfUR", "identifier": "83627470", "name": "Permanent Resident Card", "description": "Government of Example Permanent Resident Card.", "issuanceDate": "2010-01-01T19:53:24Z", "expirationDate": "2029-12-03T12:19:52Z", "credentialSubject": { "id": "did:sov:WgWxqztrNooG92RXvxSTWv", "type": ["PermanentResident", "Person"], "givenName": "Ralphie", "familyName": "Jennings", "gender": "Female", "image": "data:image/png;base64,iVBORw0KGgokJggg==", "residentSince": "2010-01-01", "lprCategory": "C09", "lprNumber": "999-999-777", "commuterClassification": "C1", "birthCountry": "Canada", "birthDate": "1980-07-17", }, "proof": { "type": "BbsBlsSignature2020", "verificationMethod": "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa#zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "created": "2019-12-11T03:50:55", "proofPurpose": "assertionMethod", "proofValue": "pVuvbBfGnVbwwht1s4qZSCoLlZ8nwqvsmNKR+1VTesA+7tXPriJCdlnNFDL0Gkh5TV5E0NOS8WNttE5Uhhqakmjcs7L4hIr4PoVtCLFAF1tce8n4Z/5PKD7IuGIdCDbn77fjQffu2Cs+JDBVVcQRBA==", }, }, ] # [Nested_From] Either or case # Exclusive Disjunction # ----------------------- # |_x_|_y_|_output_| # | T | T | F | # | T | F | T | # | F | T | T | # | F | F | F | # ----------------------- pres_exch_nested_srs_a = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "Citizenship Information", "rule": "pick", "count": 1, "from_nested": [ { "name": "United States Citizenship Proofs", "purpose": "We need you to prove you are a US citizen.", "rule": "all", "from": "A" }, { "name": "European Union Citizenship Proofs", "purpose": "We need you to prove you are a citizen of a EU country.", "rule": "all", "from": "B" } ] } ], "input_descriptors":[ { "id":"citizenship_input_1", "name":"EU Driver's License", "group":[ "A" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuer.id", "$.issuer", "$.vc.issuer.id" ], "purpose":"The claim must be from one of the specified issuers", "filter":{ "type":"string", "enum": ["did:example:489398593", "did:sov:2wJPyULfLLnYTEFYzByfUR"] } } ] } }, { "id":"citizenship_input_2", "name":"US Passport", "group":[ "B" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuanceDate", "$.vc.issuanceDate" ], "filter":{ "type":"string", "format":"date", "maximum":"2005-5-16" } } ] } } ] } """ pres_exch_nested_srs_b = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "Citizenship Information", "rule": "pick", "count": 1, "from_nested": [ { "name": "United States Citizenship Proofs", "purpose": "We need you to prove you are a US citizen.", "rule": "all", "from": "A" }, { "name": "European Union Citizenship Proofs", "purpose": "We need you to prove you are a citizen of a EU country.", "rule": "all", "from": "B" } ] } ], "input_descriptors":[ { "id":"citizenship_input_1", "name":"EU Driver's License", "group":[ "A" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuer.id", "$.issuer", "$.vc.issuer.id" ], "purpose":"The claim must be from one of the specified issuers", "filter":{ "type":"string", "enum": ["did:example:489398593"] } } ] } }, { "id":"citizenship_input_2", "name":"US Passport", "group":[ "B" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuanceDate", "$.vc.issuanceDate" ], "filter":{ "type":"string", "format":"date", "maximum":"2012-5-16" } } ] } } ] } """ pres_exch_nested_srs_c = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "Citizenship Information", "rule": "pick", "count": 1, "from_nested": [ { "name": "United States Citizenship Proofs", "purpose": "We need you to prove you are a US citizen.", "rule": "all", "from": "A" }, { "name": "European Union Citizenship Proofs", "purpose": "We need you to prove you are a citizen of a EU country.", "rule": "all", "from": "B" } ] } ], "input_descriptors":[ { "id":"citizenship_input_1", "name":"EU Driver's License", "group":[ "A" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuer.id", "$.issuer", "$.vc.issuer.id" ], "purpose":"The claim must be from one of the specified issuers", "filter":{ "type":"string", "enum": ["did:example:489398593", "did:sov:2wJPyULfLLnYTEFYzByfUR"] } } ] } }, { "id":"citizenship_input_2", "name":"US Passport", "group":[ "B" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuanceDate", "$.vc.issuanceDate" ], "filter":{ "type":"string", "format":"date", "minimum":"2005-5-16" } } ] } } ] } """ pres_exch_multiple_srs_not_met = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "Citizenship Information", "rule": "pick", "count": 2, "from": "A" }, { "name": "European Union Citizenship Proofs", "purpose": "We need you to prove you are a citizen of a EU country.", "rule": "all", "from": "B" } ], "input_descriptors":[ { "id":"citizenship_input_1", "name":"EU Driver's License", "group":[ "A" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuer.id", "$.vc.issuer.id", "$.issuer" ], "purpose":"The claim must be from one of the specified issuers", "filter":{ "type":"string", "enum": ["did:example:489398593", "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "did:sov:2wJPyULfLLnYTEFYzByfUR"] } } ] } }, { "id":"citizenship_input_2", "name":"US Passport", "group":[ "B" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuanceDate", "$.vc.issuanceDate" ], "filter":{ "type":"string", "format":"date", "exclusiveMinimum":"2009-5-16" } } ] } } ] } """ pres_exch_multiple_srs_met_one_of_filter_invalid = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "Citizenship Information", "rule": "all", "from": "A" }, { "name": "European Union Citizenship Proofs", "rule": "all", "from": "B" }, { "name": "Date Test", "rule": "all", "from": "C" } ], "input_descriptors":[ { "id":"citizenship_input_1", "name":"EU Driver's License", "group":[ "A" ], "schema": [ { "uri":"https://www.w3.org/Test#Test" } ], "constraints":{ "fields":[ { "path":[ "$.issuer.id", "$.vc.issuer.id", "$.issuer" ], "filter":{ "type":"string", "enum": ["did:example:489398593", "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "did:sov:2wJPyULfLLnYTEFYzByfUR"] } } ] } }, { "id":"citizenship_input_2", "name":"US Passport", "group":[ "B" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.credentialSubject.gender" ], "filter":{ "const":"Male" } } ] } }, { "id":"citizenship_input_3", "name":"US Passport", "group":[ "C" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuanceDate" ], "filter":{ "type":"string", "format":"date", "minimum":"2005-5-16" } } ] } } ] } """ pres_exch_multiple_srs_met_one_of_valid = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "Citizenship Information", "rule": "all", "from": "A" }, { "name": "European Union Citizenship Proofs", "rule": "all", "from": "B" }, { "name": "Date Test", "rule": "all", "from": "C" } ], "input_descriptors":[ { "id":"citizenship_input_1", "name":"EU Driver's License", "group":[ "A" ], "schema": { "oneof_filter": [ [ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ] ] }, "constraints":{ "fields":[ { "path":[ "$.issuer.id", "$.vc.issuer.id", "$.issuer" ], "filter":{ "type":"string", "enum": ["did:example:489398593", "did:key:zUC72Q7XD4PE4CrMiDVXuvZng3sBvMmaGgNeTUJuzavH2BS7ThbHL9FhsZM9QYY5fqAQ4MB8M9oudz3tfuaX36Ajr97QRW7LBt6WWmrtESe6Bs5NYzFtLWEmeVtvRYVAgjFcJSa", "did:sov:2wJPyULfLLnYTEFYzByfUR"] } } ] } }, { "id":"citizenship_input_2", "name":"US Passport", "group":[ "B" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.credentialSubject.gender" ], "filter":{ "const":"Male" } } ] } }, { "id":"citizenship_input_3", "name":"US Passport", "group":[ "C" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuanceDate" ], "filter":{ "type":"string", "format":"date", "minimum":"2005-5-16" } } ] } } ] } """ pres_exch_datetime_minimum_met = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "European Union Citizenship Proofs", "rule": "all", "from": "A" } ], "input_descriptors":[ { "id":"citizenship_input_1", "group":[ "A" ], "schema":[ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], "constraints":{ "fields":[ { "path":[ "$.issuanceDate", "$.vc.issuanceDate" ], "filter":{ "type":"string", "format":"date", "minimum":"2005-5-16" } } ] } } ] } """ pres_exch_datetime_maximum_met = """ { "id":"32f54163-7166-48f1-93d8-ff217bdb0653", "submission_requirements":[ { "name": "European Union Citizenship Proofs", "rule": "all", "from": "A" } ], "input_descriptors":[ { "id":"citizenship_input_1", "group":[ "A" ], "schema": { "oneof_filter": [ [ { "uri":"https://www.w3.org/2018/credentials#VerifiableCredential" }, { "uri":"https://w3id.org/citizenship#PermanentResidentCard" } ], [ { "uri":"https://w3id.org/Test#Test" } ] ] }, "constraints":{ "fields":[ { "path":[ "$.issuanceDate", "$.vc.issuanceDate" ], "filter":{ "type":"string", "format":"date", "maximum":"2014-5-16" } } ] } } ] } """ TEST_CRED_DICT = { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/bbs/v1", { "MedicalPass": { "@id": "https://www.vdel.com/MedicalPass", "@context": { "description": "http://schema.org/description", "identifier": "http://schema.org/identifier", "name": "http://schema.org/name", "image": "http://schema.org/image", }, } }, { "Patient": { "@id": "http://hl7.org/fhir/Patient", "@context": [ "https://fhircat.org/fhir-r5/rdf-r5/contexts/patient.context.jsonld" ], } }, ], "id": "urn:bnid:_:c14n4", "type": ["MedicalPass", "VerifiableCredential"], "credentialSubject": { "id": "urn:bnid:_:c14n6", "Patient": { "@id": "urn:bnid:_:c14n7", "@type": "fhir:resource-types#Patient", "address": { "@id": "urn:bnid:_:c14n1", "city": "Рума", }, }, }, "issuanceDate": "2021-10-01T20:16:40+02:00", "issuer": "did:key:test", "proof": { "type": "BbsBlsSignatureProof2020", "nonce": "M9yQx0eKIAI3Zs0sLF1kQsO7/hV1ZKEnqX9f0V/SzwRMKEixa0tJgqbGwviMA04XoL0=", "proofValue": "ACYgFHwPj5TxR9H+k+V+rBsfZ3SgOEvoKrYCcvAl4HhaKNR039r5UWE89tnHaVOx22k604EWibf0s7BTezijjYv1VWSVkZar4wtOslplXv6g7dVc8/0IWXQWOfn2hTE2N65Wv8xz2qw5dWwEzSXTx44o15wE2ubimgGFMM7Mv++SAoHC1dQGotGqKqOB2PS8yI+ToiWmswAAAHSD5NRIZHKeiWP8hK/e9xUYy5gSPBivDVAORybl62B/F3eaUC/pRdfsORAWRHLjmfcAAAACcOe6yrLqI3OmxkKUfsCGgIl83LLcQ9pLjaigdc/5XRs6KYo533Q/7cGryn2IvLFAJiHgZJ8Ovwi9xkDy1USKjZfjgRMil4PEiwZ2Gqu4g+HlJ11JemUX2HDAjJYgJHSFguZp/l/5y//0pQegHOi9hwAAABcp9nblpM/ALrFpdenGn23x5kdYC4gMyTV6a6RPuMwryVZcmTP50XDVHiY2t4JLvULdJcGDcOCpetMPhqyAf3VeNtorYjr1+YWSgjApfqZ594rMyohWGwkNu0zqv19qDkQ+aBibGhhsCBHe+jFy/BXQv2TlIMgX7YdUgVtUuO4YJT4cz4xrDlK58sJPpmJqraasoA0E+ciPOtGX5J7e4n+dGlPwkQjcD79cjBGs7hXmljeqbe2a82YQw/Q+L/yVKqxl8+ucLoqQ2QzREKslQ7ljchX8RsHQURflZTgPxGjNyCqHtEIcT6d7COcpmqGYSo5ge0pIXab97H97NBnk9mmdcCOCETWOJ8shuS7n4R4GdnRDjB5ArbBnpIMYUGEsdD0ZR87nVBbAfWFhQWJgsJvpPOGq2p6VPImfwhIoh7LIYkpwVogRLrSQGl5IZcHexlHwjZoogafCD5OSyEAO3au3UUoVde4S98v2233QuOwXvz3ptYOO+aJIbqmgdmGs41YfbyT830/H+248+Zbkob7T1FBWbYtEW+k8omat87tc3RfU9LYgNrXWUpJ/TZ+4Cqg7VljkPhCIEZYNUoKQxG1pP11HsmLvzhtnoNVLwjvJA7IrcinAr2pnWSBzjm/wBx8mANrCAHW4f4yyvSXCWZJOfnf/N8dt01Di0QaNbYs8Hlo6yjjjqkrvgLpZtAuuca8nQPPNZWrj3Oids/Z0nZsgKGwZxHo5negKE1JKEEz7zJQUd14JhRYiwfzWYprHcJ9szp5Tgmskksv3NIyKQ7XfLwnOY29zLOpTm51c99Ru6CVvAvIGckB+oE8cwPRjfE9fajJtQEODZ1ljbzYNACzLZ52iSsL+rSKq9LL79TgmN2lE0SkmgrwkOBAjmSwzrBc9DdQrkpWlSZzOWyL/QuNfHfEiNn43nwhaJpbvQ6zr/XHbspH7oqe0eexfvzowzkKc9noWqQnU0IaMrtRgyOma", "verificationMethod": "did:key:test", "proofPurpose": "assertionMethod", "created": "2021-10-01T18:16:41.072975+00:00", }, } TEST_CRED_WILDCARD = { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/bbs/v1", { "LabReport": { "@id": "https://www.vdel.com/LabReport", "@context": { "description": "http://schema.org/description", "identifier": "http://schema.org/identifier", "name": "http://schema.org/name", "image": "http://schema.org/image", }, } }, { "Specimen": { "@id": "http://hl7.org/fhir/Specimen", "@context": [ None, "https://fhircat.org/fhir-r5/rdf-r5/contexts/specimen.context.jsonld", ], } }, { "Observation": { "@id": "http://hl7.org/fhir/Observation", "@context": [ None, "https://fhircat.org/fhir-r5/rdf-r5/contexts/observation.context.jsonld", ], } }, { "Organization": { "@id": "http://hl7.org/fhir/Organization", "@context": [ None, "https://fhircat.org/fhir-r5/rdf-r5/contexts/organization.context.jsonld", ], } }, { "Practitioner": { "@id": "http://hl7.org/fhir/Practitioner", "@context": [ None, "https://fhircat.org/fhir-r5/rdf-r5/contexts/practitioner.context.jsonld", ], } }, { "DiagnosticReport": { "@id": "http://hl7.org/fhir/DiagnosticReport", "@context": [ None, "https://fhircat.org/fhir-r5/rdf-r5/contexts/diagnosticreport.context.jsonld", ], } }, { "PractitionerRole": { "@id": "http://hl7.org/fhir/PractitionerRole", "@context": [ None, "https://fhircat.org/fhir-r5/rdf-r5/contexts/practitionerrole.context.jsonld", ], } }, ], "type": ["VerifiableCredential", "LabReport"], "issuer": "did:key:zUC74FYQCzCbDpbVm9v1LVCc2RkxJY3XMdxV9UpsVaerTgEAAjpdWfE8WemccfdNhski3kHiXfLzPZW2wgsvSCkZFWV3zSNxQEqZoV8kVpwLtLzzpskRcskBB3M3DxaeBnDvK4H", "issuanceDate": "2021-10-01T20:17:12+02:00", "credentialSubject": { "DiagnosticReport": { "resourceType": "http://hl7.org/fhir/resource-types#DiagnosticReport", "id": "ca66dd0a-6ad5-db5e-e053-5a18000aa066", "language": "sr-Cyrl-RS", "basedOn": [ {"reference": "ServiceRequest/ca66a8f6-1b0e-2881-e053-5a18000acec9"} ], "status": "final", "category": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0074", "code": "LAB", } ] }, "code": { "coding": [ { "system": "http://loinc.org", "code": "11502-2", "display": "Laboratory report", } ] }, "subject": {"reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7"}, "effectiveDateTime": "2021-08-25T19:47:00EUROPE/BELGRADE", "issued": "2021-08-25T19:47:00EUROPE/BELGRADE", "performer": [ {"reference": "PractitionerRole/ca6632d5-a447-6306-e053-5a18000a3953"} ], "specimen": [ {"reference": "Specimen/ca666dfb-5a85-614a-e053-5a18000af20b"} ], "result": [ {"reference": "Observation/ca708651-e8eb-3513-e053-5a18000ae79b"}, {"reference": "Observation/ca708651-e8ec-3513-e053-5a18000ae79b"}, {"reference": "Observation/ca708651-e8ed-3513-e053-5a18000ae79b"}, {"reference": "Observation/ca708651-e8e9-3513-e053-5a18000ae79b"}, {"reference": "Observation/ca708651-e8ea-3513-e053-5a18000ae79b"}, {"reference": "Observation/ca708651-e8e7-3513-e053-5a18000ae79b"}, {"reference": "Observation/ca708651-e8e8-3513-e053-5a18000ae79b"}, ], }, "Specimen": { "resourceType": "http://hl7.org/fhir/resource-types#Specimen", "id": "ca666dfb-5a85-614a-e053-5a18000af20b", "language": "sr-Cyrl-RS", "accessionIdentifier": { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "ACSN", } ], "text": "Broj protokola", }, "value": "124", }, "status": "available", "type": { "coding": [ { "system": "http://snomed.info/sct", "code": "122592007", "display": "Acellular blood (serum or plasma) specimen", } ] }, "subject": {"reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7"}, "receivedTime": "2021-08-25T19:16:00EUROPE/BELGRADE", }, "PractitionerRole": { "resourceType": "http://hl7.org/fhir/resource-types#PractitionerRole", "id": "ca6632d5-a447-6306-e053-5a18000a3953", "active": True, "practitioner": { "reference": "Practitioner/ca5ed67e-5780-0136-e053-5a18000ae501" }, "organization": { "reference": "Organization/ca661f4d-ffc6-6111-e053-5a18000a3dea" }, "code": [ { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/healthcare-professional-roles-uv-ips", "code": "2212", "display": "Специјалисти лекари", } ] } ], "specialty": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "408454008", "display": "Клиничка микробиологија", } ] } ], }, "Practitioner": { "resourceType": "http://hl7.org/fhir/resource-types#Practitioner", "id": "ca5ed67e-5780-0136-e053-5a18000ae501", "language": "sr-Cyrl-RS", "text": "специјалиста медицинске микробиологије", "active": True, "name": [{"family": "Банчевић", "given": ["Маја"], "suffix": ["др"]}], "gender": "female", "qualification": [{"code": {"coding": [{"code": "MD"}]}}], }, "Observation": [ { "resourceType": "http://hl7.org/fhir/resource-types#Observation", "id": "ca708651-e8eb-3513-e053-5a18000ae79b", "language": "sr-Cyrl-RS", "text": {"status": "generated", "div": "Negativan"}, "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", } ] } ], "code": { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips", "code": "24115-8", "display": "Epstein Barr virus (EBV) IgM", }, { "system": "http://snomed.info/sct", "code": "40168006", "display": "Epstein Barr virus (EBV)", }, { "system": "http://snomed.info/sct", "code": "74889000", "display": "IgM", }, ] }, "subject": { "reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7" }, "effectiveDateTime": "2021-08-26T07:09:00EUROPE/BELGRADE", "method": { "coding": [ { "system": "http://hl7.org/fhir/ValueSet/observation-methods", "code": "76978006", "display": "ELISA", } ] }, "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "2667000", "display": "Odsutno", } ] }, "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "NEG", "display": "Negativan", } ] } ], }, { "resourceType": "http://hl7.org/fhir/resource-types#Observation", "id": "ca708651-e8e8-3513-e053-5a18000ae79b", "language": "sr-Cyrl-RS", "text": {"status": "generated", "div": "Pozitivan"}, "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", } ] } ], "code": { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips", "code": "35275-7", "display": "Morbille virus IgG", }, { "system": "http://snomed.info/sct", "code": "52584002", "display": "Morbilli virus", }, { "system": "http://snomed.info/sct", "code": "29246005", "display": "IgG", }, ] }, "subject": { "reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7" }, "effectiveDateTime": "2021-08-26T07:09:00EUROPE/BELGRADE", "method": { "coding": [ { "system": "http://hl7.org/fhir/ValueSet/observation-methods", "code": "76978006", "display": "ELISA", } ] }, "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "52101004", "display": "Prisutno", } ] }, "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "POS", "display": "Pozitivan", } ] } ], }, { "resourceType": "http://hl7.org/fhir/resource-types#Observation", "id": "ca708651-e8e7-3513-e053-5a18000ae79b", "language": "sr-Cyrl-RS", "text": {"status": "generated", "div": "Negativan"}, "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", } ] } ], "code": { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips", "code": "35276-5", "display": "Morbille virus IgM", }, { "system": "http://snomed.info/sct", "code": "52584002", "display": "Morbilli virus", }, { "system": "http://snomed.info/sct", "code": "74889000", "display": "IgM", }, ] }, "subject": { "reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7" }, "effectiveDateTime": "2021-08-26T07:09:00EUROPE/BELGRADE", "method": { "coding": [ { "system": "http://hl7.org/fhir/ValueSet/observation-methods", "code": "76978006", "display": "ELISA", } ] }, "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "2667000", "display": "Odsutno", } ] }, "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "NEG", "display": "Negativan", } ] } ], }, { "resourceType": "http://hl7.org/fhir/resource-types#Observation", "id": "ca708651-e8ea-3513-e053-5a18000ae79b", "language": "sr-Cyrl-RS", "text": {"status": "generated", "div": "Pozitivan"}, "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", } ] } ], "code": { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips", "code": "29660-8", "display": "Humani Parvo virus B19 IgG", }, { "system": "http://snomed.info/sct", "code": "63603005", "display": "Humani Parvo virus B19", }, { "system": "http://snomed.info/sct", "code": "29246005", "display": "IgG", }, ] }, "subject": { "reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7" }, "effectiveDateTime": "2021-08-26T07:09:00EUROPE/BELGRADE", "method": { "coding": [ { "system": "http://hl7.org/fhir/ValueSet/observation-methods", "code": "76978006", "display": "ELISA", } ] }, "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "52101004", "display": "Prisutno", } ] }, "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "POS", "display": "Pozitivan", } ] } ], }, { "resourceType": "http://hl7.org/fhir/resource-types#Observation", "id": "ca708651-e8e9-3513-e053-5a18000ae79b", "language": "sr-Cyrl-RS", "text": {"status": "generated", "div": "Negativan"}, "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", } ] } ], "code": { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips", "code": "40658-7", "display": "Humani Parvo virus B19 IgM", }, { "system": "http://snomed.info/sct", "code": "63603005", "display": "Humani Parvo virus B19", }, { "system": "http://snomed.info/sct", "code": "74889000", "display": "IgM", }, ] }, "subject": { "reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7" }, "effectiveDateTime": "2021-08-26T07:09:00EUROPE/BELGRADE", "method": { "coding": [ { "system": "http://hl7.org/fhir/ValueSet/observation-methods", "code": "76978006", "display": "ELISA", } ] }, "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "2667000", "display": "Odsutno", } ] }, "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "NEG", "display": "Negativan", } ] } ], }, { "resourceType": "http://hl7.org/fhir/resource-types#Observation", "id": "ca708651-e8ed-3513-e053-5a18000ae79b", "language": "sr-Cyrl-RS", "text": {"status": "generated", "div": "Negativan"}, "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", } ] } ], "code": { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips", "code": "40729-6", "display": "Herpes Simplex virus (HSV) IgM", }, { "system": "http://snomed.info/sct", "code": "19965007", "display": "Herpes Simplex virus (HSV)", }, { "system": "http://snomed.info/sct", "code": "74889000", "display": "IgM", }, ] }, "subject": { "reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7" }, "effectiveDateTime": "2021-08-26T07:09:00EUROPE/BELGRADE", "method": { "coding": [ { "system": "http://hl7.org/fhir/ValueSet/observation-methods", "code": "76978006", "display": "ELISA", } ] }, "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "2667000", "display": "Odsutno", } ] }, "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "NEG", "display": "Negativan", } ] } ], }, { "resourceType": "http://hl7.org/fhir/resource-types#Observation", "id": "ca708651-e8ec-3513-e053-5a18000ae79b", "language": "sr-Cyrl-RS", "text": {"status": "generated", "div": "Pozitivan"}, "status": "final", "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory", } ] } ], "code": { "coding": [ { "system": "http://hl7.org/fhir/uv/ips/ValueSet/results-laboratory-observations-uv-ips", "code": "24114-1", "display": "Epstein Barr virus (EBV) IgG", }, { "system": "http://snomed.info/sct", "code": "40168006", "display": "Epstein Barr virus (EBV)", }, { "system": "http://snomed.info/sct", "code": "29246005", "display": "IgG", }, ] }, "subject": { "reference": "Patient/ca66572a-0a1b-0d53-e053-5a18000ad0b7" }, "effectiveDateTime": "2021-08-26T07:09:00EUROPE/BELGRADE", "method": { "coding": [ { "system": "http://hl7.org/fhir/ValueSet/observation-methods", "code": "76978006", "display": "ELISA", } ] }, "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "52101004", "display": "Prisutno", } ] }, "interpretation": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", "code": "POS", "display": "Pozitivan", } ] } ], }, ], "Organization": [ { "resourceType": "http://hl7.org/fhir/resource-types#Organization", "id": "ca661f4d-ffc6-6111-e053-5a18000a3dea", "language": "sr-Cyrl-RS", "active": True, "type": ["team"], "name": "Национална лабораторија за полиомијелитис и ентеровирусе", "partOf": { "reference": "Organization/ca661f4d-ffc5-6111-e053-5a18000a3dea", "type": "Organization", }, "address": [{"type": "both", "country": "RS"}], }, { "resourceType": "http://hl7.org/fhir/resource-types#Organization", "id": "ca661f4d-ffc5-6111-e053-5a18000a3dea", "language": "sr-Cyrl-RS", "active": True, "type": ["team"], "name": "Одсек за серодијагностику и молекуларну дијагностику", "partOf": { "reference": "Organization/ca661c1e-cab1-611d-e053-5a18000af938", "type": "Organization", }, "address": [{"type": "both", "country": "RS"}], }, { "resourceType": "http://hl7.org/fhir/resource-types#Organization", "id": "ca661c1e-cab1-611d-e053-5a18000af938", "language": "sr-Cyrl-RS", "active": True, "type": ["team"], "name": "Служба за лабораторијску дијагностику", "partOf": { "reference": "Organization/ca65fdc3-3516-4830-e053-5a18000af96e", "type": "Organization", }, "address": [{"type": "both", "country": "RS"}], }, { "resourceType": "http://hl7.org/fhir/resource-types#Organization", "id": "ca65fdc3-3516-4830-e053-5a18000af96e", "language": "sr-Cyrl-RS", "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "XX", } ], "text": "Matični broj", }, "system": "http://www.apr.gov.rs/регистри/здравствене-установе", "value": "17078712", }, { "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "TAX", } ], "text": "PIB", }, "system": "http://www.purs.gov.rs/pib.html", "value": "101739057", }, ], "active": True, "type": ["prov"], "name": 'ИНСТИТУТ ЗА ВИРУСОЛОГИЈУ, ВАКЦИНЕ И СЕРУМЕ "ТОРЛАК"', "telecom": [ {"system": "email", "value": "office@torlak.rs", "rank": 1}, {"system": "phone", "value": "+381113953700", "rank": 3}, ], "address": [ { "type": "both", "line": ["Војводе Степе 458"], "city": "Београд", "country": "RS", } ], }, ], }, "name": "VDEL Lab Report", } def get_test_data(): vc_record_list = [] for cred in CRED_LIST: vc_record_list.append( create_vcrecord( cred, [ "https://www.w3.org/2018/credentials#VerifiableCredential", "https://w3id.org/citizenship#PermanentResidentCard", ], ) ) pd_json_list = [ (pres_exch_multiple_srs_not_met, 0), (pres_exch_multiple_srs_met_one_of_filter_invalid, 0), (pres_exch_multiple_srs_met_one_of_valid, 4), (pres_exch_datetime_minimum_met, 6), (pres_exch_datetime_maximum_met, 6), (pres_exch_nested_srs_a, 4), (pres_exch_nested_srs_b, 5), (pres_exch_nested_srs_c, 2), ] pd_list = [] for pd in pd_json_list: pd_list.append( ( PresentationDefinition.deserialize(json.loads(pd[0])), pd[1], ) ) return (vc_record_list, pd_list)
38.211632
1,437
0.465776
5,852
94,612
7.486329
0.124231
0.013559
0.018078
0.016617
0.797489
0.773157
0.762588
0.75307
0.740493
0.733212
0
0.104182
0.398692
94,612
2,475
1,438
38.227071
0.665887
0.003287
0
0.5986
0
0.007822
0.565691
0.17894
0
1
0
0
0.008234
1
0.000823
false
0.004529
0.002058
0
0.003705
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
7
436ecb8f867b0ff513f9b14a4fea77db468d2d00
166
py
Python
tests/parse/test_parse_ped.py
northwestwitch/mutacc
1999bb9d75a78a543d2cec4df601387c89827a85
[ "MIT" ]
1
2021-12-16T19:29:23.000Z
2021-12-16T19:29:23.000Z
tests/parse/test_parse_ped.py
northwestwitch/mutacc
1999bb9d75a78a543d2cec4df601387c89827a85
[ "MIT" ]
59
2018-11-27T16:19:28.000Z
2021-12-01T16:42:31.000Z
tests/parse/test_parse_ped.py
adrosenbaum/mutacc
1999bb9d75a78a543d2cec4df601387c89827a85
[ "MIT" ]
1
2021-12-01T07:15:10.000Z
2021-12-01T07:15:10.000Z
import pytest from mutacc.parse.parse_ped import parse_ped def test_parse_ped(ped_path): family = parse_ped(ped_path) assert isinstance(family, dict)
16.6
44
0.753012
25
166
4.72
0.52
0.271186
0.186441
0.254237
0
0
0
0
0
0
0
0
0.180723
166
9
45
18.444444
0.867647
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.6
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
437f6ebde49e2cea32dd662c367323d082aecbbb
110,581
py
Python
backend/theGame_db.py
slamon34/Real_Engine
2c1f66508a8aab89ef32e5633e33e561eb96748b
[ "MIT" ]
null
null
null
backend/theGame_db.py
slamon34/Real_Engine
2c1f66508a8aab89ef32e5633e33e561eb96748b
[ "MIT" ]
3
2018-06-02T01:36:51.000Z
2019-03-27T03:24:29.000Z
backend/theGame_db.py
slamon34/Real_Engine
2c1f66508a8aab89ef32e5633e33e561eb96748b
[ "MIT" ]
1
2018-06-01T15:07:51.000Z
2018-06-01T15:07:51.000Z
# Copyright (c) 2017 Ned Hoy <nedhoy@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. from flask_app import model from flask_app import schema from flask_app.data_access import Database from flask_app.actions import nodes from flask_app.actions.nodes import ( CompoundStatement, IfElseStatement, PrintStatement, AssignmentStatement, SetAttrStatement, OutputStatement, BinaryOp, BooleanLiteral, IntegerLiteral, StringLiteral, GetAttrExpression, VariableNameExpression, ) from flask_app.actions import unparser def add_devices(db): headset_model = model.DeviceModel( name="headset model 1", type=model.DeviceTypes.Headset, part_name="Plantronics Voyager 5200", description="headset description 1", ) scanner_model = model.DeviceModel( name="scanner model 1", type=model.DeviceTypes.Scanner, part_name="Scanner 5200", description="scanner description 1", ) device_models = [ headset_model, scanner_model, ] for device_model in device_models: db.add_model(device_model) scanner_device_1 = model.PhysicalDevice( id="1", model_id=scanner_model.id, ip="10.0.0.1", purpose="rfid reader", ) scanner_device_2 = model.PhysicalDevice( id="2", model_id=scanner_model.id, ip="10.0.0.2", purpose="rfid reader", ) emics_device = model.PhysicalDevice( id="3", model_id=headset_model.id, ip="10.0.0.3", purpose="emic text to speech", ) devices = [ scanner_device_1, scanner_device_2, emics_device, ] for device in devices: db.add_device(device) emics_output = model.DeviceOutput( device_id=emics_device.id, type=model.OutputTypes.Text2Speech, name="emics", description="output description 1", ) outputs = [ emics_output ] for output in outputs: db.add_output(output) rfid_input = model.DeviceInput( device_id=scanner_device_1.id, type=model.InputTypes.Rfid, name="rfid", description="input description 1", ) inputs = [ rfid_input, ] for input in inputs: db.add_input(input) speaker_virtual_output = model.VirtualOutput( name="Speaker", device_output=emics_output ) db.add_virtual_output(speaker_virtual_output) wizard_virtual_output = model.VirtualOutput( name="Wizard", device_output=emics_output ) db.add_virtual_output(wizard_virtual_output) central_virtual_output = model.VirtualOutput( name="Central", device_output=emics_output ) db.add_virtual_output(central_virtual_output) ship_virtual_output = model.VirtualOutput( name="Ship", device_output=emics_output ) db.add_virtual_output(ship_virtual_output) cathedral_virtual_output = model.VirtualOutput( name="Cathedral", device_output=emics_output ) db.add_virtual_output(cathedral_virtual_output) castle_virtual_output = model.VirtualOutput( name="Castle", device_output=emics_output ) db.add_virtual_output(castle_virtual_output) train_virtual_output = model.VirtualOutput( name="Train", device_output=emics_output ) db.add_virtual_output(train_virtual_output) return devices def add_scenes(db): scenes = [ model.Scene(name="Scene 0", description="description"), model.Scene(name="Scene 1", description="description"), model.Scene(name="Scene 2", description="description"), ] for scene in scenes: db.add_scene(scene) return scenes def add_entities(db): player_entity = model.VirtualEntity(title="Player", description="player") card_entity = model.VirtualEntity(title="Card", description="card") greeting_tag_entity = model.VirtualEntity(title="GreetingTag", description="scan to hear pitch") wand_entity = model.VirtualEntity(title="Wand", description="For casting spells") trainer_wand_entity = model.VirtualEntity(title="TrainingWand", description="For finding cast points") entities = [ player_entity, card_entity, greeting_tag_entity, wand_entity, trainer_wand_entity, ] for entity in entities: db.add_virtual_entity(entity) attributes = { player_entity: [ schema.Property("name", schema.String()), schema.Property("counter", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("card", schema.Numeric(type=schema.NumericType.Integer)), ], card_entity: [ schema.Property("value", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("name", schema.String()), ], greeting_tag_entity: [ ], wand_entity: [ schema.Property("previousCast", schema.String()), schema.Property("temp1", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("temp2", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("temp3", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("ill1", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("ill2", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("ill3", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("ench1", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("ench2", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("ench3", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("charged", schema.Numeric(type=schema.NumericType.Integer)), ], trainer_wand_entity: [ schema.Property("castle", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("cathedral", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("train", schema.Numeric(type=schema.NumericType.Integer)), schema.Property("ship", schema.Numeric(type=schema.NumericType.Integer)), ], } for entity, attributes in attributes.items(): for attribute in attributes: db.add_virtual_entity_property(entity, attribute) player1_instance = model.InstanceEntity(virtual_entity=player_entity, tag="RFID#player1") db.add_instance_entity(player1_instance) db.set_instance_entity_property(player1_instance, "name", "Player 1") db.set_instance_entity_property(player1_instance, "counter", 0) db.set_instance_entity_property(player1_instance, "card", -1) player2_instance = model.InstanceEntity(virtual_entity=player_entity, tag="RFID#player2") db.add_instance_entity(player2_instance) db.set_instance_entity_property(player2_instance, "name", "Player 2") db.set_instance_entity_property(player2_instance, "counter", 0) db.set_instance_entity_property(player2_instance, "card", -1) ROCK = 0 PAPER = 1 SCISSORS = 2 names = { ROCK: "rock", PAPER: "paper", SCISSORS: "scissors", } # TODO: add the real RFID tags here! rfid_tags = { (ROCK, 1): "4C00B2E29A86", (ROCK, 2): "82003C7375B8", (PAPER, 1): "4C00B3F8C8CF", (PAPER, 2): "82003C9D290A", (SCISSORS, 1): "7C0019CBA10F", (SCISSORS, 2): "7C0056A3B039", } for card_type in [ROCK, PAPER, SCISSORS]: card_name = names[card_type] for i in range(1, 3): tag = rfid_tags[card_type, i] card_instance = model.InstanceEntity(virtual_entity=card_entity, tag=tag) db.add_instance_entity(card_instance) db.set_instance_entity_property(card_instance, "value", card_type) db.set_instance_entity_property(card_instance, "name", card_name) greeting_tag_instance = model.InstanceEntity(virtual_entity=greeting_tag_entity, tag="RFID#greeting_tag") # TODO: add the real greeting tag ID! db.add_instance_entity(greeting_tag_instance) wands = [ "tag1", "tag2", "tag3", "tag4", "tag5", "tag6", "tag7", "tag8", "tag9", "tag10", "tag11", "tag12", ] for nfc in wands: wand_instance = model.InstanceEntity(virtual_entity=wand_entity,tag=nfc) db.add_instance_entity(wand_instance) training_wands = [ "nfc1", "nfc2", "nfc3", "nfc4", "nfc5", "nfc6", "nfc7", "nfc8", "nfc9", "nfc10", "nfc11", "nfc12", ] for nfc in training_wands: training_wand_instance = model.InstanceEntity(virtual_entity=trainer_wand_entity,tag=nfc) db.add_instance_entity(training_wand_instance) return entities def add_actions(db): speaker_virtual_output_id = 1 # FIXME: don't hardcode this wand_cast_central_ast = CompoundStatement(statements=[ # if charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Wand is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp1")), # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell")), OutputStatement( output=3, resource=StringLiteral("Playaudio temp1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp2")), OutputStatement( output=3, resource=StringLiteral("Playaudio temp2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp3")), OutputStatement( output=3, resource=StringLiteral("Playaudio temp3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="il1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill1")), OutputStatement( output=3, resource=StringLiteral("Playaudio ill1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill2")), OutputStatement( output=3, resource=StringLiteral("Playaudio ill2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill3")), OutputStatement( output=3, resource=StringLiteral("Playaudio ill3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench1")), OutputStatement( output=3, resource=StringLiteral("Playaudio ench1.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench2")), OutputStatement( output=3, resource=StringLiteral("Playaudio ench2.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench3")), OutputStatement( output=3, resource=StringLiteral("Playaudio ench3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ench3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench3")), ]), ), # Take away charge SetAttrStatement( obj="__INPUT__", name="charged", rvalue=IntegerLiteral(0), ), ]), # -> Wand is empty else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is not charged")), OutputStatement( output=3, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) wand_cast_ship_ast = CompoundStatement(statements=[ # if charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Wand is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp1")), # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell")), OutputStatement( output=4, resource=StringLiteral("Playaudio temp1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp2")), OutputStatement( output=4, resource=StringLiteral("Playaudio temp2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp3")), OutputStatement( output=4, resource=StringLiteral("Playaudio temp3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="il1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill1")), OutputStatement( output=4, resource=StringLiteral("Playaudio ill1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill2")), OutputStatement( output=4, resource=StringLiteral("Playaudio ill2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill3")), OutputStatement( output=4, resource=StringLiteral("Playaudio ill3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench1")), OutputStatement( output=4, resource=StringLiteral("Playaudio ench1.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench2")), OutputStatement( output=4, resource=StringLiteral("Playaudio ench2.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench3")), OutputStatement( output=4, resource=StringLiteral("Playaudio ench3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ench3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench3")), ]), ), # Take away charge SetAttrStatement( obj="__INPUT__", name="charged", rvalue=IntegerLiteral(0), ), ]), # -> Wand is empty else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is not charged")), OutputStatement( output=4, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) wand_cast_castle_ast = CompoundStatement(statements=[ # if charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Wand is charged play spell if_body=CompoundStatement(statements=[ # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell")), OutputStatement( output=6, resource=StringLiteral("Playaudio temp1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp2")), OutputStatement( output=6, resource=StringLiteral("Playaudio temp2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp3")), OutputStatement( output=6, resource=StringLiteral("Playaudio temp3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="il1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill1")), OutputStatement( output=6, resource=StringLiteral("Playaudio ill1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill2")), OutputStatement( output=6, resource=StringLiteral("Playaudio ill2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill3")), OutputStatement( output=6, resource=StringLiteral("Playaudio ill3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench1")), OutputStatement( output=6, resource=StringLiteral("Playaudio ench1.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench2")), OutputStatement( output=6, resource=StringLiteral("Playaudio ench2.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench3")), OutputStatement( output=6, resource=StringLiteral("Playaudio ench3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ench3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench3")), ]), ), # Take away charge SetAttrStatement( obj="__INPUT__", name="charged", rvalue=IntegerLiteral(0), ), ]), # -> Wand is empty else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is not charged")), OutputStatement( output=6, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) wand_cast_train_ast = CompoundStatement(statements=[ # if charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Wand is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp1")), # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell")), OutputStatement( output=7, resource=StringLiteral("Playaudio temp1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp2")), OutputStatement( output=7, resource=StringLiteral("Playaudio temp2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp3")), OutputStatement( output=7, resource=StringLiteral("Playaudio temp3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="il1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill1")), OutputStatement( output=7, resource=StringLiteral("Playaudio ill1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill2")), OutputStatement( output=7, resource=StringLiteral("Playaudio ill2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill3")), OutputStatement( output=7, resource=StringLiteral("Playaudio ill3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench1")), OutputStatement( output=7, resource=StringLiteral("Playaudio ench1.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench2")), OutputStatement( output=7, resource=StringLiteral("Playaudio ench2.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench3")), OutputStatement( output=7, resource=StringLiteral("Playaudio ench3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ench3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench3")), ]), ), # Take away charge SetAttrStatement( obj="__INPUT__", name="charged", rvalue=IntegerLiteral(0), ), ]), # -> Wand is empty else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is not charged")), OutputStatement( output=7, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) wand_cast_cathedral_ast = CompoundStatement(statements=[ # if charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Wand is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp1")), # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell")), OutputStatement( output=5, resource=StringLiteral("Playaudio temp1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp2")), OutputStatement( output=5, resource=StringLiteral("Playaudio temp2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell temp3")), OutputStatement( output=5, resource=StringLiteral("Playaudio temp3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="temp3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast temporal3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not temp3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="il1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill1")), OutputStatement( output=5, resource=StringLiteral("Playaudio ill1.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill2")), OutputStatement( output=5, resource=StringLiteral("Playaudio ill2.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ill3")), OutputStatement( output=5, resource=StringLiteral("Playaudio ill3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ill3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast illusion3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ill3")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench1")), OutputStatement( output=5, resource=StringLiteral("Playaudio ench1.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench1", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment1"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench1")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench2")), OutputStatement( output=5, resource=StringLiteral("Playaudio ench2.wav"), ), SetAttrStatement( obj="__INPUT__", name="ench2", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment2"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench2")), ]), ), IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench3", ), operator=nodes.Operator.EQ, right=IntegerLiteral(2), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Casting Spell ench3")), OutputStatement( output=5, resource=StringLiteral("Playaudio ench3.mp3"), ), SetAttrStatement( obj="__INPUT__", name="ench3", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="previousCast", rvalue=StringLiteral("Previously cast enchantment3"), ), ]), # -> Not this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ench3")), ]), ), # Take away charge SetAttrStatement( obj="__INPUT__", name="charged", rvalue=IntegerLiteral(0), ), ]), # -> Wand is empty else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is not charged")), OutputStatement( output=5, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_temp1 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell temp1")), # output sound and set spell = 2 PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="temp1", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=3, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_temp2 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged check predecessors if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell temp2")), # output sound and set spell = 2 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="temp2", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Not ready for this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ready for this spell")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_temp3 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged check predecessors if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell temp3")), # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="temp2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="temp3", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Not ready for this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ready for this spell")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_ill1 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell ill1")), # output sound and set spell = 2 PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="ill1", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_ill2 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged check predecessors if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell ill2")), # output sound and set spell = 2 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="ill2", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Not ready for this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ready for this spell")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_ill3 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged check predecessors if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell ill3")), # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ill2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="ill3", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Not ready for this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ready for this spell")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_ench1 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell ench1")), # output sound and set spell = 2 PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="ench1", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_ench2 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged check predecessors if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell ench2")), # output sound and set spell = 2 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench1", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="ench2", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Not ready for this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ready for this spell")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) charge_wand_ench3 = CompoundStatement(statements=[ # if not already charged IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="charged", ), operator=nodes.Operator.EQ, right=IntegerLiteral(0), ), # -> Wand is not charged check predecessors if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Spell ench3")), # if spell = 2, output sound and set spell 1 IfElseStatement( condition=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ench2", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), # -> Spell is charged play spell if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Charging Wand")), OutputStatement( output=2, resource=GetAttrExpression( obj="__INPUT__", name="previousCast", ), ), SetAttrStatement( obj="__INPUT__", name="ench3", rvalue=IntegerLiteral(2), ), OutputStatement( output=3, resource=StringLiteral("Playaudio charging.mp3"), ), ]), # -> Not ready for this spell else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Not ready for this spell")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]), # -> Wand is already charged else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Wand is already charged")), OutputStatement( output=2, resource=StringLiteral("Playaudio failed.wav"), ), ]), ), ]) found_castle = CompoundStatement(statements=[ SetAttrStatement( obj="__INPUT__", name="castle", rvalue=IntegerLiteral(1), ), OutputStatement( output=6, resource=StringLiteral("Playaudio found.mp3"), ), ]) found_ship = CompoundStatement(statements=[ SetAttrStatement( obj="__INPUT__", name="ship", rvalue=IntegerLiteral(1), ), OutputStatement( output=4, resource=StringLiteral("Playaudio found.mp3"), ), ]) found_cathedral = CompoundStatement(statements=[ SetAttrStatement( obj="__INPUT__", name="cathedral", rvalue=IntegerLiteral(1), ), OutputStatement( output=5, resource=StringLiteral("Playaudio found.mp3"), ), ]) found_train = CompoundStatement(statements=[ SetAttrStatement( obj="__INPUT__", name="train", rvalue=IntegerLiteral(1), ), OutputStatement( output=7, resource=StringLiteral("Playaudio found.mp3"), ), ]) found_central = CompoundStatement(statements=[ OutputStatement( output=3, resource=StringLiteral("Playaudio found.mp3"), ), ]) check_training_complete = CompoundStatement(statements=[ IfElseStatement( # if all ley lines have been found, play training complete condition=BinaryOp( left=BinaryOp( left=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="castle", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), operator=nodes.Operator.LOGICAL_AND, right=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="ship", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), ), operator=nodes.Operator.LOGICAL_AND, right=BinaryOp( left=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="train", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), operator=nodes.Operator.LOGICAL_AND, right=BinaryOp( left=GetAttrExpression( obj="__INPUT__", name="cathedral", ), operator=nodes.Operator.EQ, right=IntegerLiteral(1), ), ), ), if_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Training complete")), OutputStatement( output=2, resource=StringLiteral("Training complete."), ), ]), else_body=CompoundStatement(statements=[ PrintStatement(StringLiteral("Training has not been complete.")), OutputStatement( output=2, resource=StringLiteral("Training has not been completed."), ), ]), ), ]) reset_training = CompoundStatement(statements=[ SetAttrStatement( obj="__INPUT__", name="train", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="castle", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="cathedral", rvalue=IntegerLiteral(1), ), SetAttrStatement( obj="__INPUT__", name="ship", rvalue=IntegerLiteral(1), ), ]) wand_cast_central_str = unparser.to_json(wand_cast_central_ast) wand_cast_ship_str = unparser.to_json(wand_cast_ship_ast) wand_cast_cathedral_str = unparser.to_json(wand_cast_cathedral_ast) wand_cast_castle_str = unparser.to_json(wand_cast_castle_ast) wand_cast_train_str = unparser.to_json(wand_cast_train_ast) charge_temp1_str = unparser.to_json(charge_wand_temp1) charge_temp2_str = unparser.to_json(charge_wand_temp2) charge_temp3_str = unparser.to_json(charge_wand_temp3) charge_ill1_str = unparser.to_json(charge_wand_ill1) charge_ill2_str = unparser.to_json(charge_wand_ill2) charge_ill3_str = unparser.to_json(charge_wand_ill3) charge_ench1_str = unparser.to_json(charge_wand_ench1) charge_ench2_str = unparser.to_json(charge_wand_ench2) charge_ench3_str = unparser.to_json(charge_wand_ench3) found_ship_str = unparser.to_json(found_ship) found_cathedral_str = unparser.to_json(found_cathedral) found_train_str = unparser.to_json(found_train) found_castle_str = unparser.to_json(found_castle) found_central_str = unparser.to_json(found_central) check_training_complete_str = unparser.to_json(check_training_complete) reset_training_str = unparser.to_json(reset_training) wand_entity = db.get_virtual_entity_by_name(name="Wand") training_wand_entity = db.get_virtual_entity_by_name(name="TrainingWand") actions = [ model.Action(name="Cast Spell - Central", ast=wand_cast_central_str, wants_entity=wand_entity), model.Action(name="Cast Spell - Ship", ast=wand_cast_ship_str, wants_entity=wand_entity), model.Action(name="Cast Spell - Cathedral", ast=wand_cast_cathedral_str, wants_entity=wand_entity), model.Action(name="Cast Spell - Castle", ast=wand_cast_castle_str, wants_entity=wand_entity), model.Action(name="Cast Spell - Train", ast=wand_cast_train_str, wants_entity=wand_entity), model.Action(name="Charge temp1", ast=charge_temp1_str, wants_entity=wand_entity), model.Action(name="Charge temp2", ast=charge_temp2_str, wants_entity=wand_entity), model.Action(name="Charge temp3", ast=charge_temp3_str, wants_entity=wand_entity), model.Action(name="Charge ill1", ast=charge_ill1_str, wants_entity=wand_entity), model.Action(name="Charge ill2", ast=charge_ill2_str, wants_entity=wand_entity), model.Action(name="Charge ill3", ast=charge_ill3_str, wants_entity=wand_entity), model.Action(name="Charge ench1", ast=charge_ench1_str, wants_entity=wand_entity), model.Action(name="Charge ench2", ast=charge_ench2_str, wants_entity=wand_entity), model.Action(name="Charge ench3", ast=charge_ench3_str, wants_entity=wand_entity), model.Action(name="Check Training", ast=check_training_complete_str, wants_entity=training_wand_entity), model.Action(name="Found Ship", ast=found_ship_str, wants_entity=training_wand_entity), model.Action(name="Found Castle", ast=found_castle_str, wants_entity=training_wand_entity), model.Action(name="Found Train", ast=found_train_str, wants_entity=training_wand_entity), model.Action(name="Found Cathedral", ast=found_cathedral_str, wants_entity=training_wand_entity), model.Action(name="Found Central", ast=found_central_str, wants_entity=training_wand_entity), model.Action(name="Reset Training", ast=reset_training_str, wants_entity=training_wand_entity), ] for action in actions: db.add_action(action) return actions def add_events(db, *, actions, devices, scenes): events = [ model.Event( name="Central Event", scene_id=scenes[0].id, type=model.EventTypes.scan, device_id=devices[0].id, ), model.Event( name="Ship Event", scene_id=scenes[0].id, type=model.EventTypes.scan, device_id=devices[1].id, ), model.Event( name="Cathedral Event", scene_id=scenes[0].id, type=model.EventTypes.scan, device_id=devices[0].id, ), model.Event( name="Castle Event", scene_id=scenes[0].id, type=model.EventTypes.scan, device_id=devices[1].id, ), model.Event( name="Train Event", scene_id=scenes[0].id, type=model.EventTypes.scan, device_id=devices[0].id, ), ] for event in events: db.add_event(event) event_actions_list = [ # Central action model.EventActions(event_id=events[0].id, action_id=actions[0].id), model.EventActions(event_id=events[0].id, action_id=actions[19].id), # Ship action model.EventActions(event_id=events[1].id, action_id=actions[1].id), model.EventActions(event_id=events[1].id, action_id=actions[15].id), # Cathedral action model.EventActions(event_id=events[2].id, action_id=actions[2].id), model.EventActions(event_id=events[2].id, action_id=actions[18].id), # Castle action model.EventActions(event_id=events[3].id, action_id=actions[3].id), model.EventActions(event_id=events[3].id, action_id=actions[16].id), # Train action model.EventActions(event_id=events[4].id, action_id=actions[4].id), model.EventActions(event_id=events[4].id, action_id=actions[17].id), ] for event_actions in event_actions_list: db.add_event_action(event_actions) return events if __name__ == '__main__': db = Database() db.wipe_database() db.create_database() devices = add_devices(db) scenes = add_scenes(db) entities = add_entities(db) actions = add_actions(db) events = add_events(db, actions=actions, devices=devices, scenes=scenes)
40.06558
147
0.420841
6,806
110,581
6.627388
0.049368
0.033698
0.050548
0.130692
0.880371
0.856117
0.826187
0.811311
0.77411
0.758502
0
0.015028
0.498729
110,581
2,759
148
40.080101
0.798705
0.049981
0
0.855797
0
0
0.086437
0
0
0
0
0.000362
0
1
0.002048
false
0
0.002458
0
0.006555
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
43b1ad3a74365ee525e4fa1d5f3c42f9eb2ef894
14,948
py
Python
rpython/jit/metainterp/test/test_threaded_code.py
prg-titech/pypy
05993f14770824e517c9dd58b762d67a27c2d5bf
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/jit/metainterp/test/test_threaded_code.py
prg-titech/pypy
05993f14770824e517c9dd58b762d67a27c2d5bf
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/jit/metainterp/test/test_threaded_code.py
prg-titech/pypy
05993f14770824e517c9dd58b762d67a27c2d5bf
[ "Apache-2.0", "OpenSSL" ]
null
null
null
import math import sys import py import pytest import weakref from rpython.rlib import rgc from rpython.jit.codewriter.policy import StopAtXPolicy from rpython.jit.metainterp import history from rpython.jit.metainterp.test.support import LLJitMixin, noConst, get_stats from rpython.jit.metainterp.warmspot import get_stats from rpython.jit.metainterp.pyjitpl import MetaInterp from rpython.rlib import rerased from rpython.rlib.jit import (JitDriver, we_are_jitted, hint, dont_look_inside, loop_invariant, elidable, promote, jit_debug, assert_green, AssertGreenFailed, unroll_safe, current_trace_length, look_inside_iff, isconstant, isvirtual, set_param, record_exact_class, not_in_trace) from rpython.rlib.longlong2float import float2longlong, longlong2float from rpython.rlib.rarithmetic import ovfcheck, is_valid_int, int_force_ge_zero from rpython.rtyper.lltypesystem import lltype, rffi from rpython.jit.tl.threadedcode.traverse_stack import TStack, t_push, t_empty, t_is_empty from rpython.jit.tl.threadedcode.frame import Frame def compile_threaded_code(): pass class BasicTests: @pytest.mark.skip(reason="currently the case that red variables are" "number cannot work correctly") def test_minilang_num_1(self): @dont_look_inside def lt(lhs, rhs): if lhs < rhs: return 1 else: return 0 @dont_look_inside def add(x, y): return x + y @dont_look_inside def sub(x, y): return x - y @dont_look_inside def is_true(x): return x > 0 @dont_look_inside def emit_jump(x, y, z): return x @dont_look_inside def emit_ret(x, y): return x ADD = 0 SUB = 1 LT = 2 JUMP = 3 JUMP_IF = 4 EXIT = 5 NOP = -100 inst_set = { 0: "ADD", 1: "SUB", 2: "LT", 3: "JUMP", 4: "JUMP_IF", 5: "EXIT", -100: "NOP" } def opcode_to_string(pc, bytecode, tstack): op = bytecode[pc] name = inst_set.get(op) return "%s: %s, tstack top: %s" % (pc, name, tstack.pc) myjitdriver = JitDriver(greens=['pc', 'bytecode', 'tstack'], reds=['x',], get_printable_location=opcode_to_string, threaded_code_gen=True) def interp(x): tstack = t_empty() pc = 0 # bytecode = [NOP, JUMP_IF, 5, JUMP, 8, SUB, JUMP, 1, EXIT] bytecode = [NOP, SUB, JUMP_IF, 1, EXIT] while True: myjitdriver.jit_merge_point(pc=pc, bytecode=bytecode, tstack=tstack, x=x) op = bytecode[pc] pc += 1 if op == ADD: x = add(x, 1) elif op == SUB: x = sub(x, 1) elif op == JUMP: t = int(bytecode[pc]) if we_are_jitted(): if t_is_empty(tstack): pc = t else: pc, tstack = tstack.t_pop() pc = emit_jump(pc, t, None) else: if t < pc: myjitdriver.can_enter_jit(pc=t, bytecode=bytecode, tstack=tstack, x=x) pc = t elif op == JUMP_IF: t = int(bytecode[pc]) if is_true(x): if we_are_jitted(): pc += 1 if not t < pc: tstack = t_push(pc, tstack) pc = emit_jump(pc, t, None) else: if t < pc: myjitdriver.can_enter_jit(pc=t, bytecode=bytecode, tstack=tstack, x=x) pc = t else: if we_are_jitted(): tstack = t_push(t, tstack) pc += 1 elif op == EXIT: if we_are_jitted(): if t_is_empty(tstack): return x else: pc, tstack = tstack.t_pop() pc = emit_ret(pc, x) else: return x interp.oopspec = 'jit.not_in_trace()' res = self.meta_interp(interp, [100]) def test_minilang_stack_1(self): @dont_look_inside def emit_jump(x, y, z): return x @dont_look_inside def emit_ret(x, y): return x ADD = 10; SUB = 11; LT = 12; JUMP = 13; JUMP_IF = 14; EXIT = 15; DUP = 16; CONST = 17 NOP = -100 inst_set = { 10: "ADD", 11: "SUB", 12: "LT", 13: "JUMP", 14: "JUMP_IF", 15: "EXIT", 16: "DUP", 17: "CONST", -100: "NOP" } def opcode_to_string(pc, entry_state, bytecode, tstack): op = bytecode[pc] name = inst_set.get(op) return "%s: %s, tstack top: %s" % (pc, name, tstack.pc) myjitdriver = JitDriver(greens=['pc', 'entry_state', 'bytecode', 'tstack'], reds=['frame'], get_printable_location=opcode_to_string, threaded_code_gen=True) # ideal case def compiled_test(frame): while True: frame.nop() frame.dup() if frame.is_true(): # true branch frame.const_int(1) frame.sub() else: return frame.pop() saved_stack = [0] * Frame.size saved_sp = 0 @not_in_trace def save_state(frame): saved_sp = frame.sp for i in range(Frame.size): saved_stack[i] = frame.stack[i] @not_in_trace def restore_state(frame): for i in range(Frame.size): frame.stack[i] = saved_stack[i] frame.sp = saved_sp def interp(x): tstack = t_empty() pc = 0 bytecode = [ NOP, DUP, CONST, 1, LT, JUMP_IF, 9, JUMP, 14, CONST, 1, SUB, JUMP, 1, EXIT ] frame = Frame(bytecode) frame.push(x) entry_state = pc, tstack while True: myjitdriver.jit_merge_point(pc=pc, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) op = bytecode[pc] pc += 1 if op == CONST: v = int(bytecode[pc]) frame.const_int(v) pc += 1 elif op == DUP: frame.dup() elif op == ADD: frame.add() elif op == SUB: frame.sub() elif op == LT: frame.lt() elif op == JUMP: t = int(bytecode[pc]) if we_are_jitted(): if t_is_empty(tstack): pc = t else: pc, tstack = tstack.t_pop() pc = emit_jump(pc, t, None) else: if t < pc: entry_state = t, tstack save_state(frame) myjitdriver.can_enter_jit(pc=t, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) pc = t elif op == JUMP_IF: t = int(bytecode[pc]) if frame.is_true(): if we_are_jitted(): pc += 1 tstack = t_push(pc, tstack) else: if t < pc: entry_state = t, tstack save_state(frame) myjitdriver.can_enter_jit(pc=t, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) pc = t else: if we_are_jitted(): tstack = t_push(t, tstack) pc += 1 elif op == EXIT: if we_are_jitted(): if t_is_empty(tstack): v = frame.pop() pc = emit_ret(pc, v) pc, tstack = entry_state restore_state(frame) myjitdriver.can_enter_jit(pc=pc, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) else: pc, tstack = tstack.t_pop() v = frame.pop() pc = emit_ret(pc, v) else: return frame.pop() interp.oopspec = 'jit.not_in_trace()' res = self.meta_interp(interp, [100]) def test_minilang_stack_2(self): @dont_look_inside def emit_jump(x, y, z): return x @dont_look_inside def emit_ret(x, y): return x ADD = 10; SUB = 11; LT = 12; JUMP = 13; JUMP_IF = 14; EXIT = 15 DUP = 16; CONST = 17; NOP = -100 inst_set = { 10: "ADD", 11: "SUB", 12: "LT", 13: "JUMP", 14: "JUMP_IF", 15: "EXIT", 16: "DUP", 17: "CONST", -100: "NOP" } def opcode_to_string(pc, entry_state, bytecode, tstack): op = bytecode[pc] name = inst_set.get(op) return "%s: %s, tstack top: %s" % (pc, name, tstack.pc) myjitdriver = JitDriver(greens=['pc', 'entry_state', 'bytecode', 'tstack'], reds=['frame'], get_printable_location=opcode_to_string, threaded_code_gen=True) saved_stack = [0] * Frame.size saved_sp = 0 @not_in_trace def save_state(frame): saved_sp = frame.sp for i in range(Frame.size): saved_stack[i] = frame.stack[i] @not_in_trace def restore_state(frame): for i in range(Frame.size): frame.stack[i] = saved_stack[i] frame.sp = saved_sp def interp(x): tstack = t_empty() pc = 0 bytecode = [ DUP, CONST, 0, LT, JUMP_IF, 8, JUMP, 13, CONST, 1, SUB, JUMP, 0, CONST, 1000, SUB, EXIT ] frame = Frame(bytecode) frame.push(x) entry_state = pc, tstack while True: myjitdriver.jit_merge_point(pc=pc, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) op = bytecode[pc] pc += 1 if op == CONST: v = int(bytecode[pc]) frame.const_int(v) pc += 1 elif op == DUP: frame.dup() elif op == ADD: frame.add() elif op == SUB: frame.sub() elif op == LT: frame.lt() elif op == JUMP: t = int(bytecode[pc]) if we_are_jitted(): if t_is_empty(tstack): pc = t else: pc, tstack = tstack.t_pop() pc = emit_jump(pc, t, None) else: if t < pc: entry_state = t, tstack save_state(frame) myjitdriver.can_enter_jit(pc=t, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) pc = t elif op == JUMP_IF: t = int(bytecode[pc]) if frame.is_true(): if we_are_jitted(): pc += 1 tstack = t_push(pc, tstack) else: if t < pc: entry_state = t, tstack save_state(frame) myjitdriver.can_enter_jit(pc=t, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) pc = t else: if we_are_jitted(): tstack = t_push(t, tstack) pc += 1 elif op == EXIT: if we_are_jitted(): if t_is_empty(tstack): v = frame.pop() pc = emit_ret(pc, v) pc, tstack = entry_state restore_state(frame) myjitdriver.can_enter_jit(pc=pc, entry_state=entry_state, bytecode=bytecode, tstack=tstack, frame=frame) else: pc, tstack = tstack.t_pop() v = frame.pop() pc = emit_ret(pc, v) else: return frame.pop() interp.oopspec = 'jit.not_in_trace()' res = self.meta_interp(interp, [100]) class TestLLtype(BasicTests, LLJitMixin): pass
35.675418
122
0.403398
1,474
14,948
3.909769
0.122795
0.048586
0.024813
0.027069
0.762971
0.745792
0.722714
0.715079
0.7038
0.69443
0
0.021048
0.513714
14,948
418
123
35.760766
0.771771
0.005352
0
0.784574
0
0
0.024489
0
0
0
0
0
0.005319
1
0.066489
false
0.005319
0.047872
0.023936
0.170213
0.007979
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
43d1c59009fd5d32266c0e644482f0d9f2c97ec0
2,774
py
Python
tests/test_utils.py
dexios1/cachesql
33354c477b28dc43ec3ece75e0b92858f192b176
[ "MIT" ]
21
2021-01-06T05:25:00.000Z
2021-11-29T10:55:33.000Z
tests/test_utils.py
dexios1/cachesql
33354c477b28dc43ec3ece75e0b92858f192b176
[ "MIT" ]
3
2021-01-05T13:44:53.000Z
2021-01-08T13:22:24.000Z
tests/test_utils.py
dexios1/cachesql
33354c477b28dc43ec3ece75e0b92858f192b176
[ "MIT" ]
3
2021-01-06T05:33:34.000Z
2021-03-12T11:01:36.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from cachesql import utils class TestCache: def test_normalize_query(self): query1 = "select top 3 * from receipts" query2 = "SELECT top 3 * FROM receipts" assert utils.normalize_query(query1) == utils.normalize_query(query2) query1 = """ SELECT TIN, COUNT(SdcReceiptSignature) AS ReceiptCount, SUM(TaxableAmount2) as TaxbleAmount FROM Receipts WHERE SdcDateTime BETWEEN '20180601' AND '20180609' AND ReceiptType='N' GROUP BY TIN """ query2 = """ SELECT TIN, COUNT(SdcReceiptSignature) AS ReceiptCount, SUM(TaxableAmount2) as TaxbleAmount FROM Receipts WHERE SdcDateTime BETWEEN '20180601' AND '20180609' AND ReceiptType='N' GROUP BY TIN """ assert utils.normalize_query(query1) == utils.normalize_query(query2) query1 = "select top 3 * from receipts" query2 = "SELECT top 3 * FROM Receipts" assert utils.normalize_query(query1) != utils.normalize_query( query2 ), "Identifier names (table names and columns) should not be normalized" def test_normalize_query_with_comments(self): query1 = "select top 3 * from receipts -- I have a comment" query2 = "SELECT top 3 * FROM receipts" assert utils.normalize_query(query1) == utils.normalize_query(query2) query1 = """ SELECT TIN, COUNT(SdcReceiptSignature) AS ReceiptCount, SUM(TaxableAmount2) as TaxbleAmount FROM Receipts WHERE SdcDateTime BETWEEN '20180601' AND '20180609' AND ReceiptType='N' GROUP BY TIN """ query2 = """ SELECT -- I have a comment TIN, COUNT(SdcReceiptSignature) AS ReceiptCount, SUM(TaxableAmount2) as TaxbleAmount FROM Receipts WHERE SdcDateTime BETWEEN '20180601' AND '20180609' AND ReceiptType='N' GROUP BY TIN """ assert utils.normalize_query(query1) == utils.normalize_query(query2) def test_normalize_query_with_tabs(self): query1 = """ select top 1 tin, Journal from Receipts """ query2 = """ select top 1 tin, Journal from Receipts """ assert utils.normalize_query(query1) == utils.normalize_query(query2) def test_normalize_query_with_big_query(self): ids = tuple(range(40000)) query = f"select * from table where id in ({ids})" assert utils.normalize_query(query) == query
28.895833
100
0.584715
283
2,774
5.632509
0.240283
0.14931
0.154956
0.109787
0.821205
0.801757
0.801757
0.74655
0.74655
0.74655
0
0.057484
0.335256
2,774
95
101
29.2
0.806941
0.015141
0
0.802632
0
0
0.59304
0.038095
0
0
0
0
0.092105
1
0.052632
false
0
0.013158
0
0.078947
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
43de9f05df11e6aece6cec2a53188a2ae9d475ff
18,245
py
Python
TestCase/ClinicScenario/test_ClinicScenario_part_002.py
cassie01/PumpLibrary
c2a4884a36f4c6c6552fa942143ae5d21c120b41
[ "Apache-2.0" ]
null
null
null
TestCase/ClinicScenario/test_ClinicScenario_part_002.py
cassie01/PumpLibrary
c2a4884a36f4c6c6552fa942143ae5d21c120b41
[ "Apache-2.0" ]
null
null
null
TestCase/ClinicScenario/test_ClinicScenario_part_002.py
cassie01/PumpLibrary
c2a4884a36f4c6c6552fa942143ae5d21c120b41
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf8 -*- """ Part 2 N/A 开启泵并等待自检完成。 LCD屏幕亮起,泵进入停止状态。 选择输注模式为基本模式。 设置成功。 手动灌注和加载管路。 执行排气操作,当排气量达到6.00mL时,排气完成。 打开药物库。 设置成功。 选择药物为NaCl。 设置成功。 设置速率为30mL/h,输液量为30mL。 设置成功。 按开始键开始输注。 泵处于运行状态。 输注完成。 泵端出现输注完成警报。 按停止键停止输注。 警报消除成功,泵处于停止状态。 设置速率为25mlL/ h,输液量为30mL。 设置成功。 按开始键开始输注。 泵处于运行状态。 输注完成。 屏幕出现输注完成警报。 按停止键停止输注。 警报消除成功,泵处于停止状态。 设置药物为红霉素。 设置成功。 设置速率为30mlL/ h,输液量为30mL。 设置成功。 按开始键开始输注。 泵处于运行状态。 输注完成。 屏幕出现输注完成警报。 按停止键停止输注。 警报消除成功,泵处于停止状态。 设置速率为25mlL/ h,输液量为30mL。 设置成功。 按开始键开始输注。 泵处于运行状态。 输注完成。 屏幕出现输注完成警报。 按停止键停止输注。 警报消除成功,泵处于停止状态。 """ from TestCase.check_pump_status import * class TestClinicScenario(unittest.TestCase): def test_ClinicScenario_part_002(self): keep_running = True checkPumpStatus() # 接通输液泵的电源并打开泵。 # 泵处于停止状态。 log.logger.info("This test is started!") system_status = lvp.get_system_status() log.logger.info("The current system status is %s!" % system_status) assert system_status == SystemStatus.EStopStatus # 设置为基本模式。 # 设置成功。 lvp.set_infusion_mode('basic') infusion_mode = lvp.get_infusion_mode() log.logger.info("The current infusion mode is %s!" % infusion_mode) assert infusion_mode == 'basic' # 手动排出管路中的空气。 # 执行排气操作,当排气量达到6.00mL时,排气完成。 lvp.start_bolus() lvp.start_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s before priming!" % system_status) assert system_status == SystemStatus.ERunStatus time.sleep(6 / 1200 * 3600) lvp.stop_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after priming!" % system_status) assert system_status == SystemStatus.EStopStatus # 打开药物库。 # 设置成功。 lvp.set_drug_library_switch_status('On') drug_library_switch = lvp.get_drug_library_switch_status() assert drug_library_switch == 'On' # 选择药物为红霉素。 # 设置成功。 # lvp.set_current_drug() # 泵端未实现 # lvp.get_current_drug() # 泵端未实现 # 调整速度为30mL/h,输液量为30mL。 # 设置成功。 lvp.set_infusion_parameter(30, 0, 30) # 按开始键开始输注。 # 泵处于运行状态。 lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time1 = 0 mark_time = datetime.datetime.now() while keep_running: duration_time = (datetime.datetime.now() - mark_time).seconds if duration_time - alarm_handler_time1 < 30 / 30 * 3600: log.logger.info("The remain time is %s!" % (30 / 30 * 3600 - duration_time)) alarm_mark_time1 = datetime.datetime.now() alarm_id = lvp.get_pump_alarm() if type(alarm_id) == list(): pass else: continue if 22 in alarm_id: log.logger.info("The occurred alarm is %s!" % alarmMatrix()[22]) lvp.stop_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s!" % system_status) assert system_status == SystemStatus.EStopStatus lvp.start_bolus() lvp.start_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s before priming!" % system_status) assert system_status == SystemStatus.ERunStatus time.sleep(6 / 1200 * 3600) lvp.stop_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after priming!" % system_status) assert system_status == SystemStatus.EStopStatus alarm_id.clear() lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time1 = (datetime.datetime.now() - alarm_mark_time1).seconds else: log.logger.info("Completing infusion!") break # 输注完成。 # 屏幕出现输注完成警报。 alarm_id = lvp.get_pump_alarm() log.logger.info("The occurred alarm is %s!" % alarmMatrix()[alarm_id[0]]) assert 23 in alarm_id alarm_id.clear() # 按停止键。 # 警报消除成功,泵处于停止状态。 lvp.stop_infusion() alarm_id = lvp.get_pump_alarm() assert 23 not in alarm_id system_status = lvp.get_system_status() log.logger.info("The current system status is %s after completing infusion!" % system_status) assert system_status == SystemStatus.EStopStatus # 更换药物。 # 设置成功。 # lvp.set_current_drug() # 泵端未实现 # lvp.get_current_drug() # 泵端未实现 # 将速率降低到25mL/ h,输液量为30mL。 # 设置成功。 lvp.set_infusion_parameter(25, 0, 30) # 按开始键开始输注。 # 泵处于运行状态。 lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time2 = 0 mark_time = datetime.datetime.now() while keep_running: duration_time = (datetime.datetime.now() - mark_time).seconds if duration_time - alarm_handler_time2 < 30 / 25 * 3600: log.logger.info("The remain time is %s!" % (30 / 25 * 3600 - duration_time)) alarm_mark_time2 = datetime.datetime.now() alarm_id = lvp.get_pump_alarm() if type(alarm_id) == list(): pass else: continue if 22 in alarm_id: log.logger.info("The occurred alarm is %s!" % alarmMatrix()[22]) lvp.stop_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s!" % system_status) assert system_status == SystemStatus.EStopStatus lvp.start_bolus() lvp.start_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s before priming!" % system_status) assert system_status == SystemStatus.ERunStatus time.sleep(6 / 1200 * 3600) lvp.stop_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after priming!" % system_status) assert system_status == SystemStatus.EStopStatus alarm_id.clear() lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time2 = (datetime.datetime.now() - alarm_mark_time2).seconds else: log.logger.info("Completing infusion!") break # 输注完成。 # 屏幕出现输注完成警报。 alarm_id = lvp.get_pump_alarm() log.logger.info("The occurred alarm is %s!" % alarmMatrix()[alarm_id[0]]) assert 23 in alarm_id alarm_id.clear() # 按停止键。 # 警报消除成功,泵处于停止状态。 lvp.stop_infusion() alarm_id = lvp.get_pump_alarm() assert 23 not in alarm_id system_status = lvp.get_system_status() log.logger.info("The current system status is %s after completing infusion!" % system_status) assert system_status == SystemStatus.EStopStatus # 在5:00 pm,改变药物为红霉素。 # 设置成功。 # lvp.set_current_drug() # 泵端未实现 # lvp.get_current_drug() # 泵端未实现 # 调整速率为30mL/ h。 # 设置成功。 lvp.set_infusion_parameter(30, 0, 30) # 按开始键开始输注。 # 泵处于运行状态。 lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time3 = 0 mark_time = datetime.datetime.now() while keep_running: duration_time = (datetime.datetime.now() - mark_time).seconds if duration_time - alarm_handler_time3 < 30 / 30 * 3600: log.logger.info("The remain time is %s!" % (30 / 30 * 3600 - duration_time)) alarm_mark_time3 = datetime.datetime.now() alarm_id = lvp.get_pump_alarm() if type(alarm_id) == list(): pass else: continue if 22 in alarm_id: log.logger.info("The occurred alarm is %s!" % alarmMatrix()[22]) lvp.stop_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s!" % system_status) assert system_status == SystemStatus.EStopStatus lvp.start_bolus() lvp.start_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s before priming!" % system_status) assert system_status == SystemStatus.ERunStatus time.sleep(6 / 1200 * 3600) lvp.stop_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after priming!" % system_status) assert system_status == SystemStatus.EStopStatus alarm_id.clear() lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time3 = (datetime.datetime.now() - alarm_mark_time3).seconds else: log.logger.info("Completing infusion!") break # 输注完成。 # 屏幕出现输注完成警报。 alarm_id = lvp.get_pump_alarm() log.logger.info("The occurred alarm is %s!" % alarmMatrix()[alarm_id[0]]) assert 23 in alarm_id alarm_id.clear() # 按停止键。 # 警报消除成功,泵处于停止状态。 lvp.stop_infusion() alarm_id = lvp.get_pump_alarm() assert 23 not in alarm_id system_status = lvp.get_system_status() log.logger.info("The current system status is %s after completing infusion!" % system_status) assert system_status == SystemStatus.EStopStatus # 在6:00 pm,调整药物。 # 设置成功。 # lvp.set_current_drug() # 泵端未实现 # lvp.get_current_drug() # 泵端未实现 # 调整速率为25mL/ h。 # 设置成功。 lvp.set_infusion_parameter(25, 0, 30) # 按开始键开始输注。 # 泵处于运行状态。 lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time4 = 0 mark_time = datetime.datetime.now() while keep_running: duration_time = (datetime.datetime.now() - mark_time).seconds if duration_time - alarm_handler_time4 < 30 / 25 * 3600: log.logger.info("The remain time is %s!" % (30 / 25 * 3600 - duration_time)) alarm_mark_time4 = datetime.datetime.now() alarm_id = lvp.get_pump_alarm() if type(alarm_id) == list(): pass else: continue if 22 in alarm_id: log.logger.info("The occurred alarm is %s!" % alarmMatrix()[22]) lvp.stop_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s!" % system_status) assert system_status == SystemStatus.EStopStatus lvp.start_bolus() lvp.start_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s before priming!" % system_status) assert system_status == SystemStatus.ERunStatus time.sleep(6 / 1200 * 3600) lvp.stop_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after priming!" % system_status) assert system_status == SystemStatus.EStopStatus alarm_id.clear() lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time4 = (datetime.datetime.now() - alarm_mark_time4).seconds else: log.logger.info("Completing infusion!") break # 输注完成。 # 屏幕出现输注完成警报。 alarm_id = lvp.get_pump_alarm() log.logger.info("The occurred alarm is %s!" % alarmMatrix()[alarm_id[0]]) assert 23 in alarm_id alarm_id.clear() # 按停止键。 # 警报消除成功,泵处于停止状态。 lvp.stop_infusion() alarm_id = lvp.get_pump_alarm() assert 23 not in alarm_id system_status = lvp.get_system_status() log.logger.info("The current system status is %s after completing infusion!" % system_status) assert system_status == SystemStatus.EStopStatus # 调整药物。 # 设置成功。 # lvp.set_current_drug() # 泵端未实现 # lvp.get_current_drug() # 泵端未实现 # 调整速率为30mlL/ h。 # 设置成功。 lvp.set_infusion_parameter(30, 0, 30) # 打开夜间模式。 # 设置成功。 # if time.localtime()[3] >= 19 and time.localtime()[4] >= 0: lvp.set_night_mode_switch_status("On") assert lvp.get_night_mode_switch_status() == "On" # 设置夜间模式时间段为19:00至6:00 。 # 设置成功。 lvp.set_night_mode_period(19, 0, 6, 0) assert lvp.get_night_mode_period() == (19, 0, 6, 0) # 将阻塞水平提高到4级。 # 设置成功。 lvp.set_occlusion_level(4) assert lvp.get_occlusion_level() == 4 # 静音按键音。 # 设置成功。 lvp.set_touch_tone_switch_status("Off") assert lvp.get_touch_tone_switch_status() == "Off" # 按开始键开始输液。 # 泵处于运行状态。 lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time5 = 0 mark_time = datetime.datetime.now() while keep_running: duration_time = (datetime.datetime.now() - mark_time).seconds if duration_time - alarm_handler_time5 < 30 / 30 * 3600: log.logger.info("The remain time is %s!" % (30 / 30 * 3600 - duration_time)) alarm_mark_time5 = datetime.datetime.now() alarm_id = lvp.get_pump_alarm() if type(alarm_id) == list(): pass else: continue if 22 in alarm_id: log.logger.info("The occurred alarm is %s!" % alarmMatrix()[22]) lvp.stop_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s!" % system_status) assert system_status == SystemStatus.EStopStatus lvp.start_bolus() lvp.start_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s before priming!" % system_status) assert system_status == SystemStatus.ERunStatus time.sleep(6 / 1200 * 3600) lvp.stop_prime() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after priming!" % system_status) assert system_status == SystemStatus.EStopStatus alarm_id.clear() lvp.start_infusion() system_status = lvp.get_system_status() log.logger.info("The current system status is %s after starting infusion!" % system_status) assert system_status == SystemStatus.ERunStatus alarm_handler_time5 = (datetime.datetime.now() - alarm_mark_time5).seconds else: log.logger.info("Completing infusion!") break # 输注完成。 # 屏幕出现输注完成警报。 alarm_id = lvp.get_pump_alarm() log.logger.info("The occurred alarm is %s!" % alarmMatrix()[alarm_id[0]]) assert 23 in alarm_id alarm_id.clear() # 按停止键。 # 警报消除成功,泵处于停止状态。 lvp.stop_infusion() alarm_id = lvp.get_pump_alarm() assert 23 not in alarm_id system_status = lvp.get_system_status() log.logger.info("The current system status is %s after completing infusion!" % system_status) assert system_status == SystemStatus.EStopStatus
45.272953
111
0.572869
1,998
18,245
5.009009
0.078579
0.197842
0.071443
0.078337
0.910472
0.879896
0.876599
0.870803
0.870803
0.867406
0
0.025279
0.336531
18,245
402
112
45.385572
0.801487
0.090052
0
0.860544
0
0
0.12882
0
0
0
0
0
0.166667
1
0.003401
false
0.017007
0.003401
0
0.010204
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
601726d0fc700f3f1b0a68341961b2428d55132d
503,401
py
Python
test/unit/test_discovery_v1.py
timgates42/python-sdk
8a6647636266f987816eb1d747782c07c3cfcba3
[ "Apache-2.0" ]
1
2021-06-11T03:12:15.000Z
2021-06-11T03:12:15.000Z
test/unit/test_discovery_v1.py
timgates42/python-sdk
8a6647636266f987816eb1d747782c07c3cfcba3
[ "Apache-2.0" ]
null
null
null
test/unit/test_discovery_v1.py
timgates42/python-sdk
8a6647636266f987816eb1d747782c07c3cfcba3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # (C) Copyright IBM Corp. 2016, 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. """ Unit Tests for DiscoveryV1 """ from datetime import datetime, timezone from ibm_cloud_sdk_core.authenticators.no_auth_authenticator import NoAuthAuthenticator import inspect import io import json import pytest import re import requests import responses import tempfile import urllib from ibm_watson.discovery_v1 import * version = 'testString' service = DiscoveryV1( authenticator=NoAuthAuthenticator(), version=version ) base_url = 'https://api.us-south.discovery.watson.cloud.ibm.com' service.set_service_url(base_url) ############################################################################## # Start of Service: Environments ############################################################################## # region class TestCreateEnvironment(): """ Test Class for create_environment """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_environment_all_params(self): """ create_environment() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments') mock_response = '{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values name = 'testString' description = 'testString' size = 'LT' # Invoke method response = service.create_environment( name, description=description, size=size, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['name'] == 'testString' assert req_body['description'] == 'testString' assert req_body['size'] == 'LT' @responses.activate def test_create_environment_value_error(self): """ test_create_environment_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments') mock_response = '{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values name = 'testString' description = 'testString' size = 'LT' # Pass in all but one required param and check for a ValueError req_param_dict = { "name": name, } 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.create_environment(**req_copy) class TestListEnvironments(): """ Test Class for list_environments """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_environments_all_params(self): """ list_environments() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments') mock_response = '{"environments": [{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values name = 'testString' # Invoke method response = service.list_environments( name=name, 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 = urllib.parse.unquote_plus(query_string) assert 'name={}'.format(name) in query_string @responses.activate def test_list_environments_required_params(self): """ test_list_environments_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments') mock_response = '{"environments": [{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.list_environments() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_environments_value_error(self): """ test_list_environments_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments') mock_response = '{"environments": [{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}]}' 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.list_environments(**req_copy) class TestGetEnvironment(): """ Test Class for get_environment """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_environment_all_params(self): """ get_environment() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString') mock_response = '{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Invoke method response = service.get_environment( environment_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_environment_value_error(self): """ test_get_environment_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString') mock_response = '{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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_environment(**req_copy) class TestUpdateEnvironment(): """ Test Class for update_environment """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_environment_all_params(self): """ update_environment() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString') mock_response = '{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' name = 'testString' description = 'testString' size = 'S' # Invoke method response = service.update_environment( environment_id, name=name, description=description, size=size, 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['name'] == 'testString' assert req_body['description'] == 'testString' assert req_body['size'] == 'S' @responses.activate def test_update_environment_value_error(self): """ test_update_environment_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString') mock_response = '{"environment_id": "environment_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "read_only": false, "size": "LT", "requested_size": "requested_size", "index_capacity": {"documents": {"available": 9, "maximum_allowed": 15}, "disk_usage": {"used_bytes": 10, "maximum_allowed_bytes": 21}, "collections": {"available": 9, "maximum_allowed": 15}}, "search_status": {"scope": "scope", "status": "NO_DATA", "status_description": "status_description", "last_trained": "2019-01-01"}}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' name = 'testString' description = 'testString' size = 'S' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.update_environment(**req_copy) class TestDeleteEnvironment(): """ Test Class for delete_environment """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_environment_all_params(self): """ delete_environment() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString') mock_response = '{"environment_id": "environment_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Invoke method response = service.delete_environment( environment_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_environment_value_error(self): """ test_delete_environment_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString') mock_response = '{"environment_id": "environment_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.delete_environment(**req_copy) class TestListFields(): """ Test Class for list_fields """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_fields_all_params(self): """ list_fields() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/fields') mock_response = '{"fields": [{"field": "field", "type": "nested"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = ['testString'] # Invoke method response = service.list_fields( environment_id, collection_ids, 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 = urllib.parse.unquote_plus(query_string) assert 'collection_ids={}'.format(','.join(collection_ids)) in query_string @responses.activate def test_list_fields_value_error(self): """ test_list_fields_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/fields') mock_response = '{"fields": [{"field": "field", "type": "nested"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = ['testString'] # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_ids": collection_ids, } 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.list_fields(**req_copy) # endregion ############################################################################## # End of Service: Environments ############################################################################## ############################################################################## # Start of Service: Configurations ############################################################################## # region class TestCreateConfiguration(): """ Test Class for create_configuration """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_configuration_all_params(self): """ create_configuration() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations') mock_response = '{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Construct a dict representation of a FontSetting model font_setting_model = {} font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' # Construct a dict representation of a PdfHeadingDetection model pdf_heading_detection_model = {} pdf_heading_detection_model['fonts'] = [font_setting_model] # Construct a dict representation of a PdfSettings model pdf_settings_model = {} pdf_settings_model['heading'] = pdf_heading_detection_model # Construct a dict representation of a WordStyle model word_style_model = {} word_style_model['level'] = 38 word_style_model['names'] = ['testString'] # Construct a dict representation of a WordHeadingDetection model word_heading_detection_model = {} word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] # Construct a dict representation of a WordSettings model word_settings_model = {} word_settings_model['heading'] = word_heading_detection_model # Construct a dict representation of a XPathPatterns model x_path_patterns_model = {} x_path_patterns_model['xpaths'] = ['testString'] # Construct a dict representation of a HtmlSettings model html_settings_model = {} html_settings_model['exclude_tags_completely'] = ['testString'] html_settings_model['exclude_tags_keep_content'] = ['testString'] html_settings_model['keep_content'] = x_path_patterns_model html_settings_model['exclude_content'] = x_path_patterns_model html_settings_model['keep_tag_attributes'] = ['testString'] html_settings_model['exclude_tag_attributes'] = ['testString'] # Construct a dict representation of a SegmentSettings model segment_settings_model = {} segment_settings_model['enabled'] = True segment_settings_model['selector_tags'] = ['testString'] segment_settings_model['annotated_fields'] = ['testString'] # Construct a dict representation of a NormalizationOperation model normalization_operation_model = {} normalization_operation_model['operation'] = 'copy' normalization_operation_model['source_field'] = 'testString' normalization_operation_model['destination_field'] = 'testString' # Construct a dict representation of a Conversions model conversions_model = {} conversions_model['pdf'] = pdf_settings_model conversions_model['word'] = word_settings_model conversions_model['html'] = html_settings_model conversions_model['segment'] = segment_settings_model conversions_model['json_normalizations'] = [normalization_operation_model] conversions_model['image_text_recognition'] = True # Construct a dict representation of a NluEnrichmentKeywords model nlu_enrichment_keywords_model = {} nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentEntities model nlu_enrichment_entities_model = {} nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentSentiment model nlu_enrichment_sentiment_model = {} nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentEmotion model nlu_enrichment_emotion_model = {} nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentSemanticRoles model nlu_enrichment_semantic_roles_model = {} nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentRelations model nlu_enrichment_relations_model = {} nlu_enrichment_relations_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentConcepts model nlu_enrichment_concepts_model = {} nlu_enrichment_concepts_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentFeatures model nlu_enrichment_features_model = {} nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model # Construct a dict representation of a EnrichmentOptions model enrichment_options_model = {} enrichment_options_model['features'] = nlu_enrichment_features_model enrichment_options_model['language'] = 'ar' enrichment_options_model['model'] = 'testString' # Construct a dict representation of a Enrichment model enrichment_model = {} enrichment_model['description'] = 'testString' enrichment_model['destination_field'] = 'testString' enrichment_model['source_field'] = 'testString' enrichment_model['overwrite'] = True enrichment_model['enrichment'] = 'testString' enrichment_model['ignore_downstream_errors'] = True enrichment_model['options'] = enrichment_options_model # Construct a dict representation of a SourceSchedule model source_schedule_model = {} source_schedule_model['enabled'] = True source_schedule_model['time_zone'] = 'testString' source_schedule_model['frequency'] = 'daily' # Construct a dict representation of a SourceOptionsFolder model source_options_folder_model = {} source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 # Construct a dict representation of a SourceOptionsObject model source_options_object_model = {} source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 # Construct a dict representation of a SourceOptionsSiteColl model source_options_site_coll_model = {} source_options_site_coll_model['site_collection_path'] = 'testString' source_options_site_coll_model['limit'] = 38 # Construct a dict representation of a SourceOptionsWebCrawl model source_options_web_crawl_model = {} source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] # Construct a dict representation of a SourceOptionsBuckets model source_options_buckets_model = {} source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 # Construct a dict representation of a SourceOptions model source_options_model = {} source_options_model['folders'] = [source_options_folder_model] source_options_model['objects'] = [source_options_object_model] source_options_model['site_collections'] = [source_options_site_coll_model] source_options_model['urls'] = [source_options_web_crawl_model] source_options_model['buckets'] = [source_options_buckets_model] source_options_model['crawl_all_buckets'] = True # Construct a dict representation of a Source model source_model = {} source_model['type'] = 'box' source_model['credential_id'] = 'testString' source_model['schedule'] = source_schedule_model source_model['options'] = source_options_model # Set up parameter values environment_id = 'testString' name = 'testString' description = 'testString' conversions = conversions_model enrichments = [enrichment_model] normalizations = [normalization_operation_model] source = source_model # Invoke method response = service.create_configuration( environment_id, name, description=description, conversions=conversions, enrichments=enrichments, normalizations=normalizations, source=source, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['name'] == 'testString' assert req_body['description'] == 'testString' assert req_body['conversions'] == conversions_model assert req_body['enrichments'] == [enrichment_model] assert req_body['normalizations'] == [normalization_operation_model] assert req_body['source'] == source_model @responses.activate def test_create_configuration_value_error(self): """ test_create_configuration_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations') mock_response = '{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Construct a dict representation of a FontSetting model font_setting_model = {} font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' # Construct a dict representation of a PdfHeadingDetection model pdf_heading_detection_model = {} pdf_heading_detection_model['fonts'] = [font_setting_model] # Construct a dict representation of a PdfSettings model pdf_settings_model = {} pdf_settings_model['heading'] = pdf_heading_detection_model # Construct a dict representation of a WordStyle model word_style_model = {} word_style_model['level'] = 38 word_style_model['names'] = ['testString'] # Construct a dict representation of a WordHeadingDetection model word_heading_detection_model = {} word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] # Construct a dict representation of a WordSettings model word_settings_model = {} word_settings_model['heading'] = word_heading_detection_model # Construct a dict representation of a XPathPatterns model x_path_patterns_model = {} x_path_patterns_model['xpaths'] = ['testString'] # Construct a dict representation of a HtmlSettings model html_settings_model = {} html_settings_model['exclude_tags_completely'] = ['testString'] html_settings_model['exclude_tags_keep_content'] = ['testString'] html_settings_model['keep_content'] = x_path_patterns_model html_settings_model['exclude_content'] = x_path_patterns_model html_settings_model['keep_tag_attributes'] = ['testString'] html_settings_model['exclude_tag_attributes'] = ['testString'] # Construct a dict representation of a SegmentSettings model segment_settings_model = {} segment_settings_model['enabled'] = True segment_settings_model['selector_tags'] = ['testString'] segment_settings_model['annotated_fields'] = ['testString'] # Construct a dict representation of a NormalizationOperation model normalization_operation_model = {} normalization_operation_model['operation'] = 'copy' normalization_operation_model['source_field'] = 'testString' normalization_operation_model['destination_field'] = 'testString' # Construct a dict representation of a Conversions model conversions_model = {} conversions_model['pdf'] = pdf_settings_model conversions_model['word'] = word_settings_model conversions_model['html'] = html_settings_model conversions_model['segment'] = segment_settings_model conversions_model['json_normalizations'] = [normalization_operation_model] conversions_model['image_text_recognition'] = True # Construct a dict representation of a NluEnrichmentKeywords model nlu_enrichment_keywords_model = {} nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentEntities model nlu_enrichment_entities_model = {} nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentSentiment model nlu_enrichment_sentiment_model = {} nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentEmotion model nlu_enrichment_emotion_model = {} nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentSemanticRoles model nlu_enrichment_semantic_roles_model = {} nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentRelations model nlu_enrichment_relations_model = {} nlu_enrichment_relations_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentConcepts model nlu_enrichment_concepts_model = {} nlu_enrichment_concepts_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentFeatures model nlu_enrichment_features_model = {} nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model # Construct a dict representation of a EnrichmentOptions model enrichment_options_model = {} enrichment_options_model['features'] = nlu_enrichment_features_model enrichment_options_model['language'] = 'ar' enrichment_options_model['model'] = 'testString' # Construct a dict representation of a Enrichment model enrichment_model = {} enrichment_model['description'] = 'testString' enrichment_model['destination_field'] = 'testString' enrichment_model['source_field'] = 'testString' enrichment_model['overwrite'] = True enrichment_model['enrichment'] = 'testString' enrichment_model['ignore_downstream_errors'] = True enrichment_model['options'] = enrichment_options_model # Construct a dict representation of a SourceSchedule model source_schedule_model = {} source_schedule_model['enabled'] = True source_schedule_model['time_zone'] = 'testString' source_schedule_model['frequency'] = 'daily' # Construct a dict representation of a SourceOptionsFolder model source_options_folder_model = {} source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 # Construct a dict representation of a SourceOptionsObject model source_options_object_model = {} source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 # Construct a dict representation of a SourceOptionsSiteColl model source_options_site_coll_model = {} source_options_site_coll_model['site_collection_path'] = 'testString' source_options_site_coll_model['limit'] = 38 # Construct a dict representation of a SourceOptionsWebCrawl model source_options_web_crawl_model = {} source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] # Construct a dict representation of a SourceOptionsBuckets model source_options_buckets_model = {} source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 # Construct a dict representation of a SourceOptions model source_options_model = {} source_options_model['folders'] = [source_options_folder_model] source_options_model['objects'] = [source_options_object_model] source_options_model['site_collections'] = [source_options_site_coll_model] source_options_model['urls'] = [source_options_web_crawl_model] source_options_model['buckets'] = [source_options_buckets_model] source_options_model['crawl_all_buckets'] = True # Construct a dict representation of a Source model source_model = {} source_model['type'] = 'box' source_model['credential_id'] = 'testString' source_model['schedule'] = source_schedule_model source_model['options'] = source_options_model # Set up parameter values environment_id = 'testString' name = 'testString' description = 'testString' conversions = conversions_model enrichments = [enrichment_model] normalizations = [normalization_operation_model] source = source_model # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "name": name, } 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.create_configuration(**req_copy) class TestListConfigurations(): """ Test Class for list_configurations """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_configurations_all_params(self): """ list_configurations() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations') mock_response = '{"configurations": [{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' name = 'testString' # Invoke method response = service.list_configurations( environment_id, name=name, 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 = urllib.parse.unquote_plus(query_string) assert 'name={}'.format(name) in query_string @responses.activate def test_list_configurations_required_params(self): """ test_list_configurations_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations') mock_response = '{"configurations": [{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Invoke method response = service.list_configurations( environment_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_configurations_value_error(self): """ test_list_configurations_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations') mock_response = '{"configurations": [{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.list_configurations(**req_copy) class TestGetConfiguration(): """ Test Class for get_configuration """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_configuration_all_params(self): """ get_configuration() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations/testString') mock_response = '{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' configuration_id = 'testString' # Invoke method response = service.get_configuration( environment_id, configuration_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_configuration_value_error(self): """ test_get_configuration_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations/testString') mock_response = '{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' configuration_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "configuration_id": configuration_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_configuration(**req_copy) class TestUpdateConfiguration(): """ Test Class for update_configuration """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_configuration_all_params(self): """ update_configuration() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations/testString') mock_response = '{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a FontSetting model font_setting_model = {} font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' # Construct a dict representation of a PdfHeadingDetection model pdf_heading_detection_model = {} pdf_heading_detection_model['fonts'] = [font_setting_model] # Construct a dict representation of a PdfSettings model pdf_settings_model = {} pdf_settings_model['heading'] = pdf_heading_detection_model # Construct a dict representation of a WordStyle model word_style_model = {} word_style_model['level'] = 38 word_style_model['names'] = ['testString'] # Construct a dict representation of a WordHeadingDetection model word_heading_detection_model = {} word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] # Construct a dict representation of a WordSettings model word_settings_model = {} word_settings_model['heading'] = word_heading_detection_model # Construct a dict representation of a XPathPatterns model x_path_patterns_model = {} x_path_patterns_model['xpaths'] = ['testString'] # Construct a dict representation of a HtmlSettings model html_settings_model = {} html_settings_model['exclude_tags_completely'] = ['testString'] html_settings_model['exclude_tags_keep_content'] = ['testString'] html_settings_model['keep_content'] = x_path_patterns_model html_settings_model['exclude_content'] = x_path_patterns_model html_settings_model['keep_tag_attributes'] = ['testString'] html_settings_model['exclude_tag_attributes'] = ['testString'] # Construct a dict representation of a SegmentSettings model segment_settings_model = {} segment_settings_model['enabled'] = True segment_settings_model['selector_tags'] = ['testString'] segment_settings_model['annotated_fields'] = ['testString'] # Construct a dict representation of a NormalizationOperation model normalization_operation_model = {} normalization_operation_model['operation'] = 'copy' normalization_operation_model['source_field'] = 'testString' normalization_operation_model['destination_field'] = 'testString' # Construct a dict representation of a Conversions model conversions_model = {} conversions_model['pdf'] = pdf_settings_model conversions_model['word'] = word_settings_model conversions_model['html'] = html_settings_model conversions_model['segment'] = segment_settings_model conversions_model['json_normalizations'] = [normalization_operation_model] conversions_model['image_text_recognition'] = True # Construct a dict representation of a NluEnrichmentKeywords model nlu_enrichment_keywords_model = {} nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentEntities model nlu_enrichment_entities_model = {} nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentSentiment model nlu_enrichment_sentiment_model = {} nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentEmotion model nlu_enrichment_emotion_model = {} nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentSemanticRoles model nlu_enrichment_semantic_roles_model = {} nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentRelations model nlu_enrichment_relations_model = {} nlu_enrichment_relations_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentConcepts model nlu_enrichment_concepts_model = {} nlu_enrichment_concepts_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentFeatures model nlu_enrichment_features_model = {} nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model # Construct a dict representation of a EnrichmentOptions model enrichment_options_model = {} enrichment_options_model['features'] = nlu_enrichment_features_model enrichment_options_model['language'] = 'ar' enrichment_options_model['model'] = 'testString' # Construct a dict representation of a Enrichment model enrichment_model = {} enrichment_model['description'] = 'testString' enrichment_model['destination_field'] = 'testString' enrichment_model['source_field'] = 'testString' enrichment_model['overwrite'] = True enrichment_model['enrichment'] = 'testString' enrichment_model['ignore_downstream_errors'] = True enrichment_model['options'] = enrichment_options_model # Construct a dict representation of a SourceSchedule model source_schedule_model = {} source_schedule_model['enabled'] = True source_schedule_model['time_zone'] = 'testString' source_schedule_model['frequency'] = 'daily' # Construct a dict representation of a SourceOptionsFolder model source_options_folder_model = {} source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 # Construct a dict representation of a SourceOptionsObject model source_options_object_model = {} source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 # Construct a dict representation of a SourceOptionsSiteColl model source_options_site_coll_model = {} source_options_site_coll_model['site_collection_path'] = 'testString' source_options_site_coll_model['limit'] = 38 # Construct a dict representation of a SourceOptionsWebCrawl model source_options_web_crawl_model = {} source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] # Construct a dict representation of a SourceOptionsBuckets model source_options_buckets_model = {} source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 # Construct a dict representation of a SourceOptions model source_options_model = {} source_options_model['folders'] = [source_options_folder_model] source_options_model['objects'] = [source_options_object_model] source_options_model['site_collections'] = [source_options_site_coll_model] source_options_model['urls'] = [source_options_web_crawl_model] source_options_model['buckets'] = [source_options_buckets_model] source_options_model['crawl_all_buckets'] = True # Construct a dict representation of a Source model source_model = {} source_model['type'] = 'box' source_model['credential_id'] = 'testString' source_model['schedule'] = source_schedule_model source_model['options'] = source_options_model # Set up parameter values environment_id = 'testString' configuration_id = 'testString' name = 'testString' description = 'testString' conversions = conversions_model enrichments = [enrichment_model] normalizations = [normalization_operation_model] source = source_model # Invoke method response = service.update_configuration( environment_id, configuration_id, name, description=description, conversions=conversions, enrichments=enrichments, normalizations=normalizations, source=source, 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['name'] == 'testString' assert req_body['description'] == 'testString' assert req_body['conversions'] == conversions_model assert req_body['enrichments'] == [enrichment_model] assert req_body['normalizations'] == [normalization_operation_model] assert req_body['source'] == source_model @responses.activate def test_update_configuration_value_error(self): """ test_update_configuration_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations/testString') mock_response = '{"configuration_id": "configuration_id", "name": "name", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "description": "description", "conversions": {"pdf": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}]}}, "word": {"heading": {"fonts": [{"level": 5, "min_size": 8, "max_size": 8, "bold": true, "italic": true, "name": "name"}], "styles": [{"level": 5, "names": ["names"]}]}}, "html": {"exclude_tags_completely": ["exclude_tags_completely"], "exclude_tags_keep_content": ["exclude_tags_keep_content"], "keep_content": {"xpaths": ["xpaths"]}, "exclude_content": {"xpaths": ["xpaths"]}, "keep_tag_attributes": ["keep_tag_attributes"], "exclude_tag_attributes": ["exclude_tag_attributes"]}, "segment": {"enabled": false, "selector_tags": ["selector_tags"], "annotated_fields": ["annotated_fields"]}, "json_normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "image_text_recognition": true}, "enrichments": [{"description": "description", "destination_field": "destination_field", "source_field": "source_field", "overwrite": false, "enrichment": "enrichment", "ignore_downstream_errors": true, "options": {"features": {"keywords": {"sentiment": false, "emotion": false, "limit": 5}, "entities": {"sentiment": false, "emotion": false, "limit": 5, "mentions": true, "mention_types": false, "sentence_locations": true, "model": "model"}, "sentiment": {"document": true, "targets": ["target"]}, "emotion": {"document": true, "targets": ["target"]}, "categories": {"mapKey": {"anyKey": "anyValue"}}, "semantic_roles": {"entities": true, "keywords": true, "limit": 5}, "relations": {"model": "model"}, "concepts": {"limit": 5}}, "language": "ar", "model": "model"}}], "normalizations": [{"operation": "copy", "source_field": "source_field", "destination_field": "destination_field"}], "source": {"type": "box", "credential_id": "credential_id", "schedule": {"enabled": false, "time_zone": "time_zone", "frequency": "daily"}, "options": {"folders": [{"owner_user_id": "owner_user_id", "folder_id": "folder_id", "limit": 5}], "objects": [{"name": "name", "limit": 5}], "site_collections": [{"site_collection_path": "site_collection_path", "limit": 5}], "urls": [{"url": "url", "limit_to_starting_hosts": false, "crawl_speed": "gentle", "allow_untrusted_certificate": false, "maximum_hops": 12, "request_timeout": 15, "override_robots_txt": false, "blacklist": ["blacklist"]}], "buckets": [{"name": "name", "limit": 5}], "crawl_all_buckets": false}}}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a FontSetting model font_setting_model = {} font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' # Construct a dict representation of a PdfHeadingDetection model pdf_heading_detection_model = {} pdf_heading_detection_model['fonts'] = [font_setting_model] # Construct a dict representation of a PdfSettings model pdf_settings_model = {} pdf_settings_model['heading'] = pdf_heading_detection_model # Construct a dict representation of a WordStyle model word_style_model = {} word_style_model['level'] = 38 word_style_model['names'] = ['testString'] # Construct a dict representation of a WordHeadingDetection model word_heading_detection_model = {} word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] # Construct a dict representation of a WordSettings model word_settings_model = {} word_settings_model['heading'] = word_heading_detection_model # Construct a dict representation of a XPathPatterns model x_path_patterns_model = {} x_path_patterns_model['xpaths'] = ['testString'] # Construct a dict representation of a HtmlSettings model html_settings_model = {} html_settings_model['exclude_tags_completely'] = ['testString'] html_settings_model['exclude_tags_keep_content'] = ['testString'] html_settings_model['keep_content'] = x_path_patterns_model html_settings_model['exclude_content'] = x_path_patterns_model html_settings_model['keep_tag_attributes'] = ['testString'] html_settings_model['exclude_tag_attributes'] = ['testString'] # Construct a dict representation of a SegmentSettings model segment_settings_model = {} segment_settings_model['enabled'] = True segment_settings_model['selector_tags'] = ['testString'] segment_settings_model['annotated_fields'] = ['testString'] # Construct a dict representation of a NormalizationOperation model normalization_operation_model = {} normalization_operation_model['operation'] = 'copy' normalization_operation_model['source_field'] = 'testString' normalization_operation_model['destination_field'] = 'testString' # Construct a dict representation of a Conversions model conversions_model = {} conversions_model['pdf'] = pdf_settings_model conversions_model['word'] = word_settings_model conversions_model['html'] = html_settings_model conversions_model['segment'] = segment_settings_model conversions_model['json_normalizations'] = [normalization_operation_model] conversions_model['image_text_recognition'] = True # Construct a dict representation of a NluEnrichmentKeywords model nlu_enrichment_keywords_model = {} nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentEntities model nlu_enrichment_entities_model = {} nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentSentiment model nlu_enrichment_sentiment_model = {} nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentEmotion model nlu_enrichment_emotion_model = {} nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] # Construct a dict representation of a NluEnrichmentSemanticRoles model nlu_enrichment_semantic_roles_model = {} nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentRelations model nlu_enrichment_relations_model = {} nlu_enrichment_relations_model['model'] = 'testString' # Construct a dict representation of a NluEnrichmentConcepts model nlu_enrichment_concepts_model = {} nlu_enrichment_concepts_model['limit'] = 38 # Construct a dict representation of a NluEnrichmentFeatures model nlu_enrichment_features_model = {} nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model # Construct a dict representation of a EnrichmentOptions model enrichment_options_model = {} enrichment_options_model['features'] = nlu_enrichment_features_model enrichment_options_model['language'] = 'ar' enrichment_options_model['model'] = 'testString' # Construct a dict representation of a Enrichment model enrichment_model = {} enrichment_model['description'] = 'testString' enrichment_model['destination_field'] = 'testString' enrichment_model['source_field'] = 'testString' enrichment_model['overwrite'] = True enrichment_model['enrichment'] = 'testString' enrichment_model['ignore_downstream_errors'] = True enrichment_model['options'] = enrichment_options_model # Construct a dict representation of a SourceSchedule model source_schedule_model = {} source_schedule_model['enabled'] = True source_schedule_model['time_zone'] = 'testString' source_schedule_model['frequency'] = 'daily' # Construct a dict representation of a SourceOptionsFolder model source_options_folder_model = {} source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 # Construct a dict representation of a SourceOptionsObject model source_options_object_model = {} source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 # Construct a dict representation of a SourceOptionsSiteColl model source_options_site_coll_model = {} source_options_site_coll_model['site_collection_path'] = 'testString' source_options_site_coll_model['limit'] = 38 # Construct a dict representation of a SourceOptionsWebCrawl model source_options_web_crawl_model = {} source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] # Construct a dict representation of a SourceOptionsBuckets model source_options_buckets_model = {} source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 # Construct a dict representation of a SourceOptions model source_options_model = {} source_options_model['folders'] = [source_options_folder_model] source_options_model['objects'] = [source_options_object_model] source_options_model['site_collections'] = [source_options_site_coll_model] source_options_model['urls'] = [source_options_web_crawl_model] source_options_model['buckets'] = [source_options_buckets_model] source_options_model['crawl_all_buckets'] = True # Construct a dict representation of a Source model source_model = {} source_model['type'] = 'box' source_model['credential_id'] = 'testString' source_model['schedule'] = source_schedule_model source_model['options'] = source_options_model # Set up parameter values environment_id = 'testString' configuration_id = 'testString' name = 'testString' description = 'testString' conversions = conversions_model enrichments = [enrichment_model] normalizations = [normalization_operation_model] source = source_model # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "configuration_id": configuration_id, "name": name, } 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.update_configuration(**req_copy) class TestDeleteConfiguration(): """ Test Class for delete_configuration """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_configuration_all_params(self): """ delete_configuration() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations/testString') mock_response = '{"configuration_id": "configuration_id", "status": "deleted", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' configuration_id = 'testString' # Invoke method response = service.delete_configuration( environment_id, configuration_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_configuration_value_error(self): """ test_delete_configuration_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/configurations/testString') mock_response = '{"configuration_id": "configuration_id", "status": "deleted", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' configuration_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "configuration_id": configuration_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.delete_configuration(**req_copy) # endregion ############################################################################## # End of Service: Configurations ############################################################################## ############################################################################## # Start of Service: Collections ############################################################################## # region class TestCreateCollection(): """ Test Class for create_collection """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_collection_all_params(self): """ create_collection() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections') mock_response = '{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values environment_id = 'testString' name = 'testString' description = 'testString' configuration_id = 'testString' language = 'en' # Invoke method response = service.create_collection( environment_id, name, description=description, configuration_id=configuration_id, language=language, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['name'] == 'testString' assert req_body['description'] == 'testString' assert req_body['configuration_id'] == 'testString' assert req_body['language'] == 'en' @responses.activate def test_create_collection_value_error(self): """ test_create_collection_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections') mock_response = '{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values environment_id = 'testString' name = 'testString' description = 'testString' configuration_id = 'testString' language = 'en' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "name": name, } 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.create_collection(**req_copy) class TestListCollections(): """ Test Class for list_collections """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_collections_all_params(self): """ list_collections() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections') mock_response = '{"collections": [{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' name = 'testString' # Invoke method response = service.list_collections( environment_id, name=name, 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 = urllib.parse.unquote_plus(query_string) assert 'name={}'.format(name) in query_string @responses.activate def test_list_collections_required_params(self): """ test_list_collections_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections') mock_response = '{"collections": [{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Invoke method response = service.list_collections( environment_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_collections_value_error(self): """ test_list_collections_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections') mock_response = '{"collections": [{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.list_collections(**req_copy) class TestGetCollection(): """ Test Class for get_collection """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_collection_all_params(self): """ get_collection() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString') mock_response = '{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.get_collection( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_collection_value_error(self): """ test_get_collection_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString') mock_response = '{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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_collection(**req_copy) class TestUpdateCollection(): """ Test Class for update_collection """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_collection_all_params(self): """ update_collection() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString') mock_response = '{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values environment_id = 'testString' collection_id = 'testString' name = 'testString' description = 'testString' configuration_id = 'testString' # Invoke method response = service.update_collection( environment_id, collection_id, name, description=description, configuration_id=configuration_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['name'] == 'testString' assert req_body['description'] == 'testString' assert req_body['configuration_id'] == 'testString' @responses.activate def test_update_collection_value_error(self): """ test_update_collection_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString') mock_response = '{"collection_id": "collection_id", "name": "name", "description": "description", "created": "2019-01-01T12:00:00", "updated": "2019-01-01T12:00:00", "status": "active", "configuration_id": "configuration_id", "language": "language", "document_counts": {"available": 9, "processing": 10, "failed": 6, "pending": 7}, "disk_usage": {"used_bytes": 10}, "training_status": {"total_examples": 14, "available": false, "processing": true, "minimum_queries_added": false, "minimum_examples_added": true, "sufficient_label_diversity": true, "notices": 7, "successfully_trained": "2019-01-01T12:00:00", "data_updated": "2019-01-01T12:00:00"}, "crawl_status": {"source_crawl": {"status": "running", "next_crawl": "2019-01-01T12:00:00"}}, "smart_document_understanding": {"enabled": false, "total_annotated_pages": 21, "total_pages": 11, "total_documents": 15, "custom_fields": {"defined": 7, "maximum_allowed": 15}}}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values environment_id = 'testString' collection_id = 'testString' name = 'testString' description = 'testString' configuration_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "name": name, } 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.update_collection(**req_copy) class TestDeleteCollection(): """ Test Class for delete_collection """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_collection_all_params(self): """ delete_collection() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString') mock_response = '{"collection_id": "collection_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.delete_collection( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_collection_value_error(self): """ test_delete_collection_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString') mock_response = '{"collection_id": "collection_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.delete_collection(**req_copy) class TestListCollectionFields(): """ Test Class for list_collection_fields """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_collection_fields_all_params(self): """ list_collection_fields() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/fields') mock_response = '{"fields": [{"field": "field", "type": "nested"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.list_collection_fields( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_collection_fields_value_error(self): """ test_list_collection_fields_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/fields') mock_response = '{"fields": [{"field": "field", "type": "nested"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.list_collection_fields(**req_copy) # endregion ############################################################################## # End of Service: Collections ############################################################################## ############################################################################## # Start of Service: QueryModifications ############################################################################## # region class TestListExpansions(): """ Test Class for list_expansions """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_expansions_all_params(self): """ list_expansions() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/expansions') mock_response = '{"expansions": [{"input_terms": ["input_terms"], "expanded_terms": ["expanded_terms"]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.list_expansions( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_expansions_value_error(self): """ test_list_expansions_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/expansions') mock_response = '{"expansions": [{"input_terms": ["input_terms"], "expanded_terms": ["expanded_terms"]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.list_expansions(**req_copy) class TestCreateExpansions(): """ Test Class for create_expansions """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_expansions_all_params(self): """ create_expansions() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/expansions') mock_response = '{"expansions": [{"input_terms": ["input_terms"], "expanded_terms": ["expanded_terms"]}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a Expansion model expansion_model = {} expansion_model['input_terms'] = ['testString'] expansion_model['expanded_terms'] = ['testString'] # Set up parameter values environment_id = 'testString' collection_id = 'testString' expansions = [expansion_model] # Invoke method response = service.create_expansions( environment_id, collection_id, expansions, 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['expansions'] == [expansion_model] @responses.activate def test_create_expansions_value_error(self): """ test_create_expansions_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/expansions') mock_response = '{"expansions": [{"input_terms": ["input_terms"], "expanded_terms": ["expanded_terms"]}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a Expansion model expansion_model = {} expansion_model['input_terms'] = ['testString'] expansion_model['expanded_terms'] = ['testString'] # Set up parameter values environment_id = 'testString' collection_id = 'testString' expansions = [expansion_model] # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "expansions": expansions, } 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.create_expansions(**req_copy) class TestDeleteExpansions(): """ Test Class for delete_expansions """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_expansions_all_params(self): """ delete_expansions() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/expansions') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.delete_expansions( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 204 @responses.activate def test_delete_expansions_value_error(self): """ test_delete_expansions_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/expansions') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.delete_expansions(**req_copy) class TestGetTokenizationDictionaryStatus(): """ Test Class for get_tokenization_dictionary_status """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_tokenization_dictionary_status_all_params(self): """ get_tokenization_dictionary_status() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.get_tokenization_dictionary_status( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_tokenization_dictionary_status_value_error(self): """ test_get_tokenization_dictionary_status_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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_tokenization_dictionary_status(**req_copy) class TestCreateTokenizationDictionary(): """ Test Class for create_tokenization_dictionary """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_tokenization_dictionary_all_params(self): """ create_tokenization_dictionary() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Construct a dict representation of a TokenDictRule model token_dict_rule_model = {} token_dict_rule_model['text'] = 'testString' token_dict_rule_model['tokens'] = ['testString'] token_dict_rule_model['readings'] = ['testString'] token_dict_rule_model['part_of_speech'] = 'testString' # Set up parameter values environment_id = 'testString' collection_id = 'testString' tokenization_rules = [token_dict_rule_model] # Invoke method response = service.create_tokenization_dictionary( environment_id, collection_id, tokenization_rules=tokenization_rules, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 202 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['tokenization_rules'] == [token_dict_rule_model] @responses.activate def test_create_tokenization_dictionary_required_params(self): """ test_create_tokenization_dictionary_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.create_tokenization_dictionary( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 202 @responses.activate def test_create_tokenization_dictionary_value_error(self): """ test_create_tokenization_dictionary_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.create_tokenization_dictionary(**req_copy) class TestDeleteTokenizationDictionary(): """ Test Class for delete_tokenization_dictionary """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_tokenization_dictionary_all_params(self): """ delete_tokenization_dictionary() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary') responses.add(responses.DELETE, url, status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.delete_tokenization_dictionary( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_tokenization_dictionary_value_error(self): """ test_delete_tokenization_dictionary_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/tokenization_dictionary') responses.add(responses.DELETE, url, status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.delete_tokenization_dictionary(**req_copy) class TestGetStopwordListStatus(): """ Test Class for get_stopword_list_status """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_stopword_list_status_all_params(self): """ get_stopword_list_status() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/stopwords') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.get_stopword_list_status( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_stopword_list_status_value_error(self): """ test_get_stopword_list_status_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/stopwords') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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_stopword_list_status(**req_copy) class TestCreateStopwordList(): """ Test Class for create_stopword_list """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_stopword_list_all_params(self): """ create_stopword_list() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/stopwords') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' stopword_file = io.BytesIO(b'This is a mock file.').getvalue() stopword_filename = 'testString' # Invoke method response = service.create_stopword_list( environment_id, collection_id, stopword_file, stopword_filename=stopword_filename, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_create_stopword_list_required_params(self): """ test_create_stopword_list_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/stopwords') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' stopword_file = io.BytesIO(b'This is a mock file.').getvalue() stopword_filename = 'testString' # Invoke method response = service.create_stopword_list( environment_id, collection_id, stopword_file, stopword_filename=stopword_filename, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_create_stopword_list_value_error(self): """ test_create_stopword_list_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/stopwords') mock_response = '{"status": "active", "type": "type"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' stopword_file = io.BytesIO(b'This is a mock file.').getvalue() stopword_filename = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "stopword_file": stopword_file, } 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.create_stopword_list(**req_copy) class TestDeleteStopwordList(): """ Test Class for delete_stopword_list """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_stopword_list_all_params(self): """ delete_stopword_list() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/stopwords') responses.add(responses.DELETE, url, status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.delete_stopword_list( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_stopword_list_value_error(self): """ test_delete_stopword_list_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/word_lists/stopwords') responses.add(responses.DELETE, url, status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.delete_stopword_list(**req_copy) # endregion ############################################################################## # End of Service: QueryModifications ############################################################################## ############################################################################## # Start of Service: Documents ############################################################################## # region class TestAddDocument(): """ Test Class for add_document """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_add_document_all_params(self): """ add_document() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents') mock_response = '{"document_id": "document_id", "status": "processing", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' file = io.BytesIO(b'This is a mock file.').getvalue() filename = 'testString' file_content_type = 'application/json' metadata = 'testString' # Invoke method response = service.add_document( environment_id, collection_id, file=file, filename=filename, file_content_type=file_content_type, metadata=metadata, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 202 @responses.activate def test_add_document_required_params(self): """ test_add_document_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents') mock_response = '{"document_id": "document_id", "status": "processing", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.add_document( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 202 @responses.activate def test_add_document_value_error(self): """ test_add_document_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents') mock_response = '{"document_id": "document_id", "status": "processing", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.add_document(**req_copy) class TestGetDocumentStatus(): """ Test Class for get_document_status """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_document_status_all_params(self): """ get_document_status() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents/testString') mock_response = '{"document_id": "document_id", "configuration_id": "configuration_id", "status": "available", "status_description": "status_description", "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' document_id = 'testString' # Invoke method response = service.get_document_status( environment_id, collection_id, document_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_document_status_value_error(self): """ test_get_document_status_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents/testString') mock_response = '{"document_id": "document_id", "configuration_id": "configuration_id", "status": "available", "status_description": "status_description", "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' document_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "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_status(**req_copy) class TestUpdateDocument(): """ Test Class for update_document """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_document_all_params(self): """ update_document() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents/testString') mock_response = '{"document_id": "document_id", "status": "processing", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' document_id = 'testString' file = io.BytesIO(b'This is a mock file.').getvalue() filename = 'testString' file_content_type = 'application/json' metadata = 'testString' # Invoke method response = service.update_document( environment_id, collection_id, document_id, file=file, filename=filename, file_content_type=file_content_type, metadata=metadata, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 202 @responses.activate def test_update_document_required_params(self): """ test_update_document_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents/testString') mock_response = '{"document_id": "document_id", "status": "processing", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' document_id = 'testString' # Invoke method response = service.update_document( environment_id, collection_id, document_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 202 @responses.activate def test_update_document_value_error(self): """ test_update_document_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents/testString') mock_response = '{"document_id": "document_id", "status": "processing", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=202) # Set up parameter values environment_id = 'testString' collection_id = 'testString' document_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "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.update_document(**req_copy) class TestDeleteDocument(): """ Test Class for delete_document """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_document_all_params(self): """ delete_document() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents/testString') mock_response = '{"document_id": "document_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' document_id = 'testString' # Invoke method response = service.delete_document( environment_id, collection_id, document_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_document_value_error(self): """ test_delete_document_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/documents/testString') mock_response = '{"document_id": "document_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' document_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "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.delete_document(**req_copy) # endregion ############################################################################## # End of Service: Documents ############################################################################## ############################################################################## # Start of Service: Queries ############################################################################## # region class TestQuery(): """ Test Class for query """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_query_all_params(self): """ query() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/query') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18, "session_token": "session_token", "retrieval_details": {"document_retrieval_strategy": "untrained"}, "suggested_query": "suggested_query"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' filter = 'testString' query = 'testString' natural_language_query = 'testString' passages = True aggregation = 'testString' count = 38 return_ = 'testString' offset = 38 sort = 'testString' highlight = True passages_fields = 'testString' passages_count = 100 passages_characters = 50 deduplicate = True deduplicate_field = 'testString' similar = True similar_document_ids = 'testString' similar_fields = 'testString' bias = 'testString' spelling_suggestions = True x_watson_logging_opt_out = True # Invoke method response = service.query( environment_id, collection_id, filter=filter, query=query, natural_language_query=natural_language_query, passages=passages, aggregation=aggregation, count=count, return_=return_, offset=offset, sort=sort, highlight=highlight, passages_fields=passages_fields, passages_count=passages_count, passages_characters=passages_characters, deduplicate=deduplicate, deduplicate_field=deduplicate_field, similar=similar, similar_document_ids=similar_document_ids, similar_fields=similar_fields, bias=bias, spelling_suggestions=spelling_suggestions, x_watson_logging_opt_out=x_watson_logging_opt_out, 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['filter'] == 'testString' assert req_body['query'] == 'testString' assert req_body['natural_language_query'] == 'testString' assert req_body['passages'] == True assert req_body['aggregation'] == 'testString' assert req_body['count'] == 38 assert req_body['return'] == 'testString' assert req_body['offset'] == 38 assert req_body['sort'] == 'testString' assert req_body['highlight'] == True assert req_body['passages.fields'] == 'testString' assert req_body['passages.count'] == 100 assert req_body['passages.characters'] == 50 assert req_body['deduplicate'] == True assert req_body['deduplicate.field'] == 'testString' assert req_body['similar'] == True assert req_body['similar.document_ids'] == 'testString' assert req_body['similar.fields'] == 'testString' assert req_body['bias'] == 'testString' assert req_body['spelling_suggestions'] == True @responses.activate def test_query_required_params(self): """ test_query_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/query') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18, "session_token": "session_token", "retrieval_details": {"document_retrieval_strategy": "untrained"}, "suggested_query": "suggested_query"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.query( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_query_value_error(self): """ test_query_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/query') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18, "session_token": "session_token", "retrieval_details": {"document_retrieval_strategy": "untrained"}, "suggested_query": "suggested_query"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.query(**req_copy) class TestQueryNotices(): """ Test Class for query_notices """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_query_notices_all_params(self): """ query_notices() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/notices') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}, "code": 4, "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' filter = 'testString' query = 'testString' natural_language_query = 'testString' passages = True aggregation = 'testString' count = 38 return_ = ['testString'] offset = 38 sort = ['testString'] highlight = True passages_fields = ['testString'] passages_count = 100 passages_characters = 50 deduplicate_field = 'testString' similar = True similar_document_ids = ['testString'] similar_fields = ['testString'] # Invoke method response = service.query_notices( environment_id, collection_id, filter=filter, query=query, natural_language_query=natural_language_query, passages=passages, aggregation=aggregation, count=count, return_=return_, offset=offset, sort=sort, highlight=highlight, passages_fields=passages_fields, passages_count=passages_count, passages_characters=passages_characters, deduplicate_field=deduplicate_field, similar=similar, similar_document_ids=similar_document_ids, similar_fields=similar_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 = urllib.parse.unquote_plus(query_string) assert 'filter={}'.format(filter) in query_string assert 'query={}'.format(query) in query_string assert 'natural_language_query={}'.format(natural_language_query) in query_string assert 'passages={}'.format('true' if passages else 'false') in query_string assert 'aggregation={}'.format(aggregation) in query_string assert 'count={}'.format(count) in query_string assert 'return={}'.format(','.join(return_)) in query_string assert 'offset={}'.format(offset) in query_string assert 'sort={}'.format(','.join(sort)) in query_string assert 'highlight={}'.format('true' if highlight else 'false') in query_string assert 'passages.fields={}'.format(','.join(passages_fields)) in query_string assert 'passages.count={}'.format(passages_count) in query_string assert 'passages.characters={}'.format(passages_characters) in query_string assert 'deduplicate.field={}'.format(deduplicate_field) in query_string assert 'similar={}'.format('true' if similar else 'false') in query_string assert 'similar.document_ids={}'.format(','.join(similar_document_ids)) in query_string assert 'similar.fields={}'.format(','.join(similar_fields)) in query_string @responses.activate def test_query_notices_required_params(self): """ test_query_notices_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/notices') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}, "code": 4, "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.query_notices( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_query_notices_value_error(self): """ test_query_notices_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/notices') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}, "code": 4, "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.query_notices(**req_copy) class TestFederatedQuery(): """ Test Class for federated_query """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_federated_query_all_params(self): """ federated_query() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/query') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18, "session_token": "session_token", "retrieval_details": {"document_retrieval_strategy": "untrained"}, "suggested_query": "suggested_query"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = 'testString' filter = 'testString' query = 'testString' natural_language_query = 'testString' passages = True aggregation = 'testString' count = 38 return_ = 'testString' offset = 38 sort = 'testString' highlight = True passages_fields = 'testString' passages_count = 100 passages_characters = 50 deduplicate = True deduplicate_field = 'testString' similar = True similar_document_ids = 'testString' similar_fields = 'testString' bias = 'testString' x_watson_logging_opt_out = True # Invoke method response = service.federated_query( environment_id, collection_ids, filter=filter, query=query, natural_language_query=natural_language_query, passages=passages, aggregation=aggregation, count=count, return_=return_, offset=offset, sort=sort, highlight=highlight, passages_fields=passages_fields, passages_count=passages_count, passages_characters=passages_characters, deduplicate=deduplicate, deduplicate_field=deduplicate_field, similar=similar, similar_document_ids=similar_document_ids, similar_fields=similar_fields, bias=bias, x_watson_logging_opt_out=x_watson_logging_opt_out, 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['collection_ids'] == 'testString' assert req_body['filter'] == 'testString' assert req_body['query'] == 'testString' assert req_body['natural_language_query'] == 'testString' assert req_body['passages'] == True assert req_body['aggregation'] == 'testString' assert req_body['count'] == 38 assert req_body['return'] == 'testString' assert req_body['offset'] == 38 assert req_body['sort'] == 'testString' assert req_body['highlight'] == True assert req_body['passages.fields'] == 'testString' assert req_body['passages.count'] == 100 assert req_body['passages.characters'] == 50 assert req_body['deduplicate'] == True assert req_body['deduplicate.field'] == 'testString' assert req_body['similar'] == True assert req_body['similar.document_ids'] == 'testString' assert req_body['similar.fields'] == 'testString' assert req_body['bias'] == 'testString' @responses.activate def test_federated_query_required_params(self): """ test_federated_query_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/query') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18, "session_token": "session_token", "retrieval_details": {"document_retrieval_strategy": "untrained"}, "suggested_query": "suggested_query"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = 'testString' filter = 'testString' query = 'testString' natural_language_query = 'testString' passages = True aggregation = 'testString' count = 38 return_ = 'testString' offset = 38 sort = 'testString' highlight = True passages_fields = 'testString' passages_count = 100 passages_characters = 50 deduplicate = True deduplicate_field = 'testString' similar = True similar_document_ids = 'testString' similar_fields = 'testString' bias = 'testString' # Invoke method response = service.federated_query( environment_id, collection_ids, filter=filter, query=query, natural_language_query=natural_language_query, passages=passages, aggregation=aggregation, count=count, return_=return_, offset=offset, sort=sort, highlight=highlight, passages_fields=passages_fields, passages_count=passages_count, passages_characters=passages_characters, deduplicate=deduplicate, deduplicate_field=deduplicate_field, similar=similar, similar_document_ids=similar_document_ids, similar_fields=similar_fields, bias=bias, 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['collection_ids'] == 'testString' assert req_body['filter'] == 'testString' assert req_body['query'] == 'testString' assert req_body['natural_language_query'] == 'testString' assert req_body['passages'] == True assert req_body['aggregation'] == 'testString' assert req_body['count'] == 38 assert req_body['return'] == 'testString' assert req_body['offset'] == 38 assert req_body['sort'] == 'testString' assert req_body['highlight'] == True assert req_body['passages.fields'] == 'testString' assert req_body['passages.count'] == 100 assert req_body['passages.characters'] == 50 assert req_body['deduplicate'] == True assert req_body['deduplicate.field'] == 'testString' assert req_body['similar'] == True assert req_body['similar.document_ids'] == 'testString' assert req_body['similar.fields'] == 'testString' assert req_body['bias'] == 'testString' @responses.activate def test_federated_query_value_error(self): """ test_federated_query_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/query') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18, "session_token": "session_token", "retrieval_details": {"document_retrieval_strategy": "untrained"}, "suggested_query": "suggested_query"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = 'testString' filter = 'testString' query = 'testString' natural_language_query = 'testString' passages = True aggregation = 'testString' count = 38 return_ = 'testString' offset = 38 sort = 'testString' highlight = True passages_fields = 'testString' passages_count = 100 passages_characters = 50 deduplicate = True deduplicate_field = 'testString' similar = True similar_document_ids = 'testString' similar_fields = 'testString' bias = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_ids": collection_ids, } 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.federated_query(**req_copy) class TestFederatedQueryNotices(): """ Test Class for federated_query_notices """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_federated_query_notices_all_params(self): """ federated_query_notices() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/notices') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}, "code": 4, "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = ['testString'] filter = 'testString' query = 'testString' natural_language_query = 'testString' aggregation = 'testString' count = 38 return_ = ['testString'] offset = 38 sort = ['testString'] highlight = True deduplicate_field = 'testString' similar = True similar_document_ids = ['testString'] similar_fields = ['testString'] # Invoke method response = service.federated_query_notices( environment_id, collection_ids, filter=filter, query=query, natural_language_query=natural_language_query, aggregation=aggregation, count=count, return_=return_, offset=offset, sort=sort, highlight=highlight, deduplicate_field=deduplicate_field, similar=similar, similar_document_ids=similar_document_ids, similar_fields=similar_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 = urllib.parse.unquote_plus(query_string) assert 'collection_ids={}'.format(','.join(collection_ids)) in query_string assert 'filter={}'.format(filter) in query_string assert 'query={}'.format(query) in query_string assert 'natural_language_query={}'.format(natural_language_query) in query_string assert 'aggregation={}'.format(aggregation) in query_string assert 'count={}'.format(count) in query_string assert 'return={}'.format(','.join(return_)) in query_string assert 'offset={}'.format(offset) in query_string assert 'sort={}'.format(','.join(sort)) in query_string assert 'highlight={}'.format('true' if highlight else 'false') in query_string assert 'deduplicate.field={}'.format(deduplicate_field) in query_string assert 'similar={}'.format('true' if similar else 'false') in query_string assert 'similar.document_ids={}'.format(','.join(similar_document_ids)) in query_string assert 'similar.fields={}'.format(','.join(similar_fields)) in query_string @responses.activate def test_federated_query_notices_required_params(self): """ test_federated_query_notices_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/notices') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}, "code": 4, "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = ['testString'] # Invoke method response = service.federated_query_notices( environment_id, collection_ids, 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 = urllib.parse.unquote_plus(query_string) assert 'collection_ids={}'.format(','.join(collection_ids)) in query_string @responses.activate def test_federated_query_notices_value_error(self): """ test_federated_query_notices_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/notices') mock_response = '{"matching_results": 16, "results": [{"id": "id", "metadata": {"mapKey": {"anyKey": "anyValue"}}, "collection_id": "collection_id", "result_metadata": {"score": 5, "confidence": 10}, "code": 4, "filename": "filename", "file_type": "pdf", "sha1": "sha1", "notices": [{"notice_id": "notice_id", "created": "2019-01-01T12:00:00", "document_id": "document_id", "query_id": "query_id", "severity": "warning", "step": "step", "description": "description"}]}], "aggregations": [{"type": "histogram", "matching_results": 16, "field": "field", "interval": 8}], "passages": [{"document_id": "document_id", "passage_score": 13, "passage_text": "passage_text", "start_offset": 12, "end_offset": 10, "field": "field"}], "duplicates_removed": 18}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_ids = ['testString'] # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_ids": collection_ids, } 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.federated_query_notices(**req_copy) class TestGetAutocompletion(): """ Test Class for get_autocompletion """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_autocompletion_all_params(self): """ get_autocompletion() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/autocompletion') mock_response = '{"completions": ["completions"]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' prefix = 'testString' field = 'testString' count = 38 # Invoke method response = service.get_autocompletion( environment_id, collection_id, prefix, field=field, count=count, 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 = urllib.parse.unquote_plus(query_string) assert 'prefix={}'.format(prefix) in query_string assert 'field={}'.format(field) in query_string assert 'count={}'.format(count) in query_string @responses.activate def test_get_autocompletion_required_params(self): """ test_get_autocompletion_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/autocompletion') mock_response = '{"completions": ["completions"]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' prefix = 'testString' # Invoke method response = service.get_autocompletion( environment_id, collection_id, prefix, 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 = urllib.parse.unquote_plus(query_string) assert 'prefix={}'.format(prefix) in query_string @responses.activate def test_get_autocompletion_value_error(self): """ test_get_autocompletion_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/autocompletion') mock_response = '{"completions": ["completions"]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' prefix = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "prefix": prefix, } 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_autocompletion(**req_copy) # endregion ############################################################################## # End of Service: Queries ############################################################################## ############################################################################## # Start of Service: TrainingData ############################################################################## # region class TestListTrainingData(): """ Test Class for list_training_data """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_training_data_all_params(self): """ list_training_data() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data') mock_response = '{"environment_id": "environment_id", "collection_id": "collection_id", "queries": [{"query_id": "query_id", "natural_language_query": "natural_language_query", "filter": "filter", "examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.list_training_data( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_training_data_value_error(self): """ test_list_training_data_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data') mock_response = '{"environment_id": "environment_id", "collection_id": "collection_id", "queries": [{"query_id": "query_id", "natural_language_query": "natural_language_query", "filter": "filter", "examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.list_training_data(**req_copy) class TestAddTrainingData(): """ Test Class for add_training_data """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_add_training_data_all_params(self): """ add_training_data() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data') mock_response = '{"query_id": "query_id", "natural_language_query": "natural_language_query", "filter": "filter", "examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a TrainingExample model training_example_model = {} training_example_model['document_id'] = 'testString' training_example_model['cross_reference'] = 'testString' training_example_model['relevance'] = 38 # Set up parameter values environment_id = 'testString' collection_id = 'testString' natural_language_query = 'testString' filter = 'testString' examples = [training_example_model] # Invoke method response = service.add_training_data( environment_id, collection_id, natural_language_query=natural_language_query, filter=filter, examples=examples, 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['natural_language_query'] == 'testString' assert req_body['filter'] == 'testString' assert req_body['examples'] == [training_example_model] @responses.activate def test_add_training_data_value_error(self): """ test_add_training_data_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data') mock_response = '{"query_id": "query_id", "natural_language_query": "natural_language_query", "filter": "filter", "examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a TrainingExample model training_example_model = {} training_example_model['document_id'] = 'testString' training_example_model['cross_reference'] = 'testString' training_example_model['relevance'] = 38 # Set up parameter values environment_id = 'testString' collection_id = 'testString' natural_language_query = 'testString' filter = 'testString' examples = [training_example_model] # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.add_training_data(**req_copy) class TestDeleteAllTrainingData(): """ Test Class for delete_all_training_data """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_all_training_data_all_params(self): """ delete_all_training_data() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Invoke method response = service.delete_all_training_data( environment_id, collection_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 204 @responses.activate def test_delete_all_training_data_value_error(self): """ test_delete_all_training_data_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_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.delete_all_training_data(**req_copy) class TestGetTrainingData(): """ Test Class for get_training_data """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_training_data_all_params(self): """ get_training_data() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString') mock_response = '{"query_id": "query_id", "natural_language_query": "natural_language_query", "filter": "filter", "examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' # Invoke method response = service.get_training_data( environment_id, collection_id, query_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_training_data_value_error(self): """ test_get_training_data_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString') mock_response = '{"query_id": "query_id", "natural_language_query": "natural_language_query", "filter": "filter", "examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "query_id": query_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_training_data(**req_copy) class TestDeleteTrainingData(): """ Test Class for delete_training_data """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_training_data_all_params(self): """ delete_training_data() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' # Invoke method response = service.delete_training_data( environment_id, collection_id, query_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 204 @responses.activate def test_delete_training_data_value_error(self): """ test_delete_training_data_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "query_id": query_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.delete_training_data(**req_copy) class TestListTrainingExamples(): """ Test Class for list_training_examples """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_training_examples_all_params(self): """ list_training_examples() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples') mock_response = '{"examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' # Invoke method response = service.list_training_examples( environment_id, collection_id, query_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_training_examples_value_error(self): """ test_list_training_examples_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples') mock_response = '{"examples": [{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "query_id": query_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.list_training_examples(**req_copy) class TestCreateTrainingExample(): """ Test Class for create_training_example """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_training_example_all_params(self): """ create_training_example() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples') mock_response = '{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' document_id = 'testString' cross_reference = 'testString' relevance = 38 # Invoke method response = service.create_training_example( environment_id, collection_id, query_id, document_id=document_id, cross_reference=cross_reference, relevance=relevance, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['document_id'] == 'testString' assert req_body['cross_reference'] == 'testString' assert req_body['relevance'] == 38 @responses.activate def test_create_training_example_value_error(self): """ test_create_training_example_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples') mock_response = '{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' document_id = 'testString' cross_reference = 'testString' relevance = 38 # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "query_id": query_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.create_training_example(**req_copy) class TestDeleteTrainingExample(): """ Test Class for delete_training_example """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_training_example_all_params(self): """ delete_training_example() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples/testString') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' example_id = 'testString' # Invoke method response = service.delete_training_example( environment_id, collection_id, query_id, example_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 204 @responses.activate def test_delete_training_example_value_error(self): """ test_delete_training_example_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples/testString') responses.add(responses.DELETE, url, status=204) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' example_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "query_id": query_id, "example_id": example_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.delete_training_example(**req_copy) class TestUpdateTrainingExample(): """ Test Class for update_training_example """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_training_example_all_params(self): """ update_training_example() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples/testString') mock_response = '{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' example_id = 'testString' cross_reference = 'testString' relevance = 38 # Invoke method response = service.update_training_example( environment_id, collection_id, query_id, example_id, cross_reference=cross_reference, relevance=relevance, 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['cross_reference'] == 'testString' assert req_body['relevance'] == 38 @responses.activate def test_update_training_example_value_error(self): """ test_update_training_example_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples/testString') mock_response = '{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' example_id = 'testString' cross_reference = 'testString' relevance = 38 # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "query_id": query_id, "example_id": example_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.update_training_example(**req_copy) class TestGetTrainingExample(): """ Test Class for get_training_example """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_training_example_all_params(self): """ get_training_example() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples/testString') mock_response = '{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' example_id = 'testString' # Invoke method response = service.get_training_example( environment_id, collection_id, query_id, example_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_training_example_value_error(self): """ test_get_training_example_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/collections/testString/training_data/testString/examples/testString') mock_response = '{"document_id": "document_id", "cross_reference": "cross_reference", "relevance": 9}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' collection_id = 'testString' query_id = 'testString' example_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "collection_id": collection_id, "query_id": query_id, "example_id": example_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_training_example(**req_copy) # endregion ############################################################################## # End of Service: TrainingData ############################################################################## ############################################################################## # Start of Service: UserData ############################################################################## # region class TestDeleteUserData(): """ Test Class for delete_user_data """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_user_data_all_params(self): """ delete_user_data() """ # Set up mock url = self.preprocess_url(base_url + '/v1/user_data') responses.add(responses.DELETE, url, status=200) # Set up parameter values customer_id = 'testString' # Invoke method response = service.delete_user_data( customer_id, 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 = urllib.parse.unquote_plus(query_string) assert 'customer_id={}'.format(customer_id) in query_string @responses.activate def test_delete_user_data_value_error(self): """ test_delete_user_data_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/user_data') responses.add(responses.DELETE, url, status=200) # Set up parameter values customer_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "customer_id": customer_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.delete_user_data(**req_copy) # endregion ############################################################################## # End of Service: UserData ############################################################################## ############################################################################## # Start of Service: EventsAndFeedback ############################################################################## # region class TestCreateEvent(): """ Test Class for create_event """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_event_all_params(self): """ create_event() """ # Set up mock url = self.preprocess_url(base_url + '/v1/events') mock_response = '{"type": "click", "data": {"environment_id": "environment_id", "session_token": "session_token", "client_timestamp": "2019-01-01T12:00:00", "display_rank": 12, "collection_id": "collection_id", "document_id": "document_id", "query_id": "query_id"}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Construct a dict representation of a EventData model event_data_model = {} event_data_model['environment_id'] = 'testString' event_data_model['session_token'] = 'testString' event_data_model['client_timestamp'] = '2020-01-28T18:40:40.123456Z' event_data_model['display_rank'] = 38 event_data_model['collection_id'] = 'testString' event_data_model['document_id'] = 'testString' # Set up parameter values type = 'click' data = event_data_model # Invoke method response = service.create_event( type, data, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 201 # Validate body params req_body = json.loads(str(responses.calls[0].request.body, 'utf-8')) assert req_body['type'] == 'click' assert req_body['data'] == event_data_model @responses.activate def test_create_event_value_error(self): """ test_create_event_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/events') mock_response = '{"type": "click", "data": {"environment_id": "environment_id", "session_token": "session_token", "client_timestamp": "2019-01-01T12:00:00", "display_rank": 12, "collection_id": "collection_id", "document_id": "document_id", "query_id": "query_id"}}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=201) # Construct a dict representation of a EventData model event_data_model = {} event_data_model['environment_id'] = 'testString' event_data_model['session_token'] = 'testString' event_data_model['client_timestamp'] = '2020-01-28T18:40:40.123456Z' event_data_model['display_rank'] = 38 event_data_model['collection_id'] = 'testString' event_data_model['document_id'] = 'testString' # Set up parameter values type = 'click' data = event_data_model # Pass in all but one required param and check for a ValueError req_param_dict = { "type": type, "data": data, } 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.create_event(**req_copy) class TestQueryLog(): """ Test Class for query_log """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_query_log_all_params(self): """ query_log() """ # Set up mock url = self.preprocess_url(base_url + '/v1/logs') mock_response = '{"matching_results": 16, "results": [{"environment_id": "environment_id", "customer_id": "customer_id", "document_type": "query", "natural_language_query": "natural_language_query", "document_results": {"results": [{"position": 8, "document_id": "document_id", "score": 5, "confidence": 10, "collection_id": "collection_id"}], "count": 5}, "created_timestamp": "2019-01-01T12:00:00", "client_timestamp": "2019-01-01T12:00:00", "query_id": "query_id", "session_token": "session_token", "collection_id": "collection_id", "display_rank": 12, "document_id": "document_id", "event_type": "click", "result_type": "document"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values filter = 'testString' query = 'testString' count = 38 offset = 38 sort = ['testString'] # Invoke method response = service.query_log( filter=filter, query=query, count=count, offset=offset, sort=sort, 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 = urllib.parse.unquote_plus(query_string) assert 'filter={}'.format(filter) in query_string assert 'query={}'.format(query) in query_string assert 'count={}'.format(count) in query_string assert 'offset={}'.format(offset) in query_string assert 'sort={}'.format(','.join(sort)) in query_string @responses.activate def test_query_log_required_params(self): """ test_query_log_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/logs') mock_response = '{"matching_results": 16, "results": [{"environment_id": "environment_id", "customer_id": "customer_id", "document_type": "query", "natural_language_query": "natural_language_query", "document_results": {"results": [{"position": 8, "document_id": "document_id", "score": 5, "confidence": 10, "collection_id": "collection_id"}], "count": 5}, "created_timestamp": "2019-01-01T12:00:00", "client_timestamp": "2019-01-01T12:00:00", "query_id": "query_id", "session_token": "session_token", "collection_id": "collection_id", "display_rank": 12, "document_id": "document_id", "event_type": "click", "result_type": "document"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.query_log() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_query_log_value_error(self): """ test_query_log_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/logs') mock_response = '{"matching_results": 16, "results": [{"environment_id": "environment_id", "customer_id": "customer_id", "document_type": "query", "natural_language_query": "natural_language_query", "document_results": {"results": [{"position": 8, "document_id": "document_id", "score": 5, "confidence": 10, "collection_id": "collection_id"}], "count": 5}, "created_timestamp": "2019-01-01T12:00:00", "client_timestamp": "2019-01-01T12:00:00", "query_id": "query_id", "session_token": "session_token", "collection_id": "collection_id", "display_rank": 12, "document_id": "document_id", "event_type": "click", "result_type": "document"}]}' 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.query_log(**req_copy) class TestGetMetricsQuery(): """ Test Class for get_metrics_query """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_metrics_query_all_params(self): """ get_metrics_query() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values start_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) end_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) result_type = 'document' # Invoke method response = service.get_metrics_query( start_time=start_time, end_time=end_time, result_type=result_type, 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 = urllib.parse.unquote_plus(query_string) assert 'result_type={}'.format(result_type) in query_string @responses.activate def test_get_metrics_query_required_params(self): """ test_get_metrics_query_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.get_metrics_query() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_metrics_query_value_error(self): """ test_get_metrics_query_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' 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_metrics_query(**req_copy) class TestGetMetricsQueryEvent(): """ Test Class for get_metrics_query_event """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_metrics_query_event_all_params(self): """ get_metrics_query_event() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries_with_event') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values start_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) end_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) result_type = 'document' # Invoke method response = service.get_metrics_query_event( start_time=start_time, end_time=end_time, result_type=result_type, 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 = urllib.parse.unquote_plus(query_string) assert 'result_type={}'.format(result_type) in query_string @responses.activate def test_get_metrics_query_event_required_params(self): """ test_get_metrics_query_event_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries_with_event') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.get_metrics_query_event() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_metrics_query_event_value_error(self): """ test_get_metrics_query_event_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries_with_event') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' 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_metrics_query_event(**req_copy) class TestGetMetricsQueryNoResults(): """ Test Class for get_metrics_query_no_results """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_metrics_query_no_results_all_params(self): """ get_metrics_query_no_results() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries_with_no_search_results') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values start_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) end_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) result_type = 'document' # Invoke method response = service.get_metrics_query_no_results( start_time=start_time, end_time=end_time, result_type=result_type, 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 = urllib.parse.unquote_plus(query_string) assert 'result_type={}'.format(result_type) in query_string @responses.activate def test_get_metrics_query_no_results_required_params(self): """ test_get_metrics_query_no_results_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries_with_no_search_results') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.get_metrics_query_no_results() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_metrics_query_no_results_value_error(self): """ test_get_metrics_query_no_results_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/number_of_queries_with_no_search_results') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' 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_metrics_query_no_results(**req_copy) class TestGetMetricsEventRate(): """ Test Class for get_metrics_event_rate """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_metrics_event_rate_all_params(self): """ get_metrics_event_rate() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/event_rate') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values start_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) end_time = datetime.fromtimestamp(1580236840.123456, timezone.utc) result_type = 'document' # Invoke method response = service.get_metrics_event_rate( start_time=start_time, end_time=end_time, result_type=result_type, 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 = urllib.parse.unquote_plus(query_string) assert 'result_type={}'.format(result_type) in query_string @responses.activate def test_get_metrics_event_rate_required_params(self): """ test_get_metrics_event_rate_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/event_rate') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.get_metrics_event_rate() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_metrics_event_rate_value_error(self): """ test_get_metrics_event_rate_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/event_rate') mock_response = '{"aggregations": [{"interval": "interval", "event_type": "event_type", "results": [{"key_as_string": "2019-01-01T12:00:00", "key": 3, "matching_results": 16, "event_rate": 10}]}]}' 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_metrics_event_rate(**req_copy) class TestGetMetricsQueryTokenEvent(): """ Test Class for get_metrics_query_token_event """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_metrics_query_token_event_all_params(self): """ get_metrics_query_token_event() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/top_query_tokens_with_event_rate') mock_response = '{"aggregations": [{"event_type": "event_type", "results": [{"key": "key", "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values count = 38 # Invoke method response = service.get_metrics_query_token_event( count=count, 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 = urllib.parse.unquote_plus(query_string) assert 'count={}'.format(count) in query_string @responses.activate def test_get_metrics_query_token_event_required_params(self): """ test_get_metrics_query_token_event_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/top_query_tokens_with_event_rate') mock_response = '{"aggregations": [{"event_type": "event_type", "results": [{"key": "key", "matching_results": 16, "event_rate": 10}]}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Invoke method response = service.get_metrics_query_token_event() # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_metrics_query_token_event_value_error(self): """ test_get_metrics_query_token_event_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/metrics/top_query_tokens_with_event_rate') mock_response = '{"aggregations": [{"event_type": "event_type", "results": [{"key": "key", "matching_results": 16, "event_rate": 10}]}]}' 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_metrics_query_token_event(**req_copy) # endregion ############################################################################## # End of Service: EventsAndFeedback ############################################################################## ############################################################################## # Start of Service: Credentials ############################################################################## # region class TestListCredentials(): """ Test Class for list_credentials """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_credentials_all_params(self): """ list_credentials() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials') mock_response = '{"credentials": [{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Invoke method response = service.list_credentials( environment_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_credentials_value_error(self): """ test_list_credentials_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials') mock_response = '{"credentials": [{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.list_credentials(**req_copy) class TestCreateCredentials(): """ Test Class for create_credentials """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_credentials_all_params(self): """ create_credentials() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials') mock_response = '{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a CredentialDetails model credential_details_model = {} credential_details_model['credential_type'] = 'oauth2' credential_details_model['client_id'] = 'testString' credential_details_model['enterprise_id'] = 'testString' credential_details_model['url'] = 'testString' credential_details_model['username'] = 'testString' credential_details_model['organization_url'] = 'testString' credential_details_model['site_collection.path'] = 'testString' credential_details_model['client_secret'] = 'testString' credential_details_model['public_key_id'] = 'testString' credential_details_model['private_key'] = 'testString' credential_details_model['passphrase'] = 'testString' credential_details_model['password'] = 'testString' credential_details_model['gateway_id'] = 'testString' credential_details_model['source_version'] = 'online' credential_details_model['web_application_url'] = 'testString' credential_details_model['domain'] = 'testString' credential_details_model['endpoint'] = 'testString' credential_details_model['access_key_id'] = 'testString' credential_details_model['secret_access_key'] = 'testString' # Set up parameter values environment_id = 'testString' source_type = 'box' credential_details = credential_details_model status = 'connected' # Invoke method response = service.create_credentials( environment_id, source_type=source_type, credential_details=credential_details, status=status, 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['source_type'] == 'box' assert req_body['credential_details'] == credential_details_model assert req_body['status'] == 'connected' @responses.activate def test_create_credentials_value_error(self): """ test_create_credentials_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials') mock_response = '{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a CredentialDetails model credential_details_model = {} credential_details_model['credential_type'] = 'oauth2' credential_details_model['client_id'] = 'testString' credential_details_model['enterprise_id'] = 'testString' credential_details_model['url'] = 'testString' credential_details_model['username'] = 'testString' credential_details_model['organization_url'] = 'testString' credential_details_model['site_collection.path'] = 'testString' credential_details_model['client_secret'] = 'testString' credential_details_model['public_key_id'] = 'testString' credential_details_model['private_key'] = 'testString' credential_details_model['passphrase'] = 'testString' credential_details_model['password'] = 'testString' credential_details_model['gateway_id'] = 'testString' credential_details_model['source_version'] = 'online' credential_details_model['web_application_url'] = 'testString' credential_details_model['domain'] = 'testString' credential_details_model['endpoint'] = 'testString' credential_details_model['access_key_id'] = 'testString' credential_details_model['secret_access_key'] = 'testString' # Set up parameter values environment_id = 'testString' source_type = 'box' credential_details = credential_details_model status = 'connected' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.create_credentials(**req_copy) class TestGetCredentials(): """ Test Class for get_credentials """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_credentials_all_params(self): """ get_credentials() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials/testString') mock_response = '{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' credential_id = 'testString' # Invoke method response = service.get_credentials( environment_id, credential_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_credentials_value_error(self): """ test_get_credentials_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials/testString') mock_response = '{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' credential_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "credential_id": credential_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_credentials(**req_copy) class TestUpdateCredentials(): """ Test Class for update_credentials """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_update_credentials_all_params(self): """ update_credentials() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials/testString') mock_response = '{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a CredentialDetails model credential_details_model = {} credential_details_model['credential_type'] = 'oauth2' credential_details_model['client_id'] = 'testString' credential_details_model['enterprise_id'] = 'testString' credential_details_model['url'] = 'testString' credential_details_model['username'] = 'testString' credential_details_model['organization_url'] = 'testString' credential_details_model['site_collection.path'] = 'testString' credential_details_model['client_secret'] = 'testString' credential_details_model['public_key_id'] = 'testString' credential_details_model['private_key'] = 'testString' credential_details_model['passphrase'] = 'testString' credential_details_model['password'] = 'testString' credential_details_model['gateway_id'] = 'testString' credential_details_model['source_version'] = 'online' credential_details_model['web_application_url'] = 'testString' credential_details_model['domain'] = 'testString' credential_details_model['endpoint'] = 'testString' credential_details_model['access_key_id'] = 'testString' credential_details_model['secret_access_key'] = 'testString' # Set up parameter values environment_id = 'testString' credential_id = 'testString' source_type = 'box' credential_details = credential_details_model status = 'connected' # Invoke method response = service.update_credentials( environment_id, credential_id, source_type=source_type, credential_details=credential_details, status=status, 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['source_type'] == 'box' assert req_body['credential_details'] == credential_details_model assert req_body['status'] == 'connected' @responses.activate def test_update_credentials_value_error(self): """ test_update_credentials_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials/testString') mock_response = '{"credential_id": "credential_id", "source_type": "box", "credential_details": {"credential_type": "oauth2", "client_id": "client_id", "enterprise_id": "enterprise_id", "url": "url", "username": "username", "organization_url": "organization_url", "site_collection.path": "site_collection_path", "client_secret": "client_secret", "public_key_id": "public_key_id", "private_key": "private_key", "passphrase": "passphrase", "password": "password", "gateway_id": "gateway_id", "source_version": "online", "web_application_url": "web_application_url", "domain": "domain", "endpoint": "endpoint", "access_key_id": "access_key_id", "secret_access_key": "secret_access_key"}, "status": "connected"}' responses.add(responses.PUT, url, body=mock_response, content_type='application/json', status=200) # Construct a dict representation of a CredentialDetails model credential_details_model = {} credential_details_model['credential_type'] = 'oauth2' credential_details_model['client_id'] = 'testString' credential_details_model['enterprise_id'] = 'testString' credential_details_model['url'] = 'testString' credential_details_model['username'] = 'testString' credential_details_model['organization_url'] = 'testString' credential_details_model['site_collection.path'] = 'testString' credential_details_model['client_secret'] = 'testString' credential_details_model['public_key_id'] = 'testString' credential_details_model['private_key'] = 'testString' credential_details_model['passphrase'] = 'testString' credential_details_model['password'] = 'testString' credential_details_model['gateway_id'] = 'testString' credential_details_model['source_version'] = 'online' credential_details_model['web_application_url'] = 'testString' credential_details_model['domain'] = 'testString' credential_details_model['endpoint'] = 'testString' credential_details_model['access_key_id'] = 'testString' credential_details_model['secret_access_key'] = 'testString' # Set up parameter values environment_id = 'testString' credential_id = 'testString' source_type = 'box' credential_details = credential_details_model status = 'connected' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "credential_id": credential_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.update_credentials(**req_copy) class TestDeleteCredentials(): """ Test Class for delete_credentials """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_credentials_all_params(self): """ delete_credentials() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials/testString') mock_response = '{"credential_id": "credential_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' credential_id = 'testString' # Invoke method response = service.delete_credentials( environment_id, credential_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_credentials_value_error(self): """ test_delete_credentials_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/credentials/testString') mock_response = '{"credential_id": "credential_id", "status": "deleted"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' credential_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "credential_id": credential_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.delete_credentials(**req_copy) # endregion ############################################################################## # End of Service: Credentials ############################################################################## ############################################################################## # Start of Service: GatewayConfiguration ############################################################################## # region class TestListGateways(): """ Test Class for list_gateways """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_list_gateways_all_params(self): """ list_gateways() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways') mock_response = '{"gateways": [{"gateway_id": "gateway_id", "name": "name", "status": "connected", "token": "token", "token_id": "token_id"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Invoke method response = service.list_gateways( environment_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_list_gateways_value_error(self): """ test_list_gateways_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways') mock_response = '{"gateways": [{"gateway_id": "gateway_id", "name": "name", "status": "connected", "token": "token", "token_id": "token_id"}]}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.list_gateways(**req_copy) class TestCreateGateway(): """ Test Class for create_gateway """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_create_gateway_all_params(self): """ create_gateway() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways') mock_response = '{"gateway_id": "gateway_id", "name": "name", "status": "connected", "token": "token", "token_id": "token_id"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' name = 'testString' # Invoke method response = service.create_gateway( environment_id, name=name, 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['name'] == 'testString' @responses.activate def test_create_gateway_required_params(self): """ test_create_gateway_required_params() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways') mock_response = '{"gateway_id": "gateway_id", "name": "name", "status": "connected", "token": "token", "token_id": "token_id"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Invoke method response = service.create_gateway( environment_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_create_gateway_value_error(self): """ test_create_gateway_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways') mock_response = '{"gateway_id": "gateway_id", "name": "name", "status": "connected", "token": "token", "token_id": "token_id"}' responses.add(responses.POST, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_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.create_gateway(**req_copy) class TestGetGateway(): """ Test Class for get_gateway """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_get_gateway_all_params(self): """ get_gateway() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways/testString') mock_response = '{"gateway_id": "gateway_id", "name": "name", "status": "connected", "token": "token", "token_id": "token_id"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' gateway_id = 'testString' # Invoke method response = service.get_gateway( environment_id, gateway_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_get_gateway_value_error(self): """ test_get_gateway_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways/testString') mock_response = '{"gateway_id": "gateway_id", "name": "name", "status": "connected", "token": "token", "token_id": "token_id"}' responses.add(responses.GET, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' gateway_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "gateway_id": gateway_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_gateway(**req_copy) class TestDeleteGateway(): """ Test Class for delete_gateway """ def preprocess_url(self, request_url: str): """ Preprocess the request URL to ensure the mock response will be found. """ if re.fullmatch('.*/+', request_url) is None: return request_url else: return re.compile(request_url.rstrip('/') + '/+') @responses.activate def test_delete_gateway_all_params(self): """ delete_gateway() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways/testString') mock_response = '{"gateway_id": "gateway_id", "status": "status"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' gateway_id = 'testString' # Invoke method response = service.delete_gateway( environment_id, gateway_id, headers={} ) # Check for correct operation assert len(responses.calls) == 1 assert response.status_code == 200 @responses.activate def test_delete_gateway_value_error(self): """ test_delete_gateway_value_error() """ # Set up mock url = self.preprocess_url(base_url + '/v1/environments/testString/gateways/testString') mock_response = '{"gateway_id": "gateway_id", "status": "status"}' responses.add(responses.DELETE, url, body=mock_response, content_type='application/json', status=200) # Set up parameter values environment_id = 'testString' gateway_id = 'testString' # Pass in all but one required param and check for a ValueError req_param_dict = { "environment_id": environment_id, "gateway_id": gateway_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.delete_gateway(**req_copy) # endregion ############################################################################## # End of Service: GatewayConfiguration ############################################################################## ############################################################################## # Start of Model Tests ############################################################################## # region class TestAggregationResult(): """ Test Class for AggregationResult """ def test_aggregation_result_serialization(self): """ Test serialization/deserialization for AggregationResult """ # Construct a json representation of a AggregationResult model aggregation_result_model_json = {} aggregation_result_model_json['key'] = 'testString' aggregation_result_model_json['matching_results'] = 38 # Construct a model instance of AggregationResult by calling from_dict on the json representation aggregation_result_model = AggregationResult.from_dict(aggregation_result_model_json) assert aggregation_result_model != False # Construct a model instance of AggregationResult by calling from_dict on the json representation aggregation_result_model_dict = AggregationResult.from_dict(aggregation_result_model_json).__dict__ aggregation_result_model2 = AggregationResult(**aggregation_result_model_dict) # Verify the model instances are equivalent assert aggregation_result_model == aggregation_result_model2 # Convert model instance back to dict and verify no loss of data aggregation_result_model_json2 = aggregation_result_model.to_dict() assert aggregation_result_model_json2 == aggregation_result_model_json class TestCollection(): """ Test Class for Collection """ def test_collection_serialization(self): """ Test serialization/deserialization for Collection """ # Construct dict forms of any model objects needed in order to build this model. document_counts_model = {} # DocumentCounts document_counts_model['available'] = 0 document_counts_model['processing'] = 0 document_counts_model['failed'] = 0 document_counts_model['pending'] = 26 collection_disk_usage_model = {} # CollectionDiskUsage collection_disk_usage_model['used_bytes'] = 260 training_status_model = {} # TrainingStatus training_status_model['total_examples'] = 0 training_status_model['available'] = False training_status_model['processing'] = False training_status_model['minimum_queries_added'] = False training_status_model['minimum_examples_added'] = False training_status_model['sufficient_label_diversity'] = False training_status_model['notices'] = 0 training_status_model['successfully_trained'] = '2020-01-28T18:40:40.123456Z' training_status_model['data_updated'] = '2020-01-28T18:40:40.123456Z' source_status_model = {} # SourceStatus source_status_model['status'] = 'complete' source_status_model['next_crawl'] = '2020-01-28T18:40:40.123456Z' collection_crawl_status_model = {} # CollectionCrawlStatus collection_crawl_status_model['source_crawl'] = source_status_model sdu_status_custom_fields_model = {} # SduStatusCustomFields sdu_status_custom_fields_model['defined'] = 26 sdu_status_custom_fields_model['maximum_allowed'] = 5 sdu_status_model = {} # SduStatus sdu_status_model['enabled'] = True sdu_status_model['total_annotated_pages'] = 0 sdu_status_model['total_pages'] = 0 sdu_status_model['total_documents'] = 0 sdu_status_model['custom_fields'] = sdu_status_custom_fields_model # Construct a json representation of a Collection model collection_model_json = {} collection_model_json['collection_id'] = 'testString' collection_model_json['name'] = 'testString' collection_model_json['description'] = 'testString' collection_model_json['created'] = '2020-01-28T18:40:40.123456Z' collection_model_json['updated'] = '2020-01-28T18:40:40.123456Z' collection_model_json['status'] = 'active' collection_model_json['configuration_id'] = 'testString' collection_model_json['language'] = 'testString' collection_model_json['document_counts'] = document_counts_model collection_model_json['disk_usage'] = collection_disk_usage_model collection_model_json['training_status'] = training_status_model collection_model_json['crawl_status'] = collection_crawl_status_model collection_model_json['smart_document_understanding'] = sdu_status_model # Construct a model instance of Collection by calling from_dict on the json representation collection_model = Collection.from_dict(collection_model_json) assert collection_model != False # Construct a model instance of Collection by calling from_dict on the json representation collection_model_dict = Collection.from_dict(collection_model_json).__dict__ collection_model2 = Collection(**collection_model_dict) # Verify the model instances are equivalent assert collection_model == collection_model2 # Convert model instance back to dict and verify no loss of data collection_model_json2 = collection_model.to_dict() assert collection_model_json2 == collection_model_json class TestCollectionCrawlStatus(): """ Test Class for CollectionCrawlStatus """ def test_collection_crawl_status_serialization(self): """ Test serialization/deserialization for CollectionCrawlStatus """ # Construct dict forms of any model objects needed in order to build this model. source_status_model = {} # SourceStatus source_status_model['status'] = 'running' source_status_model['next_crawl'] = '2020-01-28T18:40:40.123456Z' # Construct a json representation of a CollectionCrawlStatus model collection_crawl_status_model_json = {} collection_crawl_status_model_json['source_crawl'] = source_status_model # Construct a model instance of CollectionCrawlStatus by calling from_dict on the json representation collection_crawl_status_model = CollectionCrawlStatus.from_dict(collection_crawl_status_model_json) assert collection_crawl_status_model != False # Construct a model instance of CollectionCrawlStatus by calling from_dict on the json representation collection_crawl_status_model_dict = CollectionCrawlStatus.from_dict(collection_crawl_status_model_json).__dict__ collection_crawl_status_model2 = CollectionCrawlStatus(**collection_crawl_status_model_dict) # Verify the model instances are equivalent assert collection_crawl_status_model == collection_crawl_status_model2 # Convert model instance back to dict and verify no loss of data collection_crawl_status_model_json2 = collection_crawl_status_model.to_dict() assert collection_crawl_status_model_json2 == collection_crawl_status_model_json class TestCollectionDiskUsage(): """ Test Class for CollectionDiskUsage """ def test_collection_disk_usage_serialization(self): """ Test serialization/deserialization for CollectionDiskUsage """ # Construct a json representation of a CollectionDiskUsage model collection_disk_usage_model_json = {} collection_disk_usage_model_json['used_bytes'] = 38 # Construct a model instance of CollectionDiskUsage by calling from_dict on the json representation collection_disk_usage_model = CollectionDiskUsage.from_dict(collection_disk_usage_model_json) assert collection_disk_usage_model != False # Construct a model instance of CollectionDiskUsage by calling from_dict on the json representation collection_disk_usage_model_dict = CollectionDiskUsage.from_dict(collection_disk_usage_model_json).__dict__ collection_disk_usage_model2 = CollectionDiskUsage(**collection_disk_usage_model_dict) # Verify the model instances are equivalent assert collection_disk_usage_model == collection_disk_usage_model2 # Convert model instance back to dict and verify no loss of data collection_disk_usage_model_json2 = collection_disk_usage_model.to_dict() assert collection_disk_usage_model_json2 == collection_disk_usage_model_json class TestCollectionUsage(): """ Test Class for CollectionUsage """ def test_collection_usage_serialization(self): """ Test serialization/deserialization for CollectionUsage """ # Construct a json representation of a CollectionUsage model collection_usage_model_json = {} collection_usage_model_json['available'] = 38 collection_usage_model_json['maximum_allowed'] = 38 # Construct a model instance of CollectionUsage by calling from_dict on the json representation collection_usage_model = CollectionUsage.from_dict(collection_usage_model_json) assert collection_usage_model != False # Construct a model instance of CollectionUsage by calling from_dict on the json representation collection_usage_model_dict = CollectionUsage.from_dict(collection_usage_model_json).__dict__ collection_usage_model2 = CollectionUsage(**collection_usage_model_dict) # Verify the model instances are equivalent assert collection_usage_model == collection_usage_model2 # Convert model instance back to dict and verify no loss of data collection_usage_model_json2 = collection_usage_model.to_dict() assert collection_usage_model_json2 == collection_usage_model_json class TestCompletions(): """ Test Class for Completions """ def test_completions_serialization(self): """ Test serialization/deserialization for Completions """ # Construct a json representation of a Completions model completions_model_json = {} completions_model_json['completions'] = ['testString'] # Construct a model instance of Completions by calling from_dict on the json representation completions_model = Completions.from_dict(completions_model_json) assert completions_model != False # Construct a model instance of Completions by calling from_dict on the json representation completions_model_dict = Completions.from_dict(completions_model_json).__dict__ completions_model2 = Completions(**completions_model_dict) # Verify the model instances are equivalent assert completions_model == completions_model2 # Convert model instance back to dict and verify no loss of data completions_model_json2 = completions_model.to_dict() assert completions_model_json2 == completions_model_json class TestConfiguration(): """ Test Class for Configuration """ def test_configuration_serialization(self): """ Test serialization/deserialization for Configuration """ # Construct dict forms of any model objects needed in order to build this model. font_setting_model = {} # FontSetting font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' pdf_heading_detection_model = {} # PdfHeadingDetection pdf_heading_detection_model['fonts'] = [font_setting_model] pdf_settings_model = {} # PdfSettings pdf_settings_model['heading'] = pdf_heading_detection_model word_style_model = {} # WordStyle word_style_model['level'] = 38 word_style_model['names'] = ['testString'] word_heading_detection_model = {} # WordHeadingDetection word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] word_settings_model = {} # WordSettings word_settings_model['heading'] = word_heading_detection_model x_path_patterns_model = {} # XPathPatterns x_path_patterns_model['xpaths'] = ['testString'] html_settings_model = {} # HtmlSettings html_settings_model['exclude_tags_completely'] = ['testString'] html_settings_model['exclude_tags_keep_content'] = ['testString'] html_settings_model['keep_content'] = x_path_patterns_model html_settings_model['exclude_content'] = x_path_patterns_model html_settings_model['keep_tag_attributes'] = ['testString'] html_settings_model['exclude_tag_attributes'] = ['testString'] segment_settings_model = {} # SegmentSettings segment_settings_model['enabled'] = True segment_settings_model['selector_tags'] = ['testString'] segment_settings_model['annotated_fields'] = ['testString'] normalization_operation_model = {} # NormalizationOperation normalization_operation_model['operation'] = 'move' normalization_operation_model['source_field'] = 'extracted_metadata.title' normalization_operation_model['destination_field'] = 'metadata.title' conversions_model = {} # Conversions conversions_model['pdf'] = pdf_settings_model conversions_model['word'] = word_settings_model conversions_model['html'] = html_settings_model conversions_model['segment'] = segment_settings_model conversions_model['json_normalizations'] = [normalization_operation_model] conversions_model['image_text_recognition'] = True nlu_enrichment_keywords_model = {} # NluEnrichmentKeywords nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = False nlu_enrichment_keywords_model['limit'] = 50 nlu_enrichment_entities_model = {} # NluEnrichmentEntities nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = False nlu_enrichment_entities_model['limit'] = 50 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'WKS-model-id' nlu_enrichment_sentiment_model = {} # NluEnrichmentSentiment nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] nlu_enrichment_emotion_model = {} # NluEnrichmentEmotion nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] nlu_enrichment_semantic_roles_model = {} # NluEnrichmentSemanticRoles nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 50 nlu_enrichment_relations_model = {} # NluEnrichmentRelations nlu_enrichment_relations_model['model'] = 'WKS-model-id' nlu_enrichment_concepts_model = {} # NluEnrichmentConcepts nlu_enrichment_concepts_model['limit'] = 8 nlu_enrichment_features_model = {} # NluEnrichmentFeatures nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model enrichment_options_model = {} # EnrichmentOptions enrichment_options_model['features'] = nlu_enrichment_features_model enrichment_options_model['language'] = 'ar' enrichment_options_model['model'] = 'testString' enrichment_model = {} # Enrichment enrichment_model['description'] = 'testString' enrichment_model['destination_field'] = 'enriched_title' enrichment_model['source_field'] = 'title' enrichment_model['overwrite'] = True enrichment_model['enrichment'] = 'natural_language_understanding' enrichment_model['ignore_downstream_errors'] = True enrichment_model['options'] = enrichment_options_model source_schedule_model = {} # SourceSchedule source_schedule_model['enabled'] = True source_schedule_model['time_zone'] = 'America/New_York' source_schedule_model['frequency'] = 'weekly' source_options_folder_model = {} # SourceOptionsFolder source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 source_options_object_model = {} # SourceOptionsObject source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 source_options_site_coll_model = {} # SourceOptionsSiteColl source_options_site_coll_model['site_collection_path'] = '/sites/TestSiteA' source_options_site_coll_model['limit'] = 10 source_options_web_crawl_model = {} # SourceOptionsWebCrawl source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] source_options_buckets_model = {} # SourceOptionsBuckets source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 source_options_model = {} # SourceOptions source_options_model['folders'] = [source_options_folder_model] source_options_model['objects'] = [source_options_object_model] source_options_model['site_collections'] = [source_options_site_coll_model] source_options_model['urls'] = [source_options_web_crawl_model] source_options_model['buckets'] = [source_options_buckets_model] source_options_model['crawl_all_buckets'] = True source_model = {} # Source source_model['type'] = 'salesforce' source_model['credential_id'] = '00ad0000-0000-11e8-ba89-0ed5f00f718b' source_model['schedule'] = source_schedule_model source_model['options'] = source_options_model # Construct a json representation of a Configuration model configuration_model_json = {} configuration_model_json['configuration_id'] = 'testString' configuration_model_json['name'] = 'testString' configuration_model_json['created'] = '2020-01-28T18:40:40.123456Z' configuration_model_json['updated'] = '2020-01-28T18:40:40.123456Z' configuration_model_json['description'] = 'testString' configuration_model_json['conversions'] = conversions_model configuration_model_json['enrichments'] = [enrichment_model] configuration_model_json['normalizations'] = [normalization_operation_model] configuration_model_json['source'] = source_model # Construct a model instance of Configuration by calling from_dict on the json representation configuration_model = Configuration.from_dict(configuration_model_json) assert configuration_model != False # Construct a model instance of Configuration by calling from_dict on the json representation configuration_model_dict = Configuration.from_dict(configuration_model_json).__dict__ configuration_model2 = Configuration(**configuration_model_dict) # Verify the model instances are equivalent assert configuration_model == configuration_model2 # Convert model instance back to dict and verify no loss of data configuration_model_json2 = configuration_model.to_dict() assert configuration_model_json2 == configuration_model_json class TestConversions(): """ Test Class for Conversions """ def test_conversions_serialization(self): """ Test serialization/deserialization for Conversions """ # Construct dict forms of any model objects needed in order to build this model. font_setting_model = {} # FontSetting font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' pdf_heading_detection_model = {} # PdfHeadingDetection pdf_heading_detection_model['fonts'] = [font_setting_model] pdf_settings_model = {} # PdfSettings pdf_settings_model['heading'] = pdf_heading_detection_model word_style_model = {} # WordStyle word_style_model['level'] = 38 word_style_model['names'] = ['testString'] word_heading_detection_model = {} # WordHeadingDetection word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] word_settings_model = {} # WordSettings word_settings_model['heading'] = word_heading_detection_model x_path_patterns_model = {} # XPathPatterns x_path_patterns_model['xpaths'] = ['testString'] html_settings_model = {} # HtmlSettings html_settings_model['exclude_tags_completely'] = ['testString'] html_settings_model['exclude_tags_keep_content'] = ['testString'] html_settings_model['keep_content'] = x_path_patterns_model html_settings_model['exclude_content'] = x_path_patterns_model html_settings_model['keep_tag_attributes'] = ['testString'] html_settings_model['exclude_tag_attributes'] = ['testString'] segment_settings_model = {} # SegmentSettings segment_settings_model['enabled'] = True segment_settings_model['selector_tags'] = ['testString'] segment_settings_model['annotated_fields'] = ['testString'] normalization_operation_model = {} # NormalizationOperation normalization_operation_model['operation'] = 'copy' normalization_operation_model['source_field'] = 'testString' normalization_operation_model['destination_field'] = 'testString' # Construct a json representation of a Conversions model conversions_model_json = {} conversions_model_json['pdf'] = pdf_settings_model conversions_model_json['word'] = word_settings_model conversions_model_json['html'] = html_settings_model conversions_model_json['segment'] = segment_settings_model conversions_model_json['json_normalizations'] = [normalization_operation_model] conversions_model_json['image_text_recognition'] = True # Construct a model instance of Conversions by calling from_dict on the json representation conversions_model = Conversions.from_dict(conversions_model_json) assert conversions_model != False # Construct a model instance of Conversions by calling from_dict on the json representation conversions_model_dict = Conversions.from_dict(conversions_model_json).__dict__ conversions_model2 = Conversions(**conversions_model_dict) # Verify the model instances are equivalent assert conversions_model == conversions_model2 # Convert model instance back to dict and verify no loss of data conversions_model_json2 = conversions_model.to_dict() assert conversions_model_json2 == conversions_model_json class TestCreateEventResponse(): """ Test Class for CreateEventResponse """ def test_create_event_response_serialization(self): """ Test serialization/deserialization for CreateEventResponse """ # Construct dict forms of any model objects needed in order to build this model. event_data_model = {} # EventData event_data_model['environment_id'] = 'testString' event_data_model['session_token'] = 'testString' event_data_model['client_timestamp'] = '2020-01-28T18:40:40.123456Z' event_data_model['display_rank'] = 38 event_data_model['collection_id'] = 'testString' event_data_model['document_id'] = 'testString' event_data_model['query_id'] = 'testString' # Construct a json representation of a CreateEventResponse model create_event_response_model_json = {} create_event_response_model_json['type'] = 'click' create_event_response_model_json['data'] = event_data_model # Construct a model instance of CreateEventResponse by calling from_dict on the json representation create_event_response_model = CreateEventResponse.from_dict(create_event_response_model_json) assert create_event_response_model != False # Construct a model instance of CreateEventResponse by calling from_dict on the json representation create_event_response_model_dict = CreateEventResponse.from_dict(create_event_response_model_json).__dict__ create_event_response_model2 = CreateEventResponse(**create_event_response_model_dict) # Verify the model instances are equivalent assert create_event_response_model == create_event_response_model2 # Convert model instance back to dict and verify no loss of data create_event_response_model_json2 = create_event_response_model.to_dict() assert create_event_response_model_json2 == create_event_response_model_json class TestCredentialDetails(): """ Test Class for CredentialDetails """ def test_credential_details_serialization(self): """ Test serialization/deserialization for CredentialDetails """ # Construct a json representation of a CredentialDetails model credential_details_model_json = {} credential_details_model_json['credential_type'] = 'oauth2' credential_details_model_json['client_id'] = 'testString' credential_details_model_json['enterprise_id'] = 'testString' credential_details_model_json['url'] = 'testString' credential_details_model_json['username'] = 'testString' credential_details_model_json['organization_url'] = 'testString' credential_details_model_json['site_collection.path'] = 'testString' credential_details_model_json['client_secret'] = 'testString' credential_details_model_json['public_key_id'] = 'testString' credential_details_model_json['private_key'] = 'testString' credential_details_model_json['passphrase'] = 'testString' credential_details_model_json['password'] = 'testString' credential_details_model_json['gateway_id'] = 'testString' credential_details_model_json['source_version'] = 'online' credential_details_model_json['web_application_url'] = 'testString' credential_details_model_json['domain'] = 'testString' credential_details_model_json['endpoint'] = 'testString' credential_details_model_json['access_key_id'] = 'testString' credential_details_model_json['secret_access_key'] = 'testString' # Construct a model instance of CredentialDetails by calling from_dict on the json representation credential_details_model = CredentialDetails.from_dict(credential_details_model_json) assert credential_details_model != False # Construct a model instance of CredentialDetails by calling from_dict on the json representation credential_details_model_dict = CredentialDetails.from_dict(credential_details_model_json).__dict__ credential_details_model2 = CredentialDetails(**credential_details_model_dict) # Verify the model instances are equivalent assert credential_details_model == credential_details_model2 # Convert model instance back to dict and verify no loss of data credential_details_model_json2 = credential_details_model.to_dict() assert credential_details_model_json2 == credential_details_model_json class TestCredentials(): """ Test Class for Credentials """ def test_credentials_serialization(self): """ Test serialization/deserialization for Credentials """ # Construct dict forms of any model objects needed in order to build this model. credential_details_model = {} # CredentialDetails credential_details_model['credential_type'] = 'username_password' credential_details_model['client_id'] = 'testString' credential_details_model['enterprise_id'] = 'testString' credential_details_model['url'] = 'login.salesforce.com' credential_details_model['username'] = 'user@email.address' credential_details_model['organization_url'] = 'testString' credential_details_model['site_collection.path'] = 'testString' credential_details_model['client_secret'] = 'testString' credential_details_model['public_key_id'] = 'testString' credential_details_model['private_key'] = 'testString' credential_details_model['passphrase'] = 'testString' credential_details_model['password'] = 'testString' credential_details_model['gateway_id'] = 'testString' credential_details_model['source_version'] = 'online' credential_details_model['web_application_url'] = 'testString' credential_details_model['domain'] = 'testString' credential_details_model['endpoint'] = 'testString' credential_details_model['access_key_id'] = 'testString' credential_details_model['secret_access_key'] = 'testString' # Construct a json representation of a Credentials model credentials_model_json = {} credentials_model_json['credential_id'] = 'testString' credentials_model_json['source_type'] = 'box' credentials_model_json['credential_details'] = credential_details_model credentials_model_json['status'] = 'connected' # Construct a model instance of Credentials by calling from_dict on the json representation credentials_model = Credentials.from_dict(credentials_model_json) assert credentials_model != False # Construct a model instance of Credentials by calling from_dict on the json representation credentials_model_dict = Credentials.from_dict(credentials_model_json).__dict__ credentials_model2 = Credentials(**credentials_model_dict) # Verify the model instances are equivalent assert credentials_model == credentials_model2 # Convert model instance back to dict and verify no loss of data credentials_model_json2 = credentials_model.to_dict() assert credentials_model_json2 == credentials_model_json class TestCredentialsList(): """ Test Class for CredentialsList """ def test_credentials_list_serialization(self): """ Test serialization/deserialization for CredentialsList """ # Construct dict forms of any model objects needed in order to build this model. credential_details_model = {} # CredentialDetails credential_details_model['credential_type'] = 'username_password' credential_details_model['client_id'] = 'testString' credential_details_model['enterprise_id'] = 'testString' credential_details_model['url'] = 'login.salesforce.com' credential_details_model['username'] = 'user@email.address' credential_details_model['organization_url'] = 'testString' credential_details_model['site_collection.path'] = 'testString' credential_details_model['client_secret'] = 'testString' credential_details_model['public_key_id'] = 'testString' credential_details_model['private_key'] = 'testString' credential_details_model['passphrase'] = 'testString' credential_details_model['password'] = 'testString' credential_details_model['gateway_id'] = 'testString' credential_details_model['source_version'] = 'online' credential_details_model['web_application_url'] = 'testString' credential_details_model['domain'] = 'testString' credential_details_model['endpoint'] = 'testString' credential_details_model['access_key_id'] = 'testString' credential_details_model['secret_access_key'] = 'testString' credentials_model = {} # Credentials credentials_model['credential_id'] = '00000d8c-0000-00e8-ba89-0ed5f89f718b' credentials_model['source_type'] = 'salesforce' credentials_model['credential_details'] = credential_details_model credentials_model['status'] = 'connected' # Construct a json representation of a CredentialsList model credentials_list_model_json = {} credentials_list_model_json['credentials'] = [credentials_model] # Construct a model instance of CredentialsList by calling from_dict on the json representation credentials_list_model = CredentialsList.from_dict(credentials_list_model_json) assert credentials_list_model != False # Construct a model instance of CredentialsList by calling from_dict on the json representation credentials_list_model_dict = CredentialsList.from_dict(credentials_list_model_json).__dict__ credentials_list_model2 = CredentialsList(**credentials_list_model_dict) # Verify the model instances are equivalent assert credentials_list_model == credentials_list_model2 # Convert model instance back to dict and verify no loss of data credentials_list_model_json2 = credentials_list_model.to_dict() assert credentials_list_model_json2 == credentials_list_model_json class TestDeleteCollectionResponse(): """ Test Class for DeleteCollectionResponse """ def test_delete_collection_response_serialization(self): """ Test serialization/deserialization for DeleteCollectionResponse """ # Construct a json representation of a DeleteCollectionResponse model delete_collection_response_model_json = {} delete_collection_response_model_json['collection_id'] = 'testString' delete_collection_response_model_json['status'] = 'deleted' # Construct a model instance of DeleteCollectionResponse by calling from_dict on the json representation delete_collection_response_model = DeleteCollectionResponse.from_dict(delete_collection_response_model_json) assert delete_collection_response_model != False # Construct a model instance of DeleteCollectionResponse by calling from_dict on the json representation delete_collection_response_model_dict = DeleteCollectionResponse.from_dict(delete_collection_response_model_json).__dict__ delete_collection_response_model2 = DeleteCollectionResponse(**delete_collection_response_model_dict) # Verify the model instances are equivalent assert delete_collection_response_model == delete_collection_response_model2 # Convert model instance back to dict and verify no loss of data delete_collection_response_model_json2 = delete_collection_response_model.to_dict() assert delete_collection_response_model_json2 == delete_collection_response_model_json class TestDeleteConfigurationResponse(): """ Test Class for DeleteConfigurationResponse """ def test_delete_configuration_response_serialization(self): """ Test serialization/deserialization for DeleteConfigurationResponse """ # Construct dict forms of any model objects needed in order to build this model. notice_model = {} # Notice notice_model['notice_id'] = 'configuration_in_use' notice_model['created'] = '2020-01-28T18:40:40.123456Z' notice_model['document_id'] = 'testString' notice_model['query_id'] = 'testString' notice_model['severity'] = 'warning' notice_model['step'] = 'testString' notice_model['description'] = 'The configuration was deleted, but it is referenced by one or more collections.' # Construct a json representation of a DeleteConfigurationResponse model delete_configuration_response_model_json = {} delete_configuration_response_model_json['configuration_id'] = 'testString' delete_configuration_response_model_json['status'] = 'deleted' delete_configuration_response_model_json['notices'] = [notice_model] # Construct a model instance of DeleteConfigurationResponse by calling from_dict on the json representation delete_configuration_response_model = DeleteConfigurationResponse.from_dict(delete_configuration_response_model_json) assert delete_configuration_response_model != False # Construct a model instance of DeleteConfigurationResponse by calling from_dict on the json representation delete_configuration_response_model_dict = DeleteConfigurationResponse.from_dict(delete_configuration_response_model_json).__dict__ delete_configuration_response_model2 = DeleteConfigurationResponse(**delete_configuration_response_model_dict) # Verify the model instances are equivalent assert delete_configuration_response_model == delete_configuration_response_model2 # Convert model instance back to dict and verify no loss of data delete_configuration_response_model_json2 = delete_configuration_response_model.to_dict() assert delete_configuration_response_model_json2 == delete_configuration_response_model_json class TestDeleteCredentials(): """ Test Class for DeleteCredentials """ def test_delete_credentials_serialization(self): """ Test serialization/deserialization for DeleteCredentials """ # Construct a json representation of a DeleteCredentials model delete_credentials_model_json = {} delete_credentials_model_json['credential_id'] = 'testString' delete_credentials_model_json['status'] = 'deleted' # Construct a model instance of DeleteCredentials by calling from_dict on the json representation delete_credentials_model = DeleteCredentials.from_dict(delete_credentials_model_json) assert delete_credentials_model != False # Construct a model instance of DeleteCredentials by calling from_dict on the json representation delete_credentials_model_dict = DeleteCredentials.from_dict(delete_credentials_model_json).__dict__ delete_credentials_model2 = DeleteCredentials(**delete_credentials_model_dict) # Verify the model instances are equivalent assert delete_credentials_model == delete_credentials_model2 # Convert model instance back to dict and verify no loss of data delete_credentials_model_json2 = delete_credentials_model.to_dict() assert delete_credentials_model_json2 == delete_credentials_model_json class TestDeleteDocumentResponse(): """ Test Class for DeleteDocumentResponse """ def test_delete_document_response_serialization(self): """ Test serialization/deserialization for DeleteDocumentResponse """ # Construct a json representation of a DeleteDocumentResponse model delete_document_response_model_json = {} delete_document_response_model_json['document_id'] = 'testString' delete_document_response_model_json['status'] = 'deleted' # Construct a model instance of DeleteDocumentResponse by calling from_dict on the json representation delete_document_response_model = DeleteDocumentResponse.from_dict(delete_document_response_model_json) assert delete_document_response_model != False # Construct a model instance of DeleteDocumentResponse by calling from_dict on the json representation delete_document_response_model_dict = DeleteDocumentResponse.from_dict(delete_document_response_model_json).__dict__ delete_document_response_model2 = DeleteDocumentResponse(**delete_document_response_model_dict) # Verify the model instances are equivalent assert delete_document_response_model == delete_document_response_model2 # Convert model instance back to dict and verify no loss of data delete_document_response_model_json2 = delete_document_response_model.to_dict() assert delete_document_response_model_json2 == delete_document_response_model_json class TestDeleteEnvironmentResponse(): """ Test Class for DeleteEnvironmentResponse """ def test_delete_environment_response_serialization(self): """ Test serialization/deserialization for DeleteEnvironmentResponse """ # Construct a json representation of a DeleteEnvironmentResponse model delete_environment_response_model_json = {} delete_environment_response_model_json['environment_id'] = 'testString' delete_environment_response_model_json['status'] = 'deleted' # Construct a model instance of DeleteEnvironmentResponse by calling from_dict on the json representation delete_environment_response_model = DeleteEnvironmentResponse.from_dict(delete_environment_response_model_json) assert delete_environment_response_model != False # Construct a model instance of DeleteEnvironmentResponse by calling from_dict on the json representation delete_environment_response_model_dict = DeleteEnvironmentResponse.from_dict(delete_environment_response_model_json).__dict__ delete_environment_response_model2 = DeleteEnvironmentResponse(**delete_environment_response_model_dict) # Verify the model instances are equivalent assert delete_environment_response_model == delete_environment_response_model2 # Convert model instance back to dict and verify no loss of data delete_environment_response_model_json2 = delete_environment_response_model.to_dict() assert delete_environment_response_model_json2 == delete_environment_response_model_json class TestDiskUsage(): """ Test Class for DiskUsage """ def test_disk_usage_serialization(self): """ Test serialization/deserialization for DiskUsage """ # Construct a json representation of a DiskUsage model disk_usage_model_json = {} disk_usage_model_json['used_bytes'] = 38 disk_usage_model_json['maximum_allowed_bytes'] = 38 # Construct a model instance of DiskUsage by calling from_dict on the json representation disk_usage_model = DiskUsage.from_dict(disk_usage_model_json) assert disk_usage_model != False # Construct a model instance of DiskUsage by calling from_dict on the json representation disk_usage_model_dict = DiskUsage.from_dict(disk_usage_model_json).__dict__ disk_usage_model2 = DiskUsage(**disk_usage_model_dict) # Verify the model instances are equivalent assert disk_usage_model == disk_usage_model2 # Convert model instance back to dict and verify no loss of data disk_usage_model_json2 = disk_usage_model.to_dict() assert disk_usage_model_json2 == disk_usage_model_json class TestDocumentAccepted(): """ Test Class for DocumentAccepted """ def test_document_accepted_serialization(self): """ Test serialization/deserialization for DocumentAccepted """ # Construct dict forms of any model objects needed in order to build this model. notice_model = {} # Notice notice_model['notice_id'] = 'testString' notice_model['created'] = '2020-01-28T18:40:40.123456Z' notice_model['document_id'] = 'testString' notice_model['query_id'] = 'testString' notice_model['severity'] = 'warning' notice_model['step'] = 'testString' notice_model['description'] = 'testString' # Construct a json representation of a DocumentAccepted model document_accepted_model_json = {} document_accepted_model_json['document_id'] = 'testString' document_accepted_model_json['status'] = 'processing' document_accepted_model_json['notices'] = [notice_model] # Construct a model instance of DocumentAccepted by calling from_dict on the json representation document_accepted_model = DocumentAccepted.from_dict(document_accepted_model_json) assert document_accepted_model != False # Construct a model instance of DocumentAccepted by calling from_dict on the json representation document_accepted_model_dict = DocumentAccepted.from_dict(document_accepted_model_json).__dict__ document_accepted_model2 = DocumentAccepted(**document_accepted_model_dict) # Verify the model instances are equivalent assert document_accepted_model == document_accepted_model2 # Convert model instance back to dict and verify no loss of data document_accepted_model_json2 = document_accepted_model.to_dict() assert document_accepted_model_json2 == document_accepted_model_json class TestDocumentCounts(): """ Test Class for DocumentCounts """ def test_document_counts_serialization(self): """ Test serialization/deserialization for DocumentCounts """ # Construct a json representation of a DocumentCounts model document_counts_model_json = {} document_counts_model_json['available'] = 26 document_counts_model_json['processing'] = 26 document_counts_model_json['failed'] = 26 document_counts_model_json['pending'] = 26 # Construct a model instance of DocumentCounts by calling from_dict on the json representation document_counts_model = DocumentCounts.from_dict(document_counts_model_json) assert document_counts_model != False # Construct a model instance of DocumentCounts by calling from_dict on the json representation document_counts_model_dict = DocumentCounts.from_dict(document_counts_model_json).__dict__ document_counts_model2 = DocumentCounts(**document_counts_model_dict) # Verify the model instances are equivalent assert document_counts_model == document_counts_model2 # Convert model instance back to dict and verify no loss of data document_counts_model_json2 = document_counts_model.to_dict() assert document_counts_model_json2 == document_counts_model_json class TestDocumentStatus(): """ Test Class for DocumentStatus """ def test_document_status_serialization(self): """ Test serialization/deserialization for DocumentStatus """ # Construct dict forms of any model objects needed in order to build this model. notice_model = {} # Notice notice_model['notice_id'] = 'index_342' notice_model['created'] = '2020-01-28T18:40:40.123456Z' notice_model['document_id'] = 'f1360220-ea2d-4271-9d62-89a910b13c37' notice_model['query_id'] = 'testString' notice_model['severity'] = 'warning' notice_model['step'] = 'indexing' notice_model['description'] = 'something bad happened' # Construct a json representation of a DocumentStatus model document_status_model_json = {} document_status_model_json['document_id'] = 'testString' document_status_model_json['configuration_id'] = 'testString' document_status_model_json['status'] = 'available' document_status_model_json['status_description'] = 'testString' document_status_model_json['filename'] = 'testString' document_status_model_json['file_type'] = 'pdf' document_status_model_json['sha1'] = 'testString' document_status_model_json['notices'] = [notice_model] # Construct a model instance of DocumentStatus by calling from_dict on the json representation document_status_model = DocumentStatus.from_dict(document_status_model_json) assert document_status_model != False # Construct a model instance of DocumentStatus by calling from_dict on the json representation document_status_model_dict = DocumentStatus.from_dict(document_status_model_json).__dict__ document_status_model2 = DocumentStatus(**document_status_model_dict) # Verify the model instances are equivalent assert document_status_model == document_status_model2 # Convert model instance back to dict and verify no loss of data document_status_model_json2 = document_status_model.to_dict() assert document_status_model_json2 == document_status_model_json class TestEnrichment(): """ Test Class for Enrichment """ def test_enrichment_serialization(self): """ Test serialization/deserialization for Enrichment """ # Construct dict forms of any model objects needed in order to build this model. nlu_enrichment_keywords_model = {} # NluEnrichmentKeywords nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 nlu_enrichment_entities_model = {} # NluEnrichmentEntities nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' nlu_enrichment_sentiment_model = {} # NluEnrichmentSentiment nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] nlu_enrichment_emotion_model = {} # NluEnrichmentEmotion nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] nlu_enrichment_semantic_roles_model = {} # NluEnrichmentSemanticRoles nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 nlu_enrichment_relations_model = {} # NluEnrichmentRelations nlu_enrichment_relations_model['model'] = 'testString' nlu_enrichment_concepts_model = {} # NluEnrichmentConcepts nlu_enrichment_concepts_model['limit'] = 38 nlu_enrichment_features_model = {} # NluEnrichmentFeatures nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model enrichment_options_model = {} # EnrichmentOptions enrichment_options_model['features'] = nlu_enrichment_features_model enrichment_options_model['language'] = 'ar' enrichment_options_model['model'] = 'testString' # Construct a json representation of a Enrichment model enrichment_model_json = {} enrichment_model_json['description'] = 'testString' enrichment_model_json['destination_field'] = 'testString' enrichment_model_json['source_field'] = 'testString' enrichment_model_json['overwrite'] = True enrichment_model_json['enrichment'] = 'testString' enrichment_model_json['ignore_downstream_errors'] = True enrichment_model_json['options'] = enrichment_options_model # Construct a model instance of Enrichment by calling from_dict on the json representation enrichment_model = Enrichment.from_dict(enrichment_model_json) assert enrichment_model != False # Construct a model instance of Enrichment by calling from_dict on the json representation enrichment_model_dict = Enrichment.from_dict(enrichment_model_json).__dict__ enrichment_model2 = Enrichment(**enrichment_model_dict) # Verify the model instances are equivalent assert enrichment_model == enrichment_model2 # Convert model instance back to dict and verify no loss of data enrichment_model_json2 = enrichment_model.to_dict() assert enrichment_model_json2 == enrichment_model_json class TestEnrichmentOptions(): """ Test Class for EnrichmentOptions """ def test_enrichment_options_serialization(self): """ Test serialization/deserialization for EnrichmentOptions """ # Construct dict forms of any model objects needed in order to build this model. nlu_enrichment_keywords_model = {} # NluEnrichmentKeywords nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 nlu_enrichment_entities_model = {} # NluEnrichmentEntities nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' nlu_enrichment_sentiment_model = {} # NluEnrichmentSentiment nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] nlu_enrichment_emotion_model = {} # NluEnrichmentEmotion nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] nlu_enrichment_semantic_roles_model = {} # NluEnrichmentSemanticRoles nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 nlu_enrichment_relations_model = {} # NluEnrichmentRelations nlu_enrichment_relations_model['model'] = 'testString' nlu_enrichment_concepts_model = {} # NluEnrichmentConcepts nlu_enrichment_concepts_model['limit'] = 38 nlu_enrichment_features_model = {} # NluEnrichmentFeatures nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model # Construct a json representation of a EnrichmentOptions model enrichment_options_model_json = {} enrichment_options_model_json['features'] = nlu_enrichment_features_model enrichment_options_model_json['language'] = 'ar' enrichment_options_model_json['model'] = 'testString' # Construct a model instance of EnrichmentOptions by calling from_dict on the json representation enrichment_options_model = EnrichmentOptions.from_dict(enrichment_options_model_json) assert enrichment_options_model != False # Construct a model instance of EnrichmentOptions by calling from_dict on the json representation enrichment_options_model_dict = EnrichmentOptions.from_dict(enrichment_options_model_json).__dict__ enrichment_options_model2 = EnrichmentOptions(**enrichment_options_model_dict) # Verify the model instances are equivalent assert enrichment_options_model == enrichment_options_model2 # Convert model instance back to dict and verify no loss of data enrichment_options_model_json2 = enrichment_options_model.to_dict() assert enrichment_options_model_json2 == enrichment_options_model_json class TestEnvironment(): """ Test Class for Environment """ def test_environment_serialization(self): """ Test serialization/deserialization for Environment """ # Construct dict forms of any model objects needed in order to build this model. environment_documents_model = {} # EnvironmentDocuments environment_documents_model['available'] = 38 environment_documents_model['maximum_allowed'] = 1000000 disk_usage_model = {} # DiskUsage disk_usage_model['used_bytes'] = 0 disk_usage_model['maximum_allowed_bytes'] = 85899345920 collection_usage_model = {} # CollectionUsage collection_usage_model['available'] = 1 collection_usage_model['maximum_allowed'] = 4 index_capacity_model = {} # IndexCapacity index_capacity_model['documents'] = environment_documents_model index_capacity_model['disk_usage'] = disk_usage_model index_capacity_model['collections'] = collection_usage_model search_status_model = {} # SearchStatus search_status_model['scope'] = 'testString' search_status_model['status'] = 'NO_DATA' search_status_model['status_description'] = 'testString' search_status_model['last_trained'] = '2020-01-28' # Construct a json representation of a Environment model environment_model_json = {} environment_model_json['environment_id'] = 'testString' environment_model_json['name'] = 'testString' environment_model_json['description'] = 'testString' environment_model_json['created'] = '2020-01-28T18:40:40.123456Z' environment_model_json['updated'] = '2020-01-28T18:40:40.123456Z' environment_model_json['status'] = 'active' environment_model_json['read_only'] = True environment_model_json['size'] = 'LT' environment_model_json['requested_size'] = 'testString' environment_model_json['index_capacity'] = index_capacity_model environment_model_json['search_status'] = search_status_model # Construct a model instance of Environment by calling from_dict on the json representation environment_model = Environment.from_dict(environment_model_json) assert environment_model != False # Construct a model instance of Environment by calling from_dict on the json representation environment_model_dict = Environment.from_dict(environment_model_json).__dict__ environment_model2 = Environment(**environment_model_dict) # Verify the model instances are equivalent assert environment_model == environment_model2 # Convert model instance back to dict and verify no loss of data environment_model_json2 = environment_model.to_dict() assert environment_model_json2 == environment_model_json class TestEnvironmentDocuments(): """ Test Class for EnvironmentDocuments """ def test_environment_documents_serialization(self): """ Test serialization/deserialization for EnvironmentDocuments """ # Construct a json representation of a EnvironmentDocuments model environment_documents_model_json = {} environment_documents_model_json['available'] = 38 environment_documents_model_json['maximum_allowed'] = 38 # Construct a model instance of EnvironmentDocuments by calling from_dict on the json representation environment_documents_model = EnvironmentDocuments.from_dict(environment_documents_model_json) assert environment_documents_model != False # Construct a model instance of EnvironmentDocuments by calling from_dict on the json representation environment_documents_model_dict = EnvironmentDocuments.from_dict(environment_documents_model_json).__dict__ environment_documents_model2 = EnvironmentDocuments(**environment_documents_model_dict) # Verify the model instances are equivalent assert environment_documents_model == environment_documents_model2 # Convert model instance back to dict and verify no loss of data environment_documents_model_json2 = environment_documents_model.to_dict() assert environment_documents_model_json2 == environment_documents_model_json class TestEventData(): """ Test Class for EventData """ def test_event_data_serialization(self): """ Test serialization/deserialization for EventData """ # Construct a json representation of a EventData model event_data_model_json = {} event_data_model_json['environment_id'] = 'testString' event_data_model_json['session_token'] = 'testString' event_data_model_json['client_timestamp'] = '2020-01-28T18:40:40.123456Z' event_data_model_json['display_rank'] = 38 event_data_model_json['collection_id'] = 'testString' event_data_model_json['document_id'] = 'testString' event_data_model_json['query_id'] = 'testString' # Construct a model instance of EventData by calling from_dict on the json representation event_data_model = EventData.from_dict(event_data_model_json) assert event_data_model != False # Construct a model instance of EventData by calling from_dict on the json representation event_data_model_dict = EventData.from_dict(event_data_model_json).__dict__ event_data_model2 = EventData(**event_data_model_dict) # Verify the model instances are equivalent assert event_data_model == event_data_model2 # Convert model instance back to dict and verify no loss of data event_data_model_json2 = event_data_model.to_dict() assert event_data_model_json2 == event_data_model_json class TestExpansion(): """ Test Class for Expansion """ def test_expansion_serialization(self): """ Test serialization/deserialization for Expansion """ # Construct a json representation of a Expansion model expansion_model_json = {} expansion_model_json['input_terms'] = ['testString'] expansion_model_json['expanded_terms'] = ['testString'] # Construct a model instance of Expansion by calling from_dict on the json representation expansion_model = Expansion.from_dict(expansion_model_json) assert expansion_model != False # Construct a model instance of Expansion by calling from_dict on the json representation expansion_model_dict = Expansion.from_dict(expansion_model_json).__dict__ expansion_model2 = Expansion(**expansion_model_dict) # Verify the model instances are equivalent assert expansion_model == expansion_model2 # Convert model instance back to dict and verify no loss of data expansion_model_json2 = expansion_model.to_dict() assert expansion_model_json2 == expansion_model_json class TestExpansions(): """ Test Class for Expansions """ def test_expansions_serialization(self): """ Test serialization/deserialization for Expansions """ # Construct dict forms of any model objects needed in order to build this model. expansion_model = {} # Expansion expansion_model['input_terms'] = ['testString'] expansion_model['expanded_terms'] = ['testString'] # Construct a json representation of a Expansions model expansions_model_json = {} expansions_model_json['expansions'] = [expansion_model] # Construct a model instance of Expansions by calling from_dict on the json representation expansions_model = Expansions.from_dict(expansions_model_json) assert expansions_model != False # Construct a model instance of Expansions by calling from_dict on the json representation expansions_model_dict = Expansions.from_dict(expansions_model_json).__dict__ expansions_model2 = Expansions(**expansions_model_dict) # Verify the model instances are equivalent assert expansions_model == expansions_model2 # Convert model instance back to dict and verify no loss of data expansions_model_json2 = expansions_model.to_dict() assert expansions_model_json2 == expansions_model_json class TestField(): """ Test Class for Field """ def test_field_serialization(self): """ Test serialization/deserialization for Field """ # Construct a json representation of a Field model field_model_json = {} field_model_json['field'] = 'testString' field_model_json['type'] = 'nested' # Construct a model instance of Field by calling from_dict on the json representation field_model = Field.from_dict(field_model_json) assert field_model != False # Construct a model instance of Field by calling from_dict on the json representation field_model_dict = Field.from_dict(field_model_json).__dict__ field_model2 = Field(**field_model_dict) # Verify the model instances are equivalent assert field_model == field_model2 # Convert model instance back to dict and verify no loss of data field_model_json2 = field_model.to_dict() assert field_model_json2 == field_model_json class TestFontSetting(): """ Test Class for FontSetting """ def test_font_setting_serialization(self): """ Test serialization/deserialization for FontSetting """ # Construct a json representation of a FontSetting model font_setting_model_json = {} font_setting_model_json['level'] = 38 font_setting_model_json['min_size'] = 38 font_setting_model_json['max_size'] = 38 font_setting_model_json['bold'] = True font_setting_model_json['italic'] = True font_setting_model_json['name'] = 'testString' # Construct a model instance of FontSetting by calling from_dict on the json representation font_setting_model = FontSetting.from_dict(font_setting_model_json) assert font_setting_model != False # Construct a model instance of FontSetting by calling from_dict on the json representation font_setting_model_dict = FontSetting.from_dict(font_setting_model_json).__dict__ font_setting_model2 = FontSetting(**font_setting_model_dict) # Verify the model instances are equivalent assert font_setting_model == font_setting_model2 # Convert model instance back to dict and verify no loss of data font_setting_model_json2 = font_setting_model.to_dict() assert font_setting_model_json2 == font_setting_model_json class TestGateway(): """ Test Class for Gateway """ def test_gateway_serialization(self): """ Test serialization/deserialization for Gateway """ # Construct a json representation of a Gateway model gateway_model_json = {} gateway_model_json['gateway_id'] = 'testString' gateway_model_json['name'] = 'testString' gateway_model_json['status'] = 'connected' gateway_model_json['token'] = 'testString' gateway_model_json['token_id'] = 'testString' # Construct a model instance of Gateway by calling from_dict on the json representation gateway_model = Gateway.from_dict(gateway_model_json) assert gateway_model != False # Construct a model instance of Gateway by calling from_dict on the json representation gateway_model_dict = Gateway.from_dict(gateway_model_json).__dict__ gateway_model2 = Gateway(**gateway_model_dict) # Verify the model instances are equivalent assert gateway_model == gateway_model2 # Convert model instance back to dict and verify no loss of data gateway_model_json2 = gateway_model.to_dict() assert gateway_model_json2 == gateway_model_json class TestGatewayDelete(): """ Test Class for GatewayDelete """ def test_gateway_delete_serialization(self): """ Test serialization/deserialization for GatewayDelete """ # Construct a json representation of a GatewayDelete model gateway_delete_model_json = {} gateway_delete_model_json['gateway_id'] = 'testString' gateway_delete_model_json['status'] = 'testString' # Construct a model instance of GatewayDelete by calling from_dict on the json representation gateway_delete_model = GatewayDelete.from_dict(gateway_delete_model_json) assert gateway_delete_model != False # Construct a model instance of GatewayDelete by calling from_dict on the json representation gateway_delete_model_dict = GatewayDelete.from_dict(gateway_delete_model_json).__dict__ gateway_delete_model2 = GatewayDelete(**gateway_delete_model_dict) # Verify the model instances are equivalent assert gateway_delete_model == gateway_delete_model2 # Convert model instance back to dict and verify no loss of data gateway_delete_model_json2 = gateway_delete_model.to_dict() assert gateway_delete_model_json2 == gateway_delete_model_json class TestGatewayList(): """ Test Class for GatewayList """ def test_gateway_list_serialization(self): """ Test serialization/deserialization for GatewayList """ # Construct dict forms of any model objects needed in order to build this model. gateway_model = {} # Gateway gateway_model['gateway_id'] = 'testString' gateway_model['name'] = 'testString' gateway_model['status'] = 'connected' gateway_model['token'] = 'testString' gateway_model['token_id'] = 'testString' # Construct a json representation of a GatewayList model gateway_list_model_json = {} gateway_list_model_json['gateways'] = [gateway_model] # Construct a model instance of GatewayList by calling from_dict on the json representation gateway_list_model = GatewayList.from_dict(gateway_list_model_json) assert gateway_list_model != False # Construct a model instance of GatewayList by calling from_dict on the json representation gateway_list_model_dict = GatewayList.from_dict(gateway_list_model_json).__dict__ gateway_list_model2 = GatewayList(**gateway_list_model_dict) # Verify the model instances are equivalent assert gateway_list_model == gateway_list_model2 # Convert model instance back to dict and verify no loss of data gateway_list_model_json2 = gateway_list_model.to_dict() assert gateway_list_model_json2 == gateway_list_model_json class TestHtmlSettings(): """ Test Class for HtmlSettings """ def test_html_settings_serialization(self): """ Test serialization/deserialization for HtmlSettings """ # Construct dict forms of any model objects needed in order to build this model. x_path_patterns_model = {} # XPathPatterns x_path_patterns_model['xpaths'] = ['testString'] # Construct a json representation of a HtmlSettings model html_settings_model_json = {} html_settings_model_json['exclude_tags_completely'] = ['testString'] html_settings_model_json['exclude_tags_keep_content'] = ['testString'] html_settings_model_json['keep_content'] = x_path_patterns_model html_settings_model_json['exclude_content'] = x_path_patterns_model html_settings_model_json['keep_tag_attributes'] = ['testString'] html_settings_model_json['exclude_tag_attributes'] = ['testString'] # Construct a model instance of HtmlSettings by calling from_dict on the json representation html_settings_model = HtmlSettings.from_dict(html_settings_model_json) assert html_settings_model != False # Construct a model instance of HtmlSettings by calling from_dict on the json representation html_settings_model_dict = HtmlSettings.from_dict(html_settings_model_json).__dict__ html_settings_model2 = HtmlSettings(**html_settings_model_dict) # Verify the model instances are equivalent assert html_settings_model == html_settings_model2 # Convert model instance back to dict and verify no loss of data html_settings_model_json2 = html_settings_model.to_dict() assert html_settings_model_json2 == html_settings_model_json class TestIndexCapacity(): """ Test Class for IndexCapacity """ def test_index_capacity_serialization(self): """ Test serialization/deserialization for IndexCapacity """ # Construct dict forms of any model objects needed in order to build this model. environment_documents_model = {} # EnvironmentDocuments environment_documents_model['available'] = 38 environment_documents_model['maximum_allowed'] = 38 disk_usage_model = {} # DiskUsage disk_usage_model['used_bytes'] = 38 disk_usage_model['maximum_allowed_bytes'] = 38 collection_usage_model = {} # CollectionUsage collection_usage_model['available'] = 38 collection_usage_model['maximum_allowed'] = 38 # Construct a json representation of a IndexCapacity model index_capacity_model_json = {} index_capacity_model_json['documents'] = environment_documents_model index_capacity_model_json['disk_usage'] = disk_usage_model index_capacity_model_json['collections'] = collection_usage_model # Construct a model instance of IndexCapacity by calling from_dict on the json representation index_capacity_model = IndexCapacity.from_dict(index_capacity_model_json) assert index_capacity_model != False # Construct a model instance of IndexCapacity by calling from_dict on the json representation index_capacity_model_dict = IndexCapacity.from_dict(index_capacity_model_json).__dict__ index_capacity_model2 = IndexCapacity(**index_capacity_model_dict) # Verify the model instances are equivalent assert index_capacity_model == index_capacity_model2 # Convert model instance back to dict and verify no loss of data index_capacity_model_json2 = index_capacity_model.to_dict() assert index_capacity_model_json2 == index_capacity_model_json class TestListCollectionFieldsResponse(): """ Test Class for ListCollectionFieldsResponse """ def test_list_collection_fields_response_serialization(self): """ Test serialization/deserialization for ListCollectionFieldsResponse """ # Construct dict forms of any model objects needed in order to build this model. field_model = {} # Field field_model['field'] = 'warnings' field_model['type'] = 'nested' # Construct a json representation of a ListCollectionFieldsResponse model list_collection_fields_response_model_json = {} list_collection_fields_response_model_json['fields'] = [field_model] # Construct a model instance of ListCollectionFieldsResponse by calling from_dict on the json representation list_collection_fields_response_model = ListCollectionFieldsResponse.from_dict(list_collection_fields_response_model_json) assert list_collection_fields_response_model != False # Construct a model instance of ListCollectionFieldsResponse by calling from_dict on the json representation list_collection_fields_response_model_dict = ListCollectionFieldsResponse.from_dict(list_collection_fields_response_model_json).__dict__ list_collection_fields_response_model2 = ListCollectionFieldsResponse(**list_collection_fields_response_model_dict) # Verify the model instances are equivalent assert list_collection_fields_response_model == list_collection_fields_response_model2 # Convert model instance back to dict and verify no loss of data list_collection_fields_response_model_json2 = list_collection_fields_response_model.to_dict() assert list_collection_fields_response_model_json2 == list_collection_fields_response_model_json class TestListCollectionsResponse(): """ Test Class for ListCollectionsResponse """ def test_list_collections_response_serialization(self): """ Test serialization/deserialization for ListCollectionsResponse """ # Construct dict forms of any model objects needed in order to build this model. document_counts_model = {} # DocumentCounts document_counts_model['available'] = 26 document_counts_model['processing'] = 26 document_counts_model['failed'] = 26 document_counts_model['pending'] = 26 collection_disk_usage_model = {} # CollectionDiskUsage collection_disk_usage_model['used_bytes'] = 38 training_status_model = {} # TrainingStatus training_status_model['total_examples'] = 38 training_status_model['available'] = True training_status_model['processing'] = True training_status_model['minimum_queries_added'] = True training_status_model['minimum_examples_added'] = True training_status_model['sufficient_label_diversity'] = True training_status_model['notices'] = 38 training_status_model['successfully_trained'] = '2020-01-28T18:40:40.123456Z' training_status_model['data_updated'] = '2020-01-28T18:40:40.123456Z' source_status_model = {} # SourceStatus source_status_model['status'] = 'running' source_status_model['next_crawl'] = '2020-01-28T18:40:40.123456Z' collection_crawl_status_model = {} # CollectionCrawlStatus collection_crawl_status_model['source_crawl'] = source_status_model sdu_status_custom_fields_model = {} # SduStatusCustomFields sdu_status_custom_fields_model['defined'] = 26 sdu_status_custom_fields_model['maximum_allowed'] = 26 sdu_status_model = {} # SduStatus sdu_status_model['enabled'] = True sdu_status_model['total_annotated_pages'] = 26 sdu_status_model['total_pages'] = 26 sdu_status_model['total_documents'] = 26 sdu_status_model['custom_fields'] = sdu_status_custom_fields_model collection_model = {} # Collection collection_model['collection_id'] = 'f1360220-ea2d-4271-9d62-89a910b13c37' collection_model['name'] = 'example' collection_model['description'] = 'this is a demo collection' collection_model['created'] = '2020-01-28T18:40:40.123456Z' collection_model['updated'] = '2020-01-28T18:40:40.123456Z' collection_model['status'] = 'active' collection_model['configuration_id'] = '6963be41-2dea-4f79-8f52-127c63c479b0' collection_model['language'] = 'en' collection_model['document_counts'] = document_counts_model collection_model['disk_usage'] = collection_disk_usage_model collection_model['training_status'] = training_status_model collection_model['crawl_status'] = collection_crawl_status_model collection_model['smart_document_understanding'] = sdu_status_model # Construct a json representation of a ListCollectionsResponse model list_collections_response_model_json = {} list_collections_response_model_json['collections'] = [collection_model] # Construct a model instance of ListCollectionsResponse by calling from_dict on the json representation list_collections_response_model = ListCollectionsResponse.from_dict(list_collections_response_model_json) assert list_collections_response_model != False # Construct a model instance of ListCollectionsResponse by calling from_dict on the json representation list_collections_response_model_dict = ListCollectionsResponse.from_dict(list_collections_response_model_json).__dict__ list_collections_response_model2 = ListCollectionsResponse(**list_collections_response_model_dict) # Verify the model instances are equivalent assert list_collections_response_model == list_collections_response_model2 # Convert model instance back to dict and verify no loss of data list_collections_response_model_json2 = list_collections_response_model.to_dict() assert list_collections_response_model_json2 == list_collections_response_model_json class TestListConfigurationsResponse(): """ Test Class for ListConfigurationsResponse """ def test_list_configurations_response_serialization(self): """ Test serialization/deserialization for ListConfigurationsResponse """ # Construct dict forms of any model objects needed in order to build this model. font_setting_model = {} # FontSetting font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' pdf_heading_detection_model = {} # PdfHeadingDetection pdf_heading_detection_model['fonts'] = [font_setting_model] pdf_settings_model = {} # PdfSettings pdf_settings_model['heading'] = pdf_heading_detection_model word_style_model = {} # WordStyle word_style_model['level'] = 38 word_style_model['names'] = ['testString'] word_heading_detection_model = {} # WordHeadingDetection word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] word_settings_model = {} # WordSettings word_settings_model['heading'] = word_heading_detection_model x_path_patterns_model = {} # XPathPatterns x_path_patterns_model['xpaths'] = ['testString'] html_settings_model = {} # HtmlSettings html_settings_model['exclude_tags_completely'] = ['testString'] html_settings_model['exclude_tags_keep_content'] = ['testString'] html_settings_model['keep_content'] = x_path_patterns_model html_settings_model['exclude_content'] = x_path_patterns_model html_settings_model['keep_tag_attributes'] = ['testString'] html_settings_model['exclude_tag_attributes'] = ['testString'] segment_settings_model = {} # SegmentSettings segment_settings_model['enabled'] = True segment_settings_model['selector_tags'] = ['testString'] segment_settings_model['annotated_fields'] = ['testString'] normalization_operation_model = {} # NormalizationOperation normalization_operation_model['operation'] = 'copy' normalization_operation_model['source_field'] = 'testString' normalization_operation_model['destination_field'] = 'testString' conversions_model = {} # Conversions conversions_model['pdf'] = pdf_settings_model conversions_model['word'] = word_settings_model conversions_model['html'] = html_settings_model conversions_model['segment'] = segment_settings_model conversions_model['json_normalizations'] = [normalization_operation_model] conversions_model['image_text_recognition'] = True nlu_enrichment_keywords_model = {} # NluEnrichmentKeywords nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 nlu_enrichment_entities_model = {} # NluEnrichmentEntities nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' nlu_enrichment_sentiment_model = {} # NluEnrichmentSentiment nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] nlu_enrichment_emotion_model = {} # NluEnrichmentEmotion nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] nlu_enrichment_semantic_roles_model = {} # NluEnrichmentSemanticRoles nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 nlu_enrichment_relations_model = {} # NluEnrichmentRelations nlu_enrichment_relations_model['model'] = 'testString' nlu_enrichment_concepts_model = {} # NluEnrichmentConcepts nlu_enrichment_concepts_model['limit'] = 38 nlu_enrichment_features_model = {} # NluEnrichmentFeatures nlu_enrichment_features_model['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model['categories'] = {} nlu_enrichment_features_model['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model['concepts'] = nlu_enrichment_concepts_model enrichment_options_model = {} # EnrichmentOptions enrichment_options_model['features'] = nlu_enrichment_features_model enrichment_options_model['language'] = 'ar' enrichment_options_model['model'] = 'testString' enrichment_model = {} # Enrichment enrichment_model['description'] = 'testString' enrichment_model['destination_field'] = 'testString' enrichment_model['source_field'] = 'testString' enrichment_model['overwrite'] = True enrichment_model['enrichment'] = 'testString' enrichment_model['ignore_downstream_errors'] = True enrichment_model['options'] = enrichment_options_model source_schedule_model = {} # SourceSchedule source_schedule_model['enabled'] = True source_schedule_model['time_zone'] = 'testString' source_schedule_model['frequency'] = 'daily' source_options_folder_model = {} # SourceOptionsFolder source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 source_options_object_model = {} # SourceOptionsObject source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 source_options_site_coll_model = {} # SourceOptionsSiteColl source_options_site_coll_model['site_collection_path'] = 'testString' source_options_site_coll_model['limit'] = 38 source_options_web_crawl_model = {} # SourceOptionsWebCrawl source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] source_options_buckets_model = {} # SourceOptionsBuckets source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 source_options_model = {} # SourceOptions source_options_model['folders'] = [source_options_folder_model] source_options_model['objects'] = [source_options_object_model] source_options_model['site_collections'] = [source_options_site_coll_model] source_options_model['urls'] = [source_options_web_crawl_model] source_options_model['buckets'] = [source_options_buckets_model] source_options_model['crawl_all_buckets'] = True source_model = {} # Source source_model['type'] = 'box' source_model['credential_id'] = 'testString' source_model['schedule'] = source_schedule_model source_model['options'] = source_options_model configuration_model = {} # Configuration configuration_model['configuration_id'] = 'testString' configuration_model['name'] = 'testString' configuration_model['created'] = '2020-01-28T18:40:40.123456Z' configuration_model['updated'] = '2020-01-28T18:40:40.123456Z' configuration_model['description'] = 'testString' configuration_model['conversions'] = conversions_model configuration_model['enrichments'] = [enrichment_model] configuration_model['normalizations'] = [normalization_operation_model] configuration_model['source'] = source_model # Construct a json representation of a ListConfigurationsResponse model list_configurations_response_model_json = {} list_configurations_response_model_json['configurations'] = [configuration_model] # Construct a model instance of ListConfigurationsResponse by calling from_dict on the json representation list_configurations_response_model = ListConfigurationsResponse.from_dict(list_configurations_response_model_json) assert list_configurations_response_model != False # Construct a model instance of ListConfigurationsResponse by calling from_dict on the json representation list_configurations_response_model_dict = ListConfigurationsResponse.from_dict(list_configurations_response_model_json).__dict__ list_configurations_response_model2 = ListConfigurationsResponse(**list_configurations_response_model_dict) # Verify the model instances are equivalent assert list_configurations_response_model == list_configurations_response_model2 # Convert model instance back to dict and verify no loss of data list_configurations_response_model_json2 = list_configurations_response_model.to_dict() assert list_configurations_response_model_json2 == list_configurations_response_model_json class TestListEnvironmentsResponse(): """ Test Class for ListEnvironmentsResponse """ def test_list_environments_response_serialization(self): """ Test serialization/deserialization for ListEnvironmentsResponse """ # Construct dict forms of any model objects needed in order to build this model. environment_documents_model = {} # EnvironmentDocuments environment_documents_model['available'] = 38 environment_documents_model['maximum_allowed'] = 38 disk_usage_model = {} # DiskUsage disk_usage_model['used_bytes'] = 38 disk_usage_model['maximum_allowed_bytes'] = 38 collection_usage_model = {} # CollectionUsage collection_usage_model['available'] = 38 collection_usage_model['maximum_allowed'] = 38 index_capacity_model = {} # IndexCapacity index_capacity_model['documents'] = environment_documents_model index_capacity_model['disk_usage'] = disk_usage_model index_capacity_model['collections'] = collection_usage_model search_status_model = {} # SearchStatus search_status_model['scope'] = 'testString' search_status_model['status'] = 'NO_DATA' search_status_model['status_description'] = 'testString' search_status_model['last_trained'] = '2020-01-28' environment_model = {} # Environment environment_model['environment_id'] = 'ecbda78e-fb06-40b1-a43f-a039fac0adc6' environment_model['name'] = 'byod_environment' environment_model['description'] = 'Private Data Environment' environment_model['created'] = '2020-01-28T18:40:40.123456Z' environment_model['updated'] = '2020-01-28T18:40:40.123456Z' environment_model['status'] = 'active' environment_model['read_only'] = False environment_model['size'] = 'LT' environment_model['requested_size'] = 'testString' environment_model['index_capacity'] = index_capacity_model environment_model['search_status'] = search_status_model # Construct a json representation of a ListEnvironmentsResponse model list_environments_response_model_json = {} list_environments_response_model_json['environments'] = [environment_model] # Construct a model instance of ListEnvironmentsResponse by calling from_dict on the json representation list_environments_response_model = ListEnvironmentsResponse.from_dict(list_environments_response_model_json) assert list_environments_response_model != False # Construct a model instance of ListEnvironmentsResponse by calling from_dict on the json representation list_environments_response_model_dict = ListEnvironmentsResponse.from_dict(list_environments_response_model_json).__dict__ list_environments_response_model2 = ListEnvironmentsResponse(**list_environments_response_model_dict) # Verify the model instances are equivalent assert list_environments_response_model == list_environments_response_model2 # Convert model instance back to dict and verify no loss of data list_environments_response_model_json2 = list_environments_response_model.to_dict() assert list_environments_response_model_json2 == list_environments_response_model_json class TestLogQueryResponse(): """ Test Class for LogQueryResponse """ def test_log_query_response_serialization(self): """ Test serialization/deserialization for LogQueryResponse """ # Construct dict forms of any model objects needed in order to build this model. log_query_response_result_documents_result_model = {} # LogQueryResponseResultDocumentsResult log_query_response_result_documents_result_model['position'] = 38 log_query_response_result_documents_result_model['document_id'] = 'testString' log_query_response_result_documents_result_model['score'] = 72.5 log_query_response_result_documents_result_model['confidence'] = 72.5 log_query_response_result_documents_result_model['collection_id'] = 'testString' log_query_response_result_documents_model = {} # LogQueryResponseResultDocuments log_query_response_result_documents_model['results'] = [log_query_response_result_documents_result_model] log_query_response_result_documents_model['count'] = 38 log_query_response_result_model = {} # LogQueryResponseResult log_query_response_result_model['environment_id'] = 'testString' log_query_response_result_model['customer_id'] = 'testString' log_query_response_result_model['document_type'] = 'query' log_query_response_result_model['natural_language_query'] = 'testString' log_query_response_result_model['document_results'] = log_query_response_result_documents_model log_query_response_result_model['created_timestamp'] = '2020-01-28T18:40:40.123456Z' log_query_response_result_model['client_timestamp'] = '2020-01-28T18:40:40.123456Z' log_query_response_result_model['query_id'] = 'testString' log_query_response_result_model['session_token'] = 'testString' log_query_response_result_model['collection_id'] = 'testString' log_query_response_result_model['display_rank'] = 38 log_query_response_result_model['document_id'] = 'testString' log_query_response_result_model['event_type'] = 'click' log_query_response_result_model['result_type'] = 'document' # Construct a json representation of a LogQueryResponse model log_query_response_model_json = {} log_query_response_model_json['matching_results'] = 38 log_query_response_model_json['results'] = [log_query_response_result_model] # Construct a model instance of LogQueryResponse by calling from_dict on the json representation log_query_response_model = LogQueryResponse.from_dict(log_query_response_model_json) assert log_query_response_model != False # Construct a model instance of LogQueryResponse by calling from_dict on the json representation log_query_response_model_dict = LogQueryResponse.from_dict(log_query_response_model_json).__dict__ log_query_response_model2 = LogQueryResponse(**log_query_response_model_dict) # Verify the model instances are equivalent assert log_query_response_model == log_query_response_model2 # Convert model instance back to dict and verify no loss of data log_query_response_model_json2 = log_query_response_model.to_dict() assert log_query_response_model_json2 == log_query_response_model_json class TestLogQueryResponseResult(): """ Test Class for LogQueryResponseResult """ def test_log_query_response_result_serialization(self): """ Test serialization/deserialization for LogQueryResponseResult """ # Construct dict forms of any model objects needed in order to build this model. log_query_response_result_documents_result_model = {} # LogQueryResponseResultDocumentsResult log_query_response_result_documents_result_model['position'] = 38 log_query_response_result_documents_result_model['document_id'] = 'testString' log_query_response_result_documents_result_model['score'] = 72.5 log_query_response_result_documents_result_model['confidence'] = 72.5 log_query_response_result_documents_result_model['collection_id'] = 'testString' log_query_response_result_documents_model = {} # LogQueryResponseResultDocuments log_query_response_result_documents_model['results'] = [log_query_response_result_documents_result_model] log_query_response_result_documents_model['count'] = 38 # Construct a json representation of a LogQueryResponseResult model log_query_response_result_model_json = {} log_query_response_result_model_json['environment_id'] = 'testString' log_query_response_result_model_json['customer_id'] = 'testString' log_query_response_result_model_json['document_type'] = 'query' log_query_response_result_model_json['natural_language_query'] = 'testString' log_query_response_result_model_json['document_results'] = log_query_response_result_documents_model log_query_response_result_model_json['created_timestamp'] = '2020-01-28T18:40:40.123456Z' log_query_response_result_model_json['client_timestamp'] = '2020-01-28T18:40:40.123456Z' log_query_response_result_model_json['query_id'] = 'testString' log_query_response_result_model_json['session_token'] = 'testString' log_query_response_result_model_json['collection_id'] = 'testString' log_query_response_result_model_json['display_rank'] = 38 log_query_response_result_model_json['document_id'] = 'testString' log_query_response_result_model_json['event_type'] = 'click' log_query_response_result_model_json['result_type'] = 'document' # Construct a model instance of LogQueryResponseResult by calling from_dict on the json representation log_query_response_result_model = LogQueryResponseResult.from_dict(log_query_response_result_model_json) assert log_query_response_result_model != False # Construct a model instance of LogQueryResponseResult by calling from_dict on the json representation log_query_response_result_model_dict = LogQueryResponseResult.from_dict(log_query_response_result_model_json).__dict__ log_query_response_result_model2 = LogQueryResponseResult(**log_query_response_result_model_dict) # Verify the model instances are equivalent assert log_query_response_result_model == log_query_response_result_model2 # Convert model instance back to dict and verify no loss of data log_query_response_result_model_json2 = log_query_response_result_model.to_dict() assert log_query_response_result_model_json2 == log_query_response_result_model_json class TestLogQueryResponseResultDocuments(): """ Test Class for LogQueryResponseResultDocuments """ def test_log_query_response_result_documents_serialization(self): """ Test serialization/deserialization for LogQueryResponseResultDocuments """ # Construct dict forms of any model objects needed in order to build this model. log_query_response_result_documents_result_model = {} # LogQueryResponseResultDocumentsResult log_query_response_result_documents_result_model['position'] = 38 log_query_response_result_documents_result_model['document_id'] = 'testString' log_query_response_result_documents_result_model['score'] = 72.5 log_query_response_result_documents_result_model['confidence'] = 72.5 log_query_response_result_documents_result_model['collection_id'] = 'testString' # Construct a json representation of a LogQueryResponseResultDocuments model log_query_response_result_documents_model_json = {} log_query_response_result_documents_model_json['results'] = [log_query_response_result_documents_result_model] log_query_response_result_documents_model_json['count'] = 38 # Construct a model instance of LogQueryResponseResultDocuments by calling from_dict on the json representation log_query_response_result_documents_model = LogQueryResponseResultDocuments.from_dict(log_query_response_result_documents_model_json) assert log_query_response_result_documents_model != False # Construct a model instance of LogQueryResponseResultDocuments by calling from_dict on the json representation log_query_response_result_documents_model_dict = LogQueryResponseResultDocuments.from_dict(log_query_response_result_documents_model_json).__dict__ log_query_response_result_documents_model2 = LogQueryResponseResultDocuments(**log_query_response_result_documents_model_dict) # Verify the model instances are equivalent assert log_query_response_result_documents_model == log_query_response_result_documents_model2 # Convert model instance back to dict and verify no loss of data log_query_response_result_documents_model_json2 = log_query_response_result_documents_model.to_dict() assert log_query_response_result_documents_model_json2 == log_query_response_result_documents_model_json class TestLogQueryResponseResultDocumentsResult(): """ Test Class for LogQueryResponseResultDocumentsResult """ def test_log_query_response_result_documents_result_serialization(self): """ Test serialization/deserialization for LogQueryResponseResultDocumentsResult """ # Construct a json representation of a LogQueryResponseResultDocumentsResult model log_query_response_result_documents_result_model_json = {} log_query_response_result_documents_result_model_json['position'] = 38 log_query_response_result_documents_result_model_json['document_id'] = 'testString' log_query_response_result_documents_result_model_json['score'] = 72.5 log_query_response_result_documents_result_model_json['confidence'] = 72.5 log_query_response_result_documents_result_model_json['collection_id'] = 'testString' # Construct a model instance of LogQueryResponseResultDocumentsResult by calling from_dict on the json representation log_query_response_result_documents_result_model = LogQueryResponseResultDocumentsResult.from_dict(log_query_response_result_documents_result_model_json) assert log_query_response_result_documents_result_model != False # Construct a model instance of LogQueryResponseResultDocumentsResult by calling from_dict on the json representation log_query_response_result_documents_result_model_dict = LogQueryResponseResultDocumentsResult.from_dict(log_query_response_result_documents_result_model_json).__dict__ log_query_response_result_documents_result_model2 = LogQueryResponseResultDocumentsResult(**log_query_response_result_documents_result_model_dict) # Verify the model instances are equivalent assert log_query_response_result_documents_result_model == log_query_response_result_documents_result_model2 # Convert model instance back to dict and verify no loss of data log_query_response_result_documents_result_model_json2 = log_query_response_result_documents_result_model.to_dict() assert log_query_response_result_documents_result_model_json2 == log_query_response_result_documents_result_model_json class TestMetricAggregation(): """ Test Class for MetricAggregation """ def test_metric_aggregation_serialization(self): """ Test serialization/deserialization for MetricAggregation """ # Construct dict forms of any model objects needed in order to build this model. metric_aggregation_result_model = {} # MetricAggregationResult metric_aggregation_result_model['key_as_string'] = '2020-01-28T18:40:40.123456Z' metric_aggregation_result_model['key'] = 26 metric_aggregation_result_model['matching_results'] = 38 metric_aggregation_result_model['event_rate'] = 72.5 # Construct a json representation of a MetricAggregation model metric_aggregation_model_json = {} metric_aggregation_model_json['interval'] = 'testString' metric_aggregation_model_json['event_type'] = 'testString' metric_aggregation_model_json['results'] = [metric_aggregation_result_model] # Construct a model instance of MetricAggregation by calling from_dict on the json representation metric_aggregation_model = MetricAggregation.from_dict(metric_aggregation_model_json) assert metric_aggregation_model != False # Construct a model instance of MetricAggregation by calling from_dict on the json representation metric_aggregation_model_dict = MetricAggregation.from_dict(metric_aggregation_model_json).__dict__ metric_aggregation_model2 = MetricAggregation(**metric_aggregation_model_dict) # Verify the model instances are equivalent assert metric_aggregation_model == metric_aggregation_model2 # Convert model instance back to dict and verify no loss of data metric_aggregation_model_json2 = metric_aggregation_model.to_dict() assert metric_aggregation_model_json2 == metric_aggregation_model_json class TestMetricAggregationResult(): """ Test Class for MetricAggregationResult """ def test_metric_aggregation_result_serialization(self): """ Test serialization/deserialization for MetricAggregationResult """ # Construct a json representation of a MetricAggregationResult model metric_aggregation_result_model_json = {} metric_aggregation_result_model_json['key_as_string'] = '2020-01-28T18:40:40.123456Z' metric_aggregation_result_model_json['key'] = 26 metric_aggregation_result_model_json['matching_results'] = 38 metric_aggregation_result_model_json['event_rate'] = 72.5 # Construct a model instance of MetricAggregationResult by calling from_dict on the json representation metric_aggregation_result_model = MetricAggregationResult.from_dict(metric_aggregation_result_model_json) assert metric_aggregation_result_model != False # Construct a model instance of MetricAggregationResult by calling from_dict on the json representation metric_aggregation_result_model_dict = MetricAggregationResult.from_dict(metric_aggregation_result_model_json).__dict__ metric_aggregation_result_model2 = MetricAggregationResult(**metric_aggregation_result_model_dict) # Verify the model instances are equivalent assert metric_aggregation_result_model == metric_aggregation_result_model2 # Convert model instance back to dict and verify no loss of data metric_aggregation_result_model_json2 = metric_aggregation_result_model.to_dict() assert metric_aggregation_result_model_json2 == metric_aggregation_result_model_json class TestMetricResponse(): """ Test Class for MetricResponse """ def test_metric_response_serialization(self): """ Test serialization/deserialization for MetricResponse """ # Construct dict forms of any model objects needed in order to build this model. metric_aggregation_result_model = {} # MetricAggregationResult metric_aggregation_result_model['key_as_string'] = '2020-01-28T18:40:40.123456Z' metric_aggregation_result_model['key'] = 26 metric_aggregation_result_model['matching_results'] = 38 metric_aggregation_result_model['event_rate'] = 72.5 metric_aggregation_model = {} # MetricAggregation metric_aggregation_model['interval'] = 'testString' metric_aggregation_model['event_type'] = 'testString' metric_aggregation_model['results'] = [metric_aggregation_result_model] # Construct a json representation of a MetricResponse model metric_response_model_json = {} metric_response_model_json['aggregations'] = [metric_aggregation_model] # Construct a model instance of MetricResponse by calling from_dict on the json representation metric_response_model = MetricResponse.from_dict(metric_response_model_json) assert metric_response_model != False # Construct a model instance of MetricResponse by calling from_dict on the json representation metric_response_model_dict = MetricResponse.from_dict(metric_response_model_json).__dict__ metric_response_model2 = MetricResponse(**metric_response_model_dict) # Verify the model instances are equivalent assert metric_response_model == metric_response_model2 # Convert model instance back to dict and verify no loss of data metric_response_model_json2 = metric_response_model.to_dict() assert metric_response_model_json2 == metric_response_model_json class TestMetricTokenAggregation(): """ Test Class for MetricTokenAggregation """ def test_metric_token_aggregation_serialization(self): """ Test serialization/deserialization for MetricTokenAggregation """ # Construct dict forms of any model objects needed in order to build this model. metric_token_aggregation_result_model = {} # MetricTokenAggregationResult metric_token_aggregation_result_model['key'] = 'testString' metric_token_aggregation_result_model['matching_results'] = 38 metric_token_aggregation_result_model['event_rate'] = 72.5 # Construct a json representation of a MetricTokenAggregation model metric_token_aggregation_model_json = {} metric_token_aggregation_model_json['event_type'] = 'testString' metric_token_aggregation_model_json['results'] = [metric_token_aggregation_result_model] # Construct a model instance of MetricTokenAggregation by calling from_dict on the json representation metric_token_aggregation_model = MetricTokenAggregation.from_dict(metric_token_aggregation_model_json) assert metric_token_aggregation_model != False # Construct a model instance of MetricTokenAggregation by calling from_dict on the json representation metric_token_aggregation_model_dict = MetricTokenAggregation.from_dict(metric_token_aggregation_model_json).__dict__ metric_token_aggregation_model2 = MetricTokenAggregation(**metric_token_aggregation_model_dict) # Verify the model instances are equivalent assert metric_token_aggregation_model == metric_token_aggregation_model2 # Convert model instance back to dict and verify no loss of data metric_token_aggregation_model_json2 = metric_token_aggregation_model.to_dict() assert metric_token_aggregation_model_json2 == metric_token_aggregation_model_json class TestMetricTokenAggregationResult(): """ Test Class for MetricTokenAggregationResult """ def test_metric_token_aggregation_result_serialization(self): """ Test serialization/deserialization for MetricTokenAggregationResult """ # Construct a json representation of a MetricTokenAggregationResult model metric_token_aggregation_result_model_json = {} metric_token_aggregation_result_model_json['key'] = 'testString' metric_token_aggregation_result_model_json['matching_results'] = 38 metric_token_aggregation_result_model_json['event_rate'] = 72.5 # Construct a model instance of MetricTokenAggregationResult by calling from_dict on the json representation metric_token_aggregation_result_model = MetricTokenAggregationResult.from_dict(metric_token_aggregation_result_model_json) assert metric_token_aggregation_result_model != False # Construct a model instance of MetricTokenAggregationResult by calling from_dict on the json representation metric_token_aggregation_result_model_dict = MetricTokenAggregationResult.from_dict(metric_token_aggregation_result_model_json).__dict__ metric_token_aggregation_result_model2 = MetricTokenAggregationResult(**metric_token_aggregation_result_model_dict) # Verify the model instances are equivalent assert metric_token_aggregation_result_model == metric_token_aggregation_result_model2 # Convert model instance back to dict and verify no loss of data metric_token_aggregation_result_model_json2 = metric_token_aggregation_result_model.to_dict() assert metric_token_aggregation_result_model_json2 == metric_token_aggregation_result_model_json class TestMetricTokenResponse(): """ Test Class for MetricTokenResponse """ def test_metric_token_response_serialization(self): """ Test serialization/deserialization for MetricTokenResponse """ # Construct dict forms of any model objects needed in order to build this model. metric_token_aggregation_result_model = {} # MetricTokenAggregationResult metric_token_aggregation_result_model['key'] = 'testString' metric_token_aggregation_result_model['matching_results'] = 38 metric_token_aggregation_result_model['event_rate'] = 72.5 metric_token_aggregation_model = {} # MetricTokenAggregation metric_token_aggregation_model['event_type'] = 'testString' metric_token_aggregation_model['results'] = [metric_token_aggregation_result_model] # Construct a json representation of a MetricTokenResponse model metric_token_response_model_json = {} metric_token_response_model_json['aggregations'] = [metric_token_aggregation_model] # Construct a model instance of MetricTokenResponse by calling from_dict on the json representation metric_token_response_model = MetricTokenResponse.from_dict(metric_token_response_model_json) assert metric_token_response_model != False # Construct a model instance of MetricTokenResponse by calling from_dict on the json representation metric_token_response_model_dict = MetricTokenResponse.from_dict(metric_token_response_model_json).__dict__ metric_token_response_model2 = MetricTokenResponse(**metric_token_response_model_dict) # Verify the model instances are equivalent assert metric_token_response_model == metric_token_response_model2 # Convert model instance back to dict and verify no loss of data metric_token_response_model_json2 = metric_token_response_model.to_dict() assert metric_token_response_model_json2 == metric_token_response_model_json class TestNluEnrichmentConcepts(): """ Test Class for NluEnrichmentConcepts """ def test_nlu_enrichment_concepts_serialization(self): """ Test serialization/deserialization for NluEnrichmentConcepts """ # Construct a json representation of a NluEnrichmentConcepts model nlu_enrichment_concepts_model_json = {} nlu_enrichment_concepts_model_json['limit'] = 38 # Construct a model instance of NluEnrichmentConcepts by calling from_dict on the json representation nlu_enrichment_concepts_model = NluEnrichmentConcepts.from_dict(nlu_enrichment_concepts_model_json) assert nlu_enrichment_concepts_model != False # Construct a model instance of NluEnrichmentConcepts by calling from_dict on the json representation nlu_enrichment_concepts_model_dict = NluEnrichmentConcepts.from_dict(nlu_enrichment_concepts_model_json).__dict__ nlu_enrichment_concepts_model2 = NluEnrichmentConcepts(**nlu_enrichment_concepts_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_concepts_model == nlu_enrichment_concepts_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_concepts_model_json2 = nlu_enrichment_concepts_model.to_dict() assert nlu_enrichment_concepts_model_json2 == nlu_enrichment_concepts_model_json class TestNluEnrichmentEmotion(): """ Test Class for NluEnrichmentEmotion """ def test_nlu_enrichment_emotion_serialization(self): """ Test serialization/deserialization for NluEnrichmentEmotion """ # Construct a json representation of a NluEnrichmentEmotion model nlu_enrichment_emotion_model_json = {} nlu_enrichment_emotion_model_json['document'] = True nlu_enrichment_emotion_model_json['targets'] = ['testString'] # Construct a model instance of NluEnrichmentEmotion by calling from_dict on the json representation nlu_enrichment_emotion_model = NluEnrichmentEmotion.from_dict(nlu_enrichment_emotion_model_json) assert nlu_enrichment_emotion_model != False # Construct a model instance of NluEnrichmentEmotion by calling from_dict on the json representation nlu_enrichment_emotion_model_dict = NluEnrichmentEmotion.from_dict(nlu_enrichment_emotion_model_json).__dict__ nlu_enrichment_emotion_model2 = NluEnrichmentEmotion(**nlu_enrichment_emotion_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_emotion_model == nlu_enrichment_emotion_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_emotion_model_json2 = nlu_enrichment_emotion_model.to_dict() assert nlu_enrichment_emotion_model_json2 == nlu_enrichment_emotion_model_json class TestNluEnrichmentEntities(): """ Test Class for NluEnrichmentEntities """ def test_nlu_enrichment_entities_serialization(self): """ Test serialization/deserialization for NluEnrichmentEntities """ # Construct a json representation of a NluEnrichmentEntities model nlu_enrichment_entities_model_json = {} nlu_enrichment_entities_model_json['sentiment'] = True nlu_enrichment_entities_model_json['emotion'] = True nlu_enrichment_entities_model_json['limit'] = 38 nlu_enrichment_entities_model_json['mentions'] = True nlu_enrichment_entities_model_json['mention_types'] = True nlu_enrichment_entities_model_json['sentence_locations'] = True nlu_enrichment_entities_model_json['model'] = 'testString' # Construct a model instance of NluEnrichmentEntities by calling from_dict on the json representation nlu_enrichment_entities_model = NluEnrichmentEntities.from_dict(nlu_enrichment_entities_model_json) assert nlu_enrichment_entities_model != False # Construct a model instance of NluEnrichmentEntities by calling from_dict on the json representation nlu_enrichment_entities_model_dict = NluEnrichmentEntities.from_dict(nlu_enrichment_entities_model_json).__dict__ nlu_enrichment_entities_model2 = NluEnrichmentEntities(**nlu_enrichment_entities_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_entities_model == nlu_enrichment_entities_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_entities_model_json2 = nlu_enrichment_entities_model.to_dict() assert nlu_enrichment_entities_model_json2 == nlu_enrichment_entities_model_json class TestNluEnrichmentFeatures(): """ Test Class for NluEnrichmentFeatures """ def test_nlu_enrichment_features_serialization(self): """ Test serialization/deserialization for NluEnrichmentFeatures """ # Construct dict forms of any model objects needed in order to build this model. nlu_enrichment_keywords_model = {} # NluEnrichmentKeywords nlu_enrichment_keywords_model['sentiment'] = True nlu_enrichment_keywords_model['emotion'] = True nlu_enrichment_keywords_model['limit'] = 38 nlu_enrichment_entities_model = {} # NluEnrichmentEntities nlu_enrichment_entities_model['sentiment'] = True nlu_enrichment_entities_model['emotion'] = True nlu_enrichment_entities_model['limit'] = 38 nlu_enrichment_entities_model['mentions'] = True nlu_enrichment_entities_model['mention_types'] = True nlu_enrichment_entities_model['sentence_locations'] = True nlu_enrichment_entities_model['model'] = 'testString' nlu_enrichment_sentiment_model = {} # NluEnrichmentSentiment nlu_enrichment_sentiment_model['document'] = True nlu_enrichment_sentiment_model['targets'] = ['testString'] nlu_enrichment_emotion_model = {} # NluEnrichmentEmotion nlu_enrichment_emotion_model['document'] = True nlu_enrichment_emotion_model['targets'] = ['testString'] nlu_enrichment_semantic_roles_model = {} # NluEnrichmentSemanticRoles nlu_enrichment_semantic_roles_model['entities'] = True nlu_enrichment_semantic_roles_model['keywords'] = True nlu_enrichment_semantic_roles_model['limit'] = 38 nlu_enrichment_relations_model = {} # NluEnrichmentRelations nlu_enrichment_relations_model['model'] = 'testString' nlu_enrichment_concepts_model = {} # NluEnrichmentConcepts nlu_enrichment_concepts_model['limit'] = 38 # Construct a json representation of a NluEnrichmentFeatures model nlu_enrichment_features_model_json = {} nlu_enrichment_features_model_json['keywords'] = nlu_enrichment_keywords_model nlu_enrichment_features_model_json['entities'] = nlu_enrichment_entities_model nlu_enrichment_features_model_json['sentiment'] = nlu_enrichment_sentiment_model nlu_enrichment_features_model_json['emotion'] = nlu_enrichment_emotion_model nlu_enrichment_features_model_json['categories'] = {} nlu_enrichment_features_model_json['semantic_roles'] = nlu_enrichment_semantic_roles_model nlu_enrichment_features_model_json['relations'] = nlu_enrichment_relations_model nlu_enrichment_features_model_json['concepts'] = nlu_enrichment_concepts_model # Construct a model instance of NluEnrichmentFeatures by calling from_dict on the json representation nlu_enrichment_features_model = NluEnrichmentFeatures.from_dict(nlu_enrichment_features_model_json) assert nlu_enrichment_features_model != False # Construct a model instance of NluEnrichmentFeatures by calling from_dict on the json representation nlu_enrichment_features_model_dict = NluEnrichmentFeatures.from_dict(nlu_enrichment_features_model_json).__dict__ nlu_enrichment_features_model2 = NluEnrichmentFeatures(**nlu_enrichment_features_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_features_model == nlu_enrichment_features_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_features_model_json2 = nlu_enrichment_features_model.to_dict() assert nlu_enrichment_features_model_json2 == nlu_enrichment_features_model_json class TestNluEnrichmentKeywords(): """ Test Class for NluEnrichmentKeywords """ def test_nlu_enrichment_keywords_serialization(self): """ Test serialization/deserialization for NluEnrichmentKeywords """ # Construct a json representation of a NluEnrichmentKeywords model nlu_enrichment_keywords_model_json = {} nlu_enrichment_keywords_model_json['sentiment'] = True nlu_enrichment_keywords_model_json['emotion'] = True nlu_enrichment_keywords_model_json['limit'] = 38 # Construct a model instance of NluEnrichmentKeywords by calling from_dict on the json representation nlu_enrichment_keywords_model = NluEnrichmentKeywords.from_dict(nlu_enrichment_keywords_model_json) assert nlu_enrichment_keywords_model != False # Construct a model instance of NluEnrichmentKeywords by calling from_dict on the json representation nlu_enrichment_keywords_model_dict = NluEnrichmentKeywords.from_dict(nlu_enrichment_keywords_model_json).__dict__ nlu_enrichment_keywords_model2 = NluEnrichmentKeywords(**nlu_enrichment_keywords_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_keywords_model == nlu_enrichment_keywords_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_keywords_model_json2 = nlu_enrichment_keywords_model.to_dict() assert nlu_enrichment_keywords_model_json2 == nlu_enrichment_keywords_model_json class TestNluEnrichmentRelations(): """ Test Class for NluEnrichmentRelations """ def test_nlu_enrichment_relations_serialization(self): """ Test serialization/deserialization for NluEnrichmentRelations """ # Construct a json representation of a NluEnrichmentRelations model nlu_enrichment_relations_model_json = {} nlu_enrichment_relations_model_json['model'] = 'testString' # Construct a model instance of NluEnrichmentRelations by calling from_dict on the json representation nlu_enrichment_relations_model = NluEnrichmentRelations.from_dict(nlu_enrichment_relations_model_json) assert nlu_enrichment_relations_model != False # Construct a model instance of NluEnrichmentRelations by calling from_dict on the json representation nlu_enrichment_relations_model_dict = NluEnrichmentRelations.from_dict(nlu_enrichment_relations_model_json).__dict__ nlu_enrichment_relations_model2 = NluEnrichmentRelations(**nlu_enrichment_relations_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_relations_model == nlu_enrichment_relations_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_relations_model_json2 = nlu_enrichment_relations_model.to_dict() assert nlu_enrichment_relations_model_json2 == nlu_enrichment_relations_model_json class TestNluEnrichmentSemanticRoles(): """ Test Class for NluEnrichmentSemanticRoles """ def test_nlu_enrichment_semantic_roles_serialization(self): """ Test serialization/deserialization for NluEnrichmentSemanticRoles """ # Construct a json representation of a NluEnrichmentSemanticRoles model nlu_enrichment_semantic_roles_model_json = {} nlu_enrichment_semantic_roles_model_json['entities'] = True nlu_enrichment_semantic_roles_model_json['keywords'] = True nlu_enrichment_semantic_roles_model_json['limit'] = 38 # Construct a model instance of NluEnrichmentSemanticRoles by calling from_dict on the json representation nlu_enrichment_semantic_roles_model = NluEnrichmentSemanticRoles.from_dict(nlu_enrichment_semantic_roles_model_json) assert nlu_enrichment_semantic_roles_model != False # Construct a model instance of NluEnrichmentSemanticRoles by calling from_dict on the json representation nlu_enrichment_semantic_roles_model_dict = NluEnrichmentSemanticRoles.from_dict(nlu_enrichment_semantic_roles_model_json).__dict__ nlu_enrichment_semantic_roles_model2 = NluEnrichmentSemanticRoles(**nlu_enrichment_semantic_roles_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_semantic_roles_model == nlu_enrichment_semantic_roles_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_semantic_roles_model_json2 = nlu_enrichment_semantic_roles_model.to_dict() assert nlu_enrichment_semantic_roles_model_json2 == nlu_enrichment_semantic_roles_model_json class TestNluEnrichmentSentiment(): """ Test Class for NluEnrichmentSentiment """ def test_nlu_enrichment_sentiment_serialization(self): """ Test serialization/deserialization for NluEnrichmentSentiment """ # Construct a json representation of a NluEnrichmentSentiment model nlu_enrichment_sentiment_model_json = {} nlu_enrichment_sentiment_model_json['document'] = True nlu_enrichment_sentiment_model_json['targets'] = ['testString'] # Construct a model instance of NluEnrichmentSentiment by calling from_dict on the json representation nlu_enrichment_sentiment_model = NluEnrichmentSentiment.from_dict(nlu_enrichment_sentiment_model_json) assert nlu_enrichment_sentiment_model != False # Construct a model instance of NluEnrichmentSentiment by calling from_dict on the json representation nlu_enrichment_sentiment_model_dict = NluEnrichmentSentiment.from_dict(nlu_enrichment_sentiment_model_json).__dict__ nlu_enrichment_sentiment_model2 = NluEnrichmentSentiment(**nlu_enrichment_sentiment_model_dict) # Verify the model instances are equivalent assert nlu_enrichment_sentiment_model == nlu_enrichment_sentiment_model2 # Convert model instance back to dict and verify no loss of data nlu_enrichment_sentiment_model_json2 = nlu_enrichment_sentiment_model.to_dict() assert nlu_enrichment_sentiment_model_json2 == nlu_enrichment_sentiment_model_json class TestNormalizationOperation(): """ Test Class for NormalizationOperation """ def test_normalization_operation_serialization(self): """ Test serialization/deserialization for NormalizationOperation """ # Construct a json representation of a NormalizationOperation model normalization_operation_model_json = {} normalization_operation_model_json['operation'] = 'copy' normalization_operation_model_json['source_field'] = 'testString' normalization_operation_model_json['destination_field'] = 'testString' # Construct a model instance of NormalizationOperation by calling from_dict on the json representation normalization_operation_model = NormalizationOperation.from_dict(normalization_operation_model_json) assert normalization_operation_model != False # Construct a model instance of NormalizationOperation by calling from_dict on the json representation normalization_operation_model_dict = NormalizationOperation.from_dict(normalization_operation_model_json).__dict__ normalization_operation_model2 = NormalizationOperation(**normalization_operation_model_dict) # Verify the model instances are equivalent assert normalization_operation_model == normalization_operation_model2 # Convert model instance back to dict and verify no loss of data normalization_operation_model_json2 = normalization_operation_model.to_dict() assert normalization_operation_model_json2 == normalization_operation_model_json class TestNotice(): """ Test Class for Notice """ def test_notice_serialization(self): """ Test serialization/deserialization for Notice """ # Construct a json representation of a Notice model notice_model_json = {} notice_model_json['notice_id'] = 'testString' notice_model_json['created'] = '2020-01-28T18:40:40.123456Z' notice_model_json['document_id'] = 'testString' notice_model_json['query_id'] = 'testString' notice_model_json['severity'] = 'warning' notice_model_json['step'] = 'testString' notice_model_json['description'] = 'testString' # Construct a model instance of Notice by calling from_dict on the json representation notice_model = Notice.from_dict(notice_model_json) assert notice_model != False # Construct a model instance of Notice by calling from_dict on the json representation notice_model_dict = Notice.from_dict(notice_model_json).__dict__ notice_model2 = Notice(**notice_model_dict) # Verify the model instances are equivalent assert notice_model == notice_model2 # Convert model instance back to dict and verify no loss of data notice_model_json2 = notice_model.to_dict() assert notice_model_json2 == notice_model_json class TestPdfHeadingDetection(): """ Test Class for PdfHeadingDetection """ def test_pdf_heading_detection_serialization(self): """ Test serialization/deserialization for PdfHeadingDetection """ # Construct dict forms of any model objects needed in order to build this model. font_setting_model = {} # FontSetting font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' # Construct a json representation of a PdfHeadingDetection model pdf_heading_detection_model_json = {} pdf_heading_detection_model_json['fonts'] = [font_setting_model] # Construct a model instance of PdfHeadingDetection by calling from_dict on the json representation pdf_heading_detection_model = PdfHeadingDetection.from_dict(pdf_heading_detection_model_json) assert pdf_heading_detection_model != False # Construct a model instance of PdfHeadingDetection by calling from_dict on the json representation pdf_heading_detection_model_dict = PdfHeadingDetection.from_dict(pdf_heading_detection_model_json).__dict__ pdf_heading_detection_model2 = PdfHeadingDetection(**pdf_heading_detection_model_dict) # Verify the model instances are equivalent assert pdf_heading_detection_model == pdf_heading_detection_model2 # Convert model instance back to dict and verify no loss of data pdf_heading_detection_model_json2 = pdf_heading_detection_model.to_dict() assert pdf_heading_detection_model_json2 == pdf_heading_detection_model_json class TestPdfSettings(): """ Test Class for PdfSettings """ def test_pdf_settings_serialization(self): """ Test serialization/deserialization for PdfSettings """ # Construct dict forms of any model objects needed in order to build this model. font_setting_model = {} # FontSetting font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' pdf_heading_detection_model = {} # PdfHeadingDetection pdf_heading_detection_model['fonts'] = [font_setting_model] # Construct a json representation of a PdfSettings model pdf_settings_model_json = {} pdf_settings_model_json['heading'] = pdf_heading_detection_model # Construct a model instance of PdfSettings by calling from_dict on the json representation pdf_settings_model = PdfSettings.from_dict(pdf_settings_model_json) assert pdf_settings_model != False # Construct a model instance of PdfSettings by calling from_dict on the json representation pdf_settings_model_dict = PdfSettings.from_dict(pdf_settings_model_json).__dict__ pdf_settings_model2 = PdfSettings(**pdf_settings_model_dict) # Verify the model instances are equivalent assert pdf_settings_model == pdf_settings_model2 # Convert model instance back to dict and verify no loss of data pdf_settings_model_json2 = pdf_settings_model.to_dict() assert pdf_settings_model_json2 == pdf_settings_model_json class TestQueryAggregation(): """ Test Class for QueryAggregation """ def test_query_aggregation_serialization(self): """ Test serialization/deserialization for QueryAggregation """ # Construct a json representation of a QueryAggregation model query_aggregation_model_json = {} query_aggregation_model_json['type'] = 'testString' query_aggregation_model_json['matching_results'] = 38 # Construct a model instance of QueryAggregation by calling from_dict on the json representation query_aggregation_model = QueryAggregation.from_dict(query_aggregation_model_json) assert query_aggregation_model != False # Construct a copy of the model instance by calling from_dict on the output of to_dict query_aggregation_model_json2 = query_aggregation_model.to_dict() query_aggregation_model2 = QueryAggregation.from_dict(query_aggregation_model_json2) # Verify the model instances are equivalent assert query_aggregation_model == query_aggregation_model2 # Convert model instance back to dict and verify no loss of data query_aggregation_model_json2 = query_aggregation_model.to_dict() assert query_aggregation_model_json2 == query_aggregation_model_json class TestQueryNoticesResponse(): """ Test Class for QueryNoticesResponse """ def test_query_notices_response_serialization(self): """ Test serialization/deserialization for QueryNoticesResponse """ # Construct dict forms of any model objects needed in order to build this model. query_result_metadata_model = {} # QueryResultMetadata query_result_metadata_model['score'] = 72.5 query_result_metadata_model['confidence'] = 72.5 notice_model = {} # Notice notice_model['notice_id'] = 'xpath_not_found' notice_model['created'] = '2020-01-28T18:40:40.123456Z' notice_model['document_id'] = '030ba125-29db-43f2-8552-f941ae30a7a8' notice_model['query_id'] = 'testString' notice_model['severity'] = 'warning' notice_model['step'] = 'html-to-html' notice_model['description'] = 'The xpath expression "boom" was not found.' query_notices_result_model = {} # QueryNoticesResult query_notices_result_model['id'] = '030ba125-29db-43f2-8552-f941ae30a7a8' query_notices_result_model['metadata'] = {} query_notices_result_model['collection_id'] = 'f1360220-ea2d-4271-9d62-89a910b13c37' query_notices_result_model['result_metadata'] = query_result_metadata_model query_notices_result_model['code'] = 200 query_notices_result_model['filename'] = 'instructions.html' query_notices_result_model['file_type'] = 'html' query_notices_result_model['sha1'] = 'de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3' query_notices_result_model['notices'] = [notice_model] query_notices_result_model['foo'] = { 'foo': 'bar' } query_aggregation_model = {} # Histogram query_aggregation_model['type'] = 'histogram' query_aggregation_model['matching_results'] = 38 query_aggregation_model['field'] = 'testString' query_aggregation_model['interval'] = 38 query_passages_model = {} # QueryPassages query_passages_model['document_id'] = 'testString' query_passages_model['passage_score'] = 72.5 query_passages_model['passage_text'] = 'testString' query_passages_model['start_offset'] = 38 query_passages_model['end_offset'] = 38 query_passages_model['field'] = 'testString' # Construct a json representation of a QueryNoticesResponse model query_notices_response_model_json = {} query_notices_response_model_json['matching_results'] = 38 query_notices_response_model_json['results'] = [query_notices_result_model] query_notices_response_model_json['aggregations'] = [query_aggregation_model] query_notices_response_model_json['passages'] = [query_passages_model] query_notices_response_model_json['duplicates_removed'] = 38 # Construct a model instance of QueryNoticesResponse by calling from_dict on the json representation query_notices_response_model = QueryNoticesResponse.from_dict(query_notices_response_model_json) assert query_notices_response_model != False # Construct a model instance of QueryNoticesResponse by calling from_dict on the json representation query_notices_response_model_dict = QueryNoticesResponse.from_dict(query_notices_response_model_json).__dict__ query_notices_response_model2 = QueryNoticesResponse(**query_notices_response_model_dict) # Verify the model instances are equivalent assert query_notices_response_model == query_notices_response_model2 # Convert model instance back to dict and verify no loss of data query_notices_response_model_json2 = query_notices_response_model.to_dict() assert query_notices_response_model_json2 == query_notices_response_model_json class TestQueryNoticesResult(): """ Test Class for QueryNoticesResult """ def test_query_notices_result_serialization(self): """ Test serialization/deserialization for QueryNoticesResult """ # Construct dict forms of any model objects needed in order to build this model. query_result_metadata_model = {} # QueryResultMetadata query_result_metadata_model['score'] = 72.5 query_result_metadata_model['confidence'] = 72.5 notice_model = {} # Notice notice_model['notice_id'] = 'testString' notice_model['created'] = '2020-01-28T18:40:40.123456Z' notice_model['document_id'] = 'testString' notice_model['query_id'] = 'testString' notice_model['severity'] = 'warning' notice_model['step'] = 'testString' notice_model['description'] = 'testString' # Construct a json representation of a QueryNoticesResult model query_notices_result_model_json = {} query_notices_result_model_json['id'] = 'testString' query_notices_result_model_json['metadata'] = {} query_notices_result_model_json['collection_id'] = 'testString' query_notices_result_model_json['result_metadata'] = query_result_metadata_model query_notices_result_model_json['code'] = 38 query_notices_result_model_json['filename'] = 'testString' query_notices_result_model_json['file_type'] = 'pdf' query_notices_result_model_json['sha1'] = 'testString' query_notices_result_model_json['notices'] = [notice_model] query_notices_result_model_json['foo'] = { 'foo': 'bar' } # Construct a model instance of QueryNoticesResult by calling from_dict on the json representation query_notices_result_model = QueryNoticesResult.from_dict(query_notices_result_model_json) assert query_notices_result_model != False # Construct a model instance of QueryNoticesResult by calling from_dict on the json representation query_notices_result_model_dict = QueryNoticesResult.from_dict(query_notices_result_model_json).__dict__ query_notices_result_model2 = QueryNoticesResult(**query_notices_result_model_dict) # Verify the model instances are equivalent assert query_notices_result_model == query_notices_result_model2 # Convert model instance back to dict and verify no loss of data query_notices_result_model_json2 = query_notices_result_model.to_dict() assert query_notices_result_model_json2 == query_notices_result_model_json class TestQueryPassages(): """ Test Class for QueryPassages """ def test_query_passages_serialization(self): """ Test serialization/deserialization for QueryPassages """ # Construct a json representation of a QueryPassages model query_passages_model_json = {} query_passages_model_json['document_id'] = 'testString' query_passages_model_json['passage_score'] = 72.5 query_passages_model_json['passage_text'] = 'testString' query_passages_model_json['start_offset'] = 38 query_passages_model_json['end_offset'] = 38 query_passages_model_json['field'] = 'testString' # Construct a model instance of QueryPassages by calling from_dict on the json representation query_passages_model = QueryPassages.from_dict(query_passages_model_json) assert query_passages_model != False # Construct a model instance of QueryPassages by calling from_dict on the json representation query_passages_model_dict = QueryPassages.from_dict(query_passages_model_json).__dict__ query_passages_model2 = QueryPassages(**query_passages_model_dict) # Verify the model instances are equivalent assert query_passages_model == query_passages_model2 # Convert model instance back to dict and verify no loss of data query_passages_model_json2 = query_passages_model.to_dict() assert query_passages_model_json2 == query_passages_model_json class TestQueryResponse(): """ Test Class for QueryResponse """ def test_query_response_serialization(self): """ Test serialization/deserialization for QueryResponse """ # Construct dict forms of any model objects needed in order to build this model. query_result_metadata_model = {} # QueryResultMetadata query_result_metadata_model['score'] = 72.5 query_result_metadata_model['confidence'] = 72.5 query_result_model = {} # QueryResult query_result_model['id'] = 'watson-generated ID' query_result_model['metadata'] = {} query_result_model['collection_id'] = 'testString' query_result_model['result_metadata'] = query_result_metadata_model query_result_model['foo'] = { 'foo': 'bar' } query_aggregation_model = {} # Histogram query_aggregation_model['type'] = 'histogram' query_aggregation_model['matching_results'] = 38 query_aggregation_model['field'] = 'testString' query_aggregation_model['interval'] = 38 query_passages_model = {} # QueryPassages query_passages_model['document_id'] = 'testString' query_passages_model['passage_score'] = 72.5 query_passages_model['passage_text'] = 'testString' query_passages_model['start_offset'] = 38 query_passages_model['end_offset'] = 38 query_passages_model['field'] = 'testString' retrieval_details_model = {} # RetrievalDetails retrieval_details_model['document_retrieval_strategy'] = 'untrained' # Construct a json representation of a QueryResponse model query_response_model_json = {} query_response_model_json['matching_results'] = 38 query_response_model_json['results'] = [query_result_model] query_response_model_json['aggregations'] = [query_aggregation_model] query_response_model_json['passages'] = [query_passages_model] query_response_model_json['duplicates_removed'] = 38 query_response_model_json['session_token'] = 'testString' query_response_model_json['retrieval_details'] = retrieval_details_model query_response_model_json['suggested_query'] = 'testString' # Construct a model instance of QueryResponse by calling from_dict on the json representation query_response_model = QueryResponse.from_dict(query_response_model_json) assert query_response_model != False # Construct a model instance of QueryResponse by calling from_dict on the json representation query_response_model_dict = QueryResponse.from_dict(query_response_model_json).__dict__ query_response_model2 = QueryResponse(**query_response_model_dict) # Verify the model instances are equivalent assert query_response_model == query_response_model2 # Convert model instance back to dict and verify no loss of data query_response_model_json2 = query_response_model.to_dict() assert query_response_model_json2 == query_response_model_json class TestQueryResult(): """ Test Class for QueryResult """ def test_query_result_serialization(self): """ Test serialization/deserialization for QueryResult """ # Construct dict forms of any model objects needed in order to build this model. query_result_metadata_model = {} # QueryResultMetadata query_result_metadata_model['score'] = 72.5 query_result_metadata_model['confidence'] = 72.5 # Construct a json representation of a QueryResult model query_result_model_json = {} query_result_model_json['id'] = 'testString' query_result_model_json['metadata'] = {} query_result_model_json['collection_id'] = 'testString' query_result_model_json['result_metadata'] = query_result_metadata_model query_result_model_json['foo'] = { 'foo': 'bar' } # Construct a model instance of QueryResult by calling from_dict on the json representation query_result_model = QueryResult.from_dict(query_result_model_json) assert query_result_model != False # Construct a model instance of QueryResult by calling from_dict on the json representation query_result_model_dict = QueryResult.from_dict(query_result_model_json).__dict__ query_result_model2 = QueryResult(**query_result_model_dict) # Verify the model instances are equivalent assert query_result_model == query_result_model2 # Convert model instance back to dict and verify no loss of data query_result_model_json2 = query_result_model.to_dict() assert query_result_model_json2 == query_result_model_json class TestQueryResultMetadata(): """ Test Class for QueryResultMetadata """ def test_query_result_metadata_serialization(self): """ Test serialization/deserialization for QueryResultMetadata """ # Construct a json representation of a QueryResultMetadata model query_result_metadata_model_json = {} query_result_metadata_model_json['score'] = 72.5 query_result_metadata_model_json['confidence'] = 72.5 # Construct a model instance of QueryResultMetadata by calling from_dict on the json representation query_result_metadata_model = QueryResultMetadata.from_dict(query_result_metadata_model_json) assert query_result_metadata_model != False # Construct a model instance of QueryResultMetadata by calling from_dict on the json representation query_result_metadata_model_dict = QueryResultMetadata.from_dict(query_result_metadata_model_json).__dict__ query_result_metadata_model2 = QueryResultMetadata(**query_result_metadata_model_dict) # Verify the model instances are equivalent assert query_result_metadata_model == query_result_metadata_model2 # Convert model instance back to dict and verify no loss of data query_result_metadata_model_json2 = query_result_metadata_model.to_dict() assert query_result_metadata_model_json2 == query_result_metadata_model_json class TestRetrievalDetails(): """ Test Class for RetrievalDetails """ def test_retrieval_details_serialization(self): """ Test serialization/deserialization for RetrievalDetails """ # Construct a json representation of a RetrievalDetails model retrieval_details_model_json = {} retrieval_details_model_json['document_retrieval_strategy'] = 'untrained' # Construct a model instance of RetrievalDetails by calling from_dict on the json representation retrieval_details_model = RetrievalDetails.from_dict(retrieval_details_model_json) assert retrieval_details_model != False # Construct a model instance of RetrievalDetails by calling from_dict on the json representation retrieval_details_model_dict = RetrievalDetails.from_dict(retrieval_details_model_json).__dict__ retrieval_details_model2 = RetrievalDetails(**retrieval_details_model_dict) # Verify the model instances are equivalent assert retrieval_details_model == retrieval_details_model2 # Convert model instance back to dict and verify no loss of data retrieval_details_model_json2 = retrieval_details_model.to_dict() assert retrieval_details_model_json2 == retrieval_details_model_json class TestSduStatus(): """ Test Class for SduStatus """ def test_sdu_status_serialization(self): """ Test serialization/deserialization for SduStatus """ # Construct dict forms of any model objects needed in order to build this model. sdu_status_custom_fields_model = {} # SduStatusCustomFields sdu_status_custom_fields_model['defined'] = 26 sdu_status_custom_fields_model['maximum_allowed'] = 26 # Construct a json representation of a SduStatus model sdu_status_model_json = {} sdu_status_model_json['enabled'] = True sdu_status_model_json['total_annotated_pages'] = 26 sdu_status_model_json['total_pages'] = 26 sdu_status_model_json['total_documents'] = 26 sdu_status_model_json['custom_fields'] = sdu_status_custom_fields_model # Construct a model instance of SduStatus by calling from_dict on the json representation sdu_status_model = SduStatus.from_dict(sdu_status_model_json) assert sdu_status_model != False # Construct a model instance of SduStatus by calling from_dict on the json representation sdu_status_model_dict = SduStatus.from_dict(sdu_status_model_json).__dict__ sdu_status_model2 = SduStatus(**sdu_status_model_dict) # Verify the model instances are equivalent assert sdu_status_model == sdu_status_model2 # Convert model instance back to dict and verify no loss of data sdu_status_model_json2 = sdu_status_model.to_dict() assert sdu_status_model_json2 == sdu_status_model_json class TestSduStatusCustomFields(): """ Test Class for SduStatusCustomFields """ def test_sdu_status_custom_fields_serialization(self): """ Test serialization/deserialization for SduStatusCustomFields """ # Construct a json representation of a SduStatusCustomFields model sdu_status_custom_fields_model_json = {} sdu_status_custom_fields_model_json['defined'] = 26 sdu_status_custom_fields_model_json['maximum_allowed'] = 26 # Construct a model instance of SduStatusCustomFields by calling from_dict on the json representation sdu_status_custom_fields_model = SduStatusCustomFields.from_dict(sdu_status_custom_fields_model_json) assert sdu_status_custom_fields_model != False # Construct a model instance of SduStatusCustomFields by calling from_dict on the json representation sdu_status_custom_fields_model_dict = SduStatusCustomFields.from_dict(sdu_status_custom_fields_model_json).__dict__ sdu_status_custom_fields_model2 = SduStatusCustomFields(**sdu_status_custom_fields_model_dict) # Verify the model instances are equivalent assert sdu_status_custom_fields_model == sdu_status_custom_fields_model2 # Convert model instance back to dict and verify no loss of data sdu_status_custom_fields_model_json2 = sdu_status_custom_fields_model.to_dict() assert sdu_status_custom_fields_model_json2 == sdu_status_custom_fields_model_json class TestSearchStatus(): """ Test Class for SearchStatus """ def test_search_status_serialization(self): """ Test serialization/deserialization for SearchStatus """ # Construct a json representation of a SearchStatus model search_status_model_json = {} search_status_model_json['scope'] = 'testString' search_status_model_json['status'] = 'NO_DATA' search_status_model_json['status_description'] = 'testString' search_status_model_json['last_trained'] = '2020-01-28' # Construct a model instance of SearchStatus by calling from_dict on the json representation search_status_model = SearchStatus.from_dict(search_status_model_json) assert search_status_model != False # Construct a model instance of SearchStatus by calling from_dict on the json representation search_status_model_dict = SearchStatus.from_dict(search_status_model_json).__dict__ search_status_model2 = SearchStatus(**search_status_model_dict) # Verify the model instances are equivalent assert search_status_model == search_status_model2 # Convert model instance back to dict and verify no loss of data search_status_model_json2 = search_status_model.to_dict() assert search_status_model_json2 == search_status_model_json class TestSegmentSettings(): """ Test Class for SegmentSettings """ def test_segment_settings_serialization(self): """ Test serialization/deserialization for SegmentSettings """ # Construct a json representation of a SegmentSettings model segment_settings_model_json = {} segment_settings_model_json['enabled'] = True segment_settings_model_json['selector_tags'] = ['testString'] segment_settings_model_json['annotated_fields'] = ['testString'] # Construct a model instance of SegmentSettings by calling from_dict on the json representation segment_settings_model = SegmentSettings.from_dict(segment_settings_model_json) assert segment_settings_model != False # Construct a model instance of SegmentSettings by calling from_dict on the json representation segment_settings_model_dict = SegmentSettings.from_dict(segment_settings_model_json).__dict__ segment_settings_model2 = SegmentSettings(**segment_settings_model_dict) # Verify the model instances are equivalent assert segment_settings_model == segment_settings_model2 # Convert model instance back to dict and verify no loss of data segment_settings_model_json2 = segment_settings_model.to_dict() assert segment_settings_model_json2 == segment_settings_model_json class TestSource(): """ Test Class for Source """ def test_source_serialization(self): """ Test serialization/deserialization for Source """ # Construct dict forms of any model objects needed in order to build this model. source_schedule_model = {} # SourceSchedule source_schedule_model['enabled'] = True source_schedule_model['time_zone'] = 'testString' source_schedule_model['frequency'] = 'daily' source_options_folder_model = {} # SourceOptionsFolder source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 source_options_object_model = {} # SourceOptionsObject source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 source_options_site_coll_model = {} # SourceOptionsSiteColl source_options_site_coll_model['site_collection_path'] = 'testString' source_options_site_coll_model['limit'] = 38 source_options_web_crawl_model = {} # SourceOptionsWebCrawl source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] source_options_buckets_model = {} # SourceOptionsBuckets source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 source_options_model = {} # SourceOptions source_options_model['folders'] = [source_options_folder_model] source_options_model['objects'] = [source_options_object_model] source_options_model['site_collections'] = [source_options_site_coll_model] source_options_model['urls'] = [source_options_web_crawl_model] source_options_model['buckets'] = [source_options_buckets_model] source_options_model['crawl_all_buckets'] = True # Construct a json representation of a Source model source_model_json = {} source_model_json['type'] = 'box' source_model_json['credential_id'] = 'testString' source_model_json['schedule'] = source_schedule_model source_model_json['options'] = source_options_model # Construct a model instance of Source by calling from_dict on the json representation source_model = Source.from_dict(source_model_json) assert source_model != False # Construct a model instance of Source by calling from_dict on the json representation source_model_dict = Source.from_dict(source_model_json).__dict__ source_model2 = Source(**source_model_dict) # Verify the model instances are equivalent assert source_model == source_model2 # Convert model instance back to dict and verify no loss of data source_model_json2 = source_model.to_dict() assert source_model_json2 == source_model_json class TestSourceOptions(): """ Test Class for SourceOptions """ def test_source_options_serialization(self): """ Test serialization/deserialization for SourceOptions """ # Construct dict forms of any model objects needed in order to build this model. source_options_folder_model = {} # SourceOptionsFolder source_options_folder_model['owner_user_id'] = 'testString' source_options_folder_model['folder_id'] = 'testString' source_options_folder_model['limit'] = 38 source_options_object_model = {} # SourceOptionsObject source_options_object_model['name'] = 'testString' source_options_object_model['limit'] = 38 source_options_site_coll_model = {} # SourceOptionsSiteColl source_options_site_coll_model['site_collection_path'] = 'testString' source_options_site_coll_model['limit'] = 38 source_options_web_crawl_model = {} # SourceOptionsWebCrawl source_options_web_crawl_model['url'] = 'testString' source_options_web_crawl_model['limit_to_starting_hosts'] = True source_options_web_crawl_model['crawl_speed'] = 'gentle' source_options_web_crawl_model['allow_untrusted_certificate'] = True source_options_web_crawl_model['maximum_hops'] = 38 source_options_web_crawl_model['request_timeout'] = 38 source_options_web_crawl_model['override_robots_txt'] = True source_options_web_crawl_model['blacklist'] = ['testString'] source_options_buckets_model = {} # SourceOptionsBuckets source_options_buckets_model['name'] = 'testString' source_options_buckets_model['limit'] = 38 # Construct a json representation of a SourceOptions model source_options_model_json = {} source_options_model_json['folders'] = [source_options_folder_model] source_options_model_json['objects'] = [source_options_object_model] source_options_model_json['site_collections'] = [source_options_site_coll_model] source_options_model_json['urls'] = [source_options_web_crawl_model] source_options_model_json['buckets'] = [source_options_buckets_model] source_options_model_json['crawl_all_buckets'] = True # Construct a model instance of SourceOptions by calling from_dict on the json representation source_options_model = SourceOptions.from_dict(source_options_model_json) assert source_options_model != False # Construct a model instance of SourceOptions by calling from_dict on the json representation source_options_model_dict = SourceOptions.from_dict(source_options_model_json).__dict__ source_options_model2 = SourceOptions(**source_options_model_dict) # Verify the model instances are equivalent assert source_options_model == source_options_model2 # Convert model instance back to dict and verify no loss of data source_options_model_json2 = source_options_model.to_dict() assert source_options_model_json2 == source_options_model_json class TestSourceOptionsBuckets(): """ Test Class for SourceOptionsBuckets """ def test_source_options_buckets_serialization(self): """ Test serialization/deserialization for SourceOptionsBuckets """ # Construct a json representation of a SourceOptionsBuckets model source_options_buckets_model_json = {} source_options_buckets_model_json['name'] = 'testString' source_options_buckets_model_json['limit'] = 38 # Construct a model instance of SourceOptionsBuckets by calling from_dict on the json representation source_options_buckets_model = SourceOptionsBuckets.from_dict(source_options_buckets_model_json) assert source_options_buckets_model != False # Construct a model instance of SourceOptionsBuckets by calling from_dict on the json representation source_options_buckets_model_dict = SourceOptionsBuckets.from_dict(source_options_buckets_model_json).__dict__ source_options_buckets_model2 = SourceOptionsBuckets(**source_options_buckets_model_dict) # Verify the model instances are equivalent assert source_options_buckets_model == source_options_buckets_model2 # Convert model instance back to dict and verify no loss of data source_options_buckets_model_json2 = source_options_buckets_model.to_dict() assert source_options_buckets_model_json2 == source_options_buckets_model_json class TestSourceOptionsFolder(): """ Test Class for SourceOptionsFolder """ def test_source_options_folder_serialization(self): """ Test serialization/deserialization for SourceOptionsFolder """ # Construct a json representation of a SourceOptionsFolder model source_options_folder_model_json = {} source_options_folder_model_json['owner_user_id'] = 'testString' source_options_folder_model_json['folder_id'] = 'testString' source_options_folder_model_json['limit'] = 38 # Construct a model instance of SourceOptionsFolder by calling from_dict on the json representation source_options_folder_model = SourceOptionsFolder.from_dict(source_options_folder_model_json) assert source_options_folder_model != False # Construct a model instance of SourceOptionsFolder by calling from_dict on the json representation source_options_folder_model_dict = SourceOptionsFolder.from_dict(source_options_folder_model_json).__dict__ source_options_folder_model2 = SourceOptionsFolder(**source_options_folder_model_dict) # Verify the model instances are equivalent assert source_options_folder_model == source_options_folder_model2 # Convert model instance back to dict and verify no loss of data source_options_folder_model_json2 = source_options_folder_model.to_dict() assert source_options_folder_model_json2 == source_options_folder_model_json class TestSourceOptionsObject(): """ Test Class for SourceOptionsObject """ def test_source_options_object_serialization(self): """ Test serialization/deserialization for SourceOptionsObject """ # Construct a json representation of a SourceOptionsObject model source_options_object_model_json = {} source_options_object_model_json['name'] = 'testString' source_options_object_model_json['limit'] = 38 # Construct a model instance of SourceOptionsObject by calling from_dict on the json representation source_options_object_model = SourceOptionsObject.from_dict(source_options_object_model_json) assert source_options_object_model != False # Construct a model instance of SourceOptionsObject by calling from_dict on the json representation source_options_object_model_dict = SourceOptionsObject.from_dict(source_options_object_model_json).__dict__ source_options_object_model2 = SourceOptionsObject(**source_options_object_model_dict) # Verify the model instances are equivalent assert source_options_object_model == source_options_object_model2 # Convert model instance back to dict and verify no loss of data source_options_object_model_json2 = source_options_object_model.to_dict() assert source_options_object_model_json2 == source_options_object_model_json class TestSourceOptionsSiteColl(): """ Test Class for SourceOptionsSiteColl """ def test_source_options_site_coll_serialization(self): """ Test serialization/deserialization for SourceOptionsSiteColl """ # Construct a json representation of a SourceOptionsSiteColl model source_options_site_coll_model_json = {} source_options_site_coll_model_json['site_collection_path'] = 'testString' source_options_site_coll_model_json['limit'] = 38 # Construct a model instance of SourceOptionsSiteColl by calling from_dict on the json representation source_options_site_coll_model = SourceOptionsSiteColl.from_dict(source_options_site_coll_model_json) assert source_options_site_coll_model != False # Construct a model instance of SourceOptionsSiteColl by calling from_dict on the json representation source_options_site_coll_model_dict = SourceOptionsSiteColl.from_dict(source_options_site_coll_model_json).__dict__ source_options_site_coll_model2 = SourceOptionsSiteColl(**source_options_site_coll_model_dict) # Verify the model instances are equivalent assert source_options_site_coll_model == source_options_site_coll_model2 # Convert model instance back to dict and verify no loss of data source_options_site_coll_model_json2 = source_options_site_coll_model.to_dict() assert source_options_site_coll_model_json2 == source_options_site_coll_model_json class TestSourceOptionsWebCrawl(): """ Test Class for SourceOptionsWebCrawl """ def test_source_options_web_crawl_serialization(self): """ Test serialization/deserialization for SourceOptionsWebCrawl """ # Construct a json representation of a SourceOptionsWebCrawl model source_options_web_crawl_model_json = {} source_options_web_crawl_model_json['url'] = 'testString' source_options_web_crawl_model_json['limit_to_starting_hosts'] = True source_options_web_crawl_model_json['crawl_speed'] = 'gentle' source_options_web_crawl_model_json['allow_untrusted_certificate'] = True source_options_web_crawl_model_json['maximum_hops'] = 38 source_options_web_crawl_model_json['request_timeout'] = 38 source_options_web_crawl_model_json['override_robots_txt'] = True source_options_web_crawl_model_json['blacklist'] = ['testString'] # Construct a model instance of SourceOptionsWebCrawl by calling from_dict on the json representation source_options_web_crawl_model = SourceOptionsWebCrawl.from_dict(source_options_web_crawl_model_json) assert source_options_web_crawl_model != False # Construct a model instance of SourceOptionsWebCrawl by calling from_dict on the json representation source_options_web_crawl_model_dict = SourceOptionsWebCrawl.from_dict(source_options_web_crawl_model_json).__dict__ source_options_web_crawl_model2 = SourceOptionsWebCrawl(**source_options_web_crawl_model_dict) # Verify the model instances are equivalent assert source_options_web_crawl_model == source_options_web_crawl_model2 # Convert model instance back to dict and verify no loss of data source_options_web_crawl_model_json2 = source_options_web_crawl_model.to_dict() assert source_options_web_crawl_model_json2 == source_options_web_crawl_model_json class TestSourceSchedule(): """ Test Class for SourceSchedule """ def test_source_schedule_serialization(self): """ Test serialization/deserialization for SourceSchedule """ # Construct a json representation of a SourceSchedule model source_schedule_model_json = {} source_schedule_model_json['enabled'] = True source_schedule_model_json['time_zone'] = 'testString' source_schedule_model_json['frequency'] = 'daily' # Construct a model instance of SourceSchedule by calling from_dict on the json representation source_schedule_model = SourceSchedule.from_dict(source_schedule_model_json) assert source_schedule_model != False # Construct a model instance of SourceSchedule by calling from_dict on the json representation source_schedule_model_dict = SourceSchedule.from_dict(source_schedule_model_json).__dict__ source_schedule_model2 = SourceSchedule(**source_schedule_model_dict) # Verify the model instances are equivalent assert source_schedule_model == source_schedule_model2 # Convert model instance back to dict and verify no loss of data source_schedule_model_json2 = source_schedule_model.to_dict() assert source_schedule_model_json2 == source_schedule_model_json class TestSourceStatus(): """ Test Class for SourceStatus """ def test_source_status_serialization(self): """ Test serialization/deserialization for SourceStatus """ # Construct a json representation of a SourceStatus model source_status_model_json = {} source_status_model_json['status'] = 'running' source_status_model_json['next_crawl'] = '2020-01-28T18:40:40.123456Z' # Construct a model instance of SourceStatus by calling from_dict on the json representation source_status_model = SourceStatus.from_dict(source_status_model_json) assert source_status_model != False # Construct a model instance of SourceStatus by calling from_dict on the json representation source_status_model_dict = SourceStatus.from_dict(source_status_model_json).__dict__ source_status_model2 = SourceStatus(**source_status_model_dict) # Verify the model instances are equivalent assert source_status_model == source_status_model2 # Convert model instance back to dict and verify no loss of data source_status_model_json2 = source_status_model.to_dict() assert source_status_model_json2 == source_status_model_json class TestTokenDictRule(): """ Test Class for TokenDictRule """ def test_token_dict_rule_serialization(self): """ Test serialization/deserialization for TokenDictRule """ # Construct a json representation of a TokenDictRule model token_dict_rule_model_json = {} token_dict_rule_model_json['text'] = 'testString' token_dict_rule_model_json['tokens'] = ['testString'] token_dict_rule_model_json['readings'] = ['testString'] token_dict_rule_model_json['part_of_speech'] = 'testString' # Construct a model instance of TokenDictRule by calling from_dict on the json representation token_dict_rule_model = TokenDictRule.from_dict(token_dict_rule_model_json) assert token_dict_rule_model != False # Construct a model instance of TokenDictRule by calling from_dict on the json representation token_dict_rule_model_dict = TokenDictRule.from_dict(token_dict_rule_model_json).__dict__ token_dict_rule_model2 = TokenDictRule(**token_dict_rule_model_dict) # Verify the model instances are equivalent assert token_dict_rule_model == token_dict_rule_model2 # Convert model instance back to dict and verify no loss of data token_dict_rule_model_json2 = token_dict_rule_model.to_dict() assert token_dict_rule_model_json2 == token_dict_rule_model_json class TestTokenDictStatusResponse(): """ Test Class for TokenDictStatusResponse """ def test_token_dict_status_response_serialization(self): """ Test serialization/deserialization for TokenDictStatusResponse """ # Construct a json representation of a TokenDictStatusResponse model token_dict_status_response_model_json = {} token_dict_status_response_model_json['status'] = 'active' token_dict_status_response_model_json['type'] = 'testString' # Construct a model instance of TokenDictStatusResponse by calling from_dict on the json representation token_dict_status_response_model = TokenDictStatusResponse.from_dict(token_dict_status_response_model_json) assert token_dict_status_response_model != False # Construct a model instance of TokenDictStatusResponse by calling from_dict on the json representation token_dict_status_response_model_dict = TokenDictStatusResponse.from_dict(token_dict_status_response_model_json).__dict__ token_dict_status_response_model2 = TokenDictStatusResponse(**token_dict_status_response_model_dict) # Verify the model instances are equivalent assert token_dict_status_response_model == token_dict_status_response_model2 # Convert model instance back to dict and verify no loss of data token_dict_status_response_model_json2 = token_dict_status_response_model.to_dict() assert token_dict_status_response_model_json2 == token_dict_status_response_model_json class TestTopHitsResults(): """ Test Class for TopHitsResults """ def test_top_hits_results_serialization(self): """ Test serialization/deserialization for TopHitsResults """ # Construct dict forms of any model objects needed in order to build this model. query_result_metadata_model = {} # QueryResultMetadata query_result_metadata_model['score'] = 72.5 query_result_metadata_model['confidence'] = 72.5 query_result_model = {} # QueryResult query_result_model['id'] = 'testString' query_result_model['metadata'] = {} query_result_model['collection_id'] = 'testString' query_result_model['result_metadata'] = query_result_metadata_model query_result_model['foo'] = { 'foo': 'bar' } # Construct a json representation of a TopHitsResults model top_hits_results_model_json = {} top_hits_results_model_json['matching_results'] = 38 top_hits_results_model_json['hits'] = [query_result_model] # Construct a model instance of TopHitsResults by calling from_dict on the json representation top_hits_results_model = TopHitsResults.from_dict(top_hits_results_model_json) assert top_hits_results_model != False # Construct a model instance of TopHitsResults by calling from_dict on the json representation top_hits_results_model_dict = TopHitsResults.from_dict(top_hits_results_model_json).__dict__ top_hits_results_model2 = TopHitsResults(**top_hits_results_model_dict) # Verify the model instances are equivalent assert top_hits_results_model == top_hits_results_model2 # Convert model instance back to dict and verify no loss of data top_hits_results_model_json2 = top_hits_results_model.to_dict() assert top_hits_results_model_json2 == top_hits_results_model_json class TestTrainingDataSet(): """ Test Class for TrainingDataSet """ def test_training_data_set_serialization(self): """ Test serialization/deserialization for TrainingDataSet """ # Construct dict forms of any model objects needed in order to build this model. training_example_model = {} # TrainingExample training_example_model['document_id'] = 'testString' training_example_model['cross_reference'] = 'testString' training_example_model['relevance'] = 38 training_query_model = {} # TrainingQuery training_query_model['query_id'] = 'testString' training_query_model['natural_language_query'] = 'testString' training_query_model['filter'] = 'testString' training_query_model['examples'] = [training_example_model] # Construct a json representation of a TrainingDataSet model training_data_set_model_json = {} training_data_set_model_json['environment_id'] = 'testString' training_data_set_model_json['collection_id'] = 'testString' training_data_set_model_json['queries'] = [training_query_model] # Construct a model instance of TrainingDataSet by calling from_dict on the json representation training_data_set_model = TrainingDataSet.from_dict(training_data_set_model_json) assert training_data_set_model != False # Construct a model instance of TrainingDataSet by calling from_dict on the json representation training_data_set_model_dict = TrainingDataSet.from_dict(training_data_set_model_json).__dict__ training_data_set_model2 = TrainingDataSet(**training_data_set_model_dict) # Verify the model instances are equivalent assert training_data_set_model == training_data_set_model2 # Convert model instance back to dict and verify no loss of data training_data_set_model_json2 = training_data_set_model.to_dict() assert training_data_set_model_json2 == training_data_set_model_json class TestTrainingExample(): """ Test Class for TrainingExample """ def test_training_example_serialization(self): """ Test serialization/deserialization for TrainingExample """ # Construct a json representation of a TrainingExample model training_example_model_json = {} training_example_model_json['document_id'] = 'testString' training_example_model_json['cross_reference'] = 'testString' training_example_model_json['relevance'] = 38 # Construct a model instance of TrainingExample by calling from_dict on the json representation training_example_model = TrainingExample.from_dict(training_example_model_json) assert training_example_model != False # Construct a model instance of TrainingExample by calling from_dict on the json representation training_example_model_dict = TrainingExample.from_dict(training_example_model_json).__dict__ training_example_model2 = TrainingExample(**training_example_model_dict) # Verify the model instances are equivalent assert training_example_model == training_example_model2 # Convert model instance back to dict and verify no loss of data training_example_model_json2 = training_example_model.to_dict() assert training_example_model_json2 == training_example_model_json class TestTrainingExampleList(): """ Test Class for TrainingExampleList """ def test_training_example_list_serialization(self): """ Test serialization/deserialization for TrainingExampleList """ # Construct dict forms of any model objects needed in order to build this model. training_example_model = {} # TrainingExample training_example_model['document_id'] = 'testString' training_example_model['cross_reference'] = 'testString' training_example_model['relevance'] = 38 # Construct a json representation of a TrainingExampleList model training_example_list_model_json = {} training_example_list_model_json['examples'] = [training_example_model] # Construct a model instance of TrainingExampleList by calling from_dict on the json representation training_example_list_model = TrainingExampleList.from_dict(training_example_list_model_json) assert training_example_list_model != False # Construct a model instance of TrainingExampleList by calling from_dict on the json representation training_example_list_model_dict = TrainingExampleList.from_dict(training_example_list_model_json).__dict__ training_example_list_model2 = TrainingExampleList(**training_example_list_model_dict) # Verify the model instances are equivalent assert training_example_list_model == training_example_list_model2 # Convert model instance back to dict and verify no loss of data training_example_list_model_json2 = training_example_list_model.to_dict() assert training_example_list_model_json2 == training_example_list_model_json class TestTrainingQuery(): """ Test Class for TrainingQuery """ def test_training_query_serialization(self): """ Test serialization/deserialization for TrainingQuery """ # Construct dict forms of any model objects needed in order to build this model. training_example_model = {} # TrainingExample training_example_model['document_id'] = 'testString' training_example_model['cross_reference'] = 'testString' training_example_model['relevance'] = 38 # Construct a json representation of a TrainingQuery model training_query_model_json = {} training_query_model_json['query_id'] = 'testString' training_query_model_json['natural_language_query'] = 'testString' training_query_model_json['filter'] = 'testString' training_query_model_json['examples'] = [training_example_model] # Construct a model instance of TrainingQuery by calling from_dict on the json representation training_query_model = TrainingQuery.from_dict(training_query_model_json) assert training_query_model != False # Construct a model instance of TrainingQuery by calling from_dict on the json representation training_query_model_dict = TrainingQuery.from_dict(training_query_model_json).__dict__ training_query_model2 = TrainingQuery(**training_query_model_dict) # Verify the model instances are equivalent assert training_query_model == training_query_model2 # Convert model instance back to dict and verify no loss of data training_query_model_json2 = training_query_model.to_dict() assert training_query_model_json2 == training_query_model_json class TestTrainingStatus(): """ Test Class for TrainingStatus """ def test_training_status_serialization(self): """ Test serialization/deserialization for TrainingStatus """ # Construct a json representation of a TrainingStatus model training_status_model_json = {} training_status_model_json['total_examples'] = 38 training_status_model_json['available'] = True training_status_model_json['processing'] = True training_status_model_json['minimum_queries_added'] = True training_status_model_json['minimum_examples_added'] = True training_status_model_json['sufficient_label_diversity'] = True training_status_model_json['notices'] = 38 training_status_model_json['successfully_trained'] = '2020-01-28T18:40:40.123456Z' training_status_model_json['data_updated'] = '2020-01-28T18:40:40.123456Z' # Construct a model instance of TrainingStatus by calling from_dict on the json representation training_status_model = TrainingStatus.from_dict(training_status_model_json) assert training_status_model != False # Construct a model instance of TrainingStatus by calling from_dict on the json representation training_status_model_dict = TrainingStatus.from_dict(training_status_model_json).__dict__ training_status_model2 = TrainingStatus(**training_status_model_dict) # Verify the model instances are equivalent assert training_status_model == training_status_model2 # Convert model instance back to dict and verify no loss of data training_status_model_json2 = training_status_model.to_dict() assert training_status_model_json2 == training_status_model_json class TestWordHeadingDetection(): """ Test Class for WordHeadingDetection """ def test_word_heading_detection_serialization(self): """ Test serialization/deserialization for WordHeadingDetection """ # Construct dict forms of any model objects needed in order to build this model. font_setting_model = {} # FontSetting font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' word_style_model = {} # WordStyle word_style_model['level'] = 38 word_style_model['names'] = ['testString'] # Construct a json representation of a WordHeadingDetection model word_heading_detection_model_json = {} word_heading_detection_model_json['fonts'] = [font_setting_model] word_heading_detection_model_json['styles'] = [word_style_model] # Construct a model instance of WordHeadingDetection by calling from_dict on the json representation word_heading_detection_model = WordHeadingDetection.from_dict(word_heading_detection_model_json) assert word_heading_detection_model != False # Construct a model instance of WordHeadingDetection by calling from_dict on the json representation word_heading_detection_model_dict = WordHeadingDetection.from_dict(word_heading_detection_model_json).__dict__ word_heading_detection_model2 = WordHeadingDetection(**word_heading_detection_model_dict) # Verify the model instances are equivalent assert word_heading_detection_model == word_heading_detection_model2 # Convert model instance back to dict and verify no loss of data word_heading_detection_model_json2 = word_heading_detection_model.to_dict() assert word_heading_detection_model_json2 == word_heading_detection_model_json class TestWordSettings(): """ Test Class for WordSettings """ def test_word_settings_serialization(self): """ Test serialization/deserialization for WordSettings """ # Construct dict forms of any model objects needed in order to build this model. font_setting_model = {} # FontSetting font_setting_model['level'] = 38 font_setting_model['min_size'] = 38 font_setting_model['max_size'] = 38 font_setting_model['bold'] = True font_setting_model['italic'] = True font_setting_model['name'] = 'testString' word_style_model = {} # WordStyle word_style_model['level'] = 38 word_style_model['names'] = ['testString'] word_heading_detection_model = {} # WordHeadingDetection word_heading_detection_model['fonts'] = [font_setting_model] word_heading_detection_model['styles'] = [word_style_model] # Construct a json representation of a WordSettings model word_settings_model_json = {} word_settings_model_json['heading'] = word_heading_detection_model # Construct a model instance of WordSettings by calling from_dict on the json representation word_settings_model = WordSettings.from_dict(word_settings_model_json) assert word_settings_model != False # Construct a model instance of WordSettings by calling from_dict on the json representation word_settings_model_dict = WordSettings.from_dict(word_settings_model_json).__dict__ word_settings_model2 = WordSettings(**word_settings_model_dict) # Verify the model instances are equivalent assert word_settings_model == word_settings_model2 # Convert model instance back to dict and verify no loss of data word_settings_model_json2 = word_settings_model.to_dict() assert word_settings_model_json2 == word_settings_model_json class TestWordStyle(): """ Test Class for WordStyle """ def test_word_style_serialization(self): """ Test serialization/deserialization for WordStyle """ # Construct a json representation of a WordStyle model word_style_model_json = {} word_style_model_json['level'] = 38 word_style_model_json['names'] = ['testString'] # Construct a model instance of WordStyle by calling from_dict on the json representation word_style_model = WordStyle.from_dict(word_style_model_json) assert word_style_model != False # Construct a model instance of WordStyle by calling from_dict on the json representation word_style_model_dict = WordStyle.from_dict(word_style_model_json).__dict__ word_style_model2 = WordStyle(**word_style_model_dict) # Verify the model instances are equivalent assert word_style_model == word_style_model2 # Convert model instance back to dict and verify no loss of data word_style_model_json2 = word_style_model.to_dict() assert word_style_model_json2 == word_style_model_json class TestXPathPatterns(): """ Test Class for XPathPatterns """ def test_x_path_patterns_serialization(self): """ Test serialization/deserialization for XPathPatterns """ # Construct a json representation of a XPathPatterns model x_path_patterns_model_json = {} x_path_patterns_model_json['xpaths'] = ['testString'] # Construct a model instance of XPathPatterns by calling from_dict on the json representation x_path_patterns_model = XPathPatterns.from_dict(x_path_patterns_model_json) assert x_path_patterns_model != False # Construct a model instance of XPathPatterns by calling from_dict on the json representation x_path_patterns_model_dict = XPathPatterns.from_dict(x_path_patterns_model_json).__dict__ x_path_patterns_model2 = XPathPatterns(**x_path_patterns_model_dict) # Verify the model instances are equivalent assert x_path_patterns_model == x_path_patterns_model2 # Convert model instance back to dict and verify no loss of data x_path_patterns_model_json2 = x_path_patterns_model.to_dict() assert x_path_patterns_model_json2 == x_path_patterns_model_json class TestCalculation(): """ Test Class for Calculation """ def test_calculation_serialization(self): """ Test serialization/deserialization for Calculation """ # Construct a json representation of a Calculation model calculation_model_json = {} calculation_model_json['type'] = 'unique_count' calculation_model_json['matching_results'] = 38 calculation_model_json['field'] = 'testString' calculation_model_json['value'] = 72.5 # Construct a model instance of Calculation by calling from_dict on the json representation calculation_model = Calculation.from_dict(calculation_model_json) assert calculation_model != False # Construct a model instance of Calculation by calling from_dict on the json representation calculation_model_dict = Calculation.from_dict(calculation_model_json).__dict__ calculation_model2 = Calculation(**calculation_model_dict) # Verify the model instances are equivalent assert calculation_model == calculation_model2 # Convert model instance back to dict and verify no loss of data calculation_model_json2 = calculation_model.to_dict() assert calculation_model_json2 == calculation_model_json class TestFilter(): """ Test Class for Filter """ def test_filter_serialization(self): """ Test serialization/deserialization for Filter """ # Construct a json representation of a Filter model filter_model_json = {} filter_model_json['type'] = 'filter' filter_model_json['matching_results'] = 38 filter_model_json['match'] = 'testString' # Construct a model instance of Filter by calling from_dict on the json representation filter_model = Filter.from_dict(filter_model_json) assert filter_model != False # Construct a model instance of Filter by calling from_dict on the json representation filter_model_dict = Filter.from_dict(filter_model_json).__dict__ filter_model2 = Filter(**filter_model_dict) # Verify the model instances are equivalent assert filter_model == filter_model2 # Convert model instance back to dict and verify no loss of data filter_model_json2 = filter_model.to_dict() assert filter_model_json2 == filter_model_json class TestHistogram(): """ Test Class for Histogram """ def test_histogram_serialization(self): """ Test serialization/deserialization for Histogram """ # Construct a json representation of a Histogram model histogram_model_json = {} histogram_model_json['type'] = 'histogram' histogram_model_json['matching_results'] = 38 histogram_model_json['field'] = 'testString' histogram_model_json['interval'] = 38 # Construct a model instance of Histogram by calling from_dict on the json representation histogram_model = Histogram.from_dict(histogram_model_json) assert histogram_model != False # Construct a model instance of Histogram by calling from_dict on the json representation histogram_model_dict = Histogram.from_dict(histogram_model_json).__dict__ histogram_model2 = Histogram(**histogram_model_dict) # Verify the model instances are equivalent assert histogram_model == histogram_model2 # Convert model instance back to dict and verify no loss of data histogram_model_json2 = histogram_model.to_dict() assert histogram_model_json2 == histogram_model_json class TestNested(): """ Test Class for Nested """ def test_nested_serialization(self): """ Test serialization/deserialization for Nested """ # Construct a json representation of a Nested model nested_model_json = {} nested_model_json['type'] = 'nested' nested_model_json['matching_results'] = 38 nested_model_json['path'] = 'testString' # Construct a model instance of Nested by calling from_dict on the json representation nested_model = Nested.from_dict(nested_model_json) assert nested_model != False # Construct a model instance of Nested by calling from_dict on the json representation nested_model_dict = Nested.from_dict(nested_model_json).__dict__ nested_model2 = Nested(**nested_model_dict) # Verify the model instances are equivalent assert nested_model == nested_model2 # Convert model instance back to dict and verify no loss of data nested_model_json2 = nested_model.to_dict() assert nested_model_json2 == nested_model_json class TestTerm(): """ Test Class for Term """ def test_term_serialization(self): """ Test serialization/deserialization for Term """ # Construct a json representation of a Term model term_model_json = {} term_model_json['type'] = 'term' term_model_json['matching_results'] = 38 term_model_json['field'] = 'testString' term_model_json['count'] = 38 # Construct a model instance of Term by calling from_dict on the json representation term_model = Term.from_dict(term_model_json) assert term_model != False # Construct a model instance of Term by calling from_dict on the json representation term_model_dict = Term.from_dict(term_model_json).__dict__ term_model2 = Term(**term_model_dict) # Verify the model instances are equivalent assert term_model == term_model2 # Convert model instance back to dict and verify no loss of data term_model_json2 = term_model.to_dict() assert term_model_json2 == term_model_json class TestTimeslice(): """ Test Class for Timeslice """ def test_timeslice_serialization(self): """ Test serialization/deserialization for Timeslice """ # Construct a json representation of a Timeslice model timeslice_model_json = {} timeslice_model_json['type'] = 'timeslice' timeslice_model_json['matching_results'] = 38 timeslice_model_json['field'] = 'testString' timeslice_model_json['interval'] = 'testString' timeslice_model_json['anomaly'] = True # Construct a model instance of Timeslice by calling from_dict on the json representation timeslice_model = Timeslice.from_dict(timeslice_model_json) assert timeslice_model != False # Construct a model instance of Timeslice by calling from_dict on the json representation timeslice_model_dict = Timeslice.from_dict(timeslice_model_json).__dict__ timeslice_model2 = Timeslice(**timeslice_model_dict) # Verify the model instances are equivalent assert timeslice_model == timeslice_model2 # Convert model instance back to dict and verify no loss of data timeslice_model_json2 = timeslice_model.to_dict() assert timeslice_model_json2 == timeslice_model_json class TestTopHits(): """ Test Class for TopHits """ def test_top_hits_serialization(self): """ Test serialization/deserialization for TopHits """ # Construct dict forms of any model objects needed in order to build this model. query_result_metadata_model = {} # QueryResultMetadata query_result_metadata_model['score'] = 72.5 query_result_metadata_model['confidence'] = 72.5 query_result_model = {} # QueryResult query_result_model['id'] = 'testString' query_result_model['metadata'] = {} query_result_model['collection_id'] = 'testString' query_result_model['result_metadata'] = query_result_metadata_model query_result_model['foo'] = { 'foo': 'bar' } top_hits_results_model = {} # TopHitsResults top_hits_results_model['matching_results'] = 38 top_hits_results_model['hits'] = [query_result_model] # Construct a json representation of a TopHits model top_hits_model_json = {} top_hits_model_json['type'] = 'top_hits' top_hits_model_json['matching_results'] = 38 top_hits_model_json['size'] = 38 top_hits_model_json['hits'] = top_hits_results_model # Construct a model instance of TopHits by calling from_dict on the json representation top_hits_model = TopHits.from_dict(top_hits_model_json) assert top_hits_model != False # Construct a model instance of TopHits by calling from_dict on the json representation top_hits_model_dict = TopHits.from_dict(top_hits_model_json).__dict__ top_hits_model2 = TopHits(**top_hits_model_dict) # Verify the model instances are equivalent assert top_hits_model == top_hits_model2 # Convert model instance back to dict and verify no loss of data top_hits_model_json2 = top_hits_model.to_dict() assert top_hits_model_json2 == top_hits_model_json # endregion ############################################################################## # End of Model Tests ##############################################################################
45.52781
2,637
0.665676
54,209
503,401
5.841964
0.015348
0.022224
0.012239
0.010844
0.914379
0.87367
0.829781
0.784434
0.754417
0.724886
0
0.014869
0.230727
503,401
11,056
2,638
45.531928
0.802909
0.168252
0
0.678231
0
0.014065
0.25707
0.054563
0
0
0
0
0.09689
1
0.04782
false
0.018753
0.001875
0
0.094546
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
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
7
602fe47473a459a9843777b440724da131d102b2
237
py
Python
reproducibility_project/src/analysis/__init__.py
zijiewu3/reproducibility_study
0fc700df7daa7320e8ff213da722392407fa0d8a
[ "MIT" ]
null
null
null
reproducibility_project/src/analysis/__init__.py
zijiewu3/reproducibility_study
0fc700df7daa7320e8ff213da722392407fa0d8a
[ "MIT" ]
null
null
null
reproducibility_project/src/analysis/__init__.py
zijiewu3/reproducibility_study
0fc700df7daa7320e8ff213da722392407fa0d8a
[ "MIT" ]
null
null
null
"""Analysis routines and helper methods.""" from reproducibility_project.src.analysis.equlibration import * from reproducibility_project.src.analysis.rdf import gsd_rdf from reproducibility_project.src.analysis.sampler import sample_job
47.4
67
0.85654
30
237
6.6
0.533333
0.287879
0.393939
0.439394
0.560606
0
0
0
0
0
0
0
0.07173
237
4
68
59.25
0.9
0.156118
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
60502f781a9053edf264de5f4ed77a1d9bb7e7d3
140,879
py
Python
test7_semiautomatic_pips+cbmc_time_reduction/results/pagai/inv/yacctab.py
heryxpc/prototype
45c9c61c43115a97adc9690ad2269be9c07eb47d
[ "Apache-2.0" ]
null
null
null
test7_semiautomatic_pips+cbmc_time_reduction/results/pagai/inv/yacctab.py
heryxpc/prototype
45c9c61c43115a97adc9690ad2269be9c07eb47d
[ "Apache-2.0" ]
null
null
null
test7_semiautomatic_pips+cbmc_time_reduction/results/pagai/inv/yacctab.py
heryxpc/prototype
45c9c61c43115a97adc9690ad2269be9c07eb47d
[ "Apache-2.0" ]
null
null
null
# yacctab.py # This file is automatically generated. Do not edit. _tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '\xe4\xad\x11\xafm\xe0Y\xc1d\x13V\x92#\x99xD' _lr_action_items = {'VOID':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[6,6,-61,-72,-71,-58,-54,-55,-33,-29,-59,6,-34,-53,-68,-63,-52,6,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,6,-67,6,-70,-74,6,-57,-82,-249,-81,6,-107,-30,6,-97,-96,6,-45,-46,6,-109,6,6,6,6,-88,6,6,-36,6,-47,6,6,-83,-89,-250,6,-110,6,6,-111,-113,-112,6,6,-98,-37,-39,-42,-38,-40,6,-148,-147,-43,-149,-41,-85,-84,-90,6,6,-100,-99,-167,-166,6,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'LBRACKET':([1,2,3,5,6,8,9,12,13,16,17,18,20,22,23,24,26,27,28,31,32,34,36,39,40,42,43,44,45,46,49,50,51,52,54,55,56,58,59,63,64,66,67,68,69,76,77,83,87,89,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,129,138,139,149,151,152,153,154,155,174,178,180,184,185,191,195,216,217,218,223,224,231,235,262,264,265,273,274,277,281,285,286,314,318,319,323,329,350,351,357,359,360,361,362,366,369,371,387,388,389,390,400,401,409,],[-251,-61,-72,-71,-58,-54,-55,-59,-251,-53,-68,-63,-52,-56,-170,61,-66,-251,-69,-73,-108,-64,-60,-62,-65,-251,-67,-251,-70,-74,-57,-50,-9,-10,-82,-249,-81,-49,61,-97,-96,-26,-114,-116,-25,-48,-51,-109,-251,-251,-233,-243,-247,-244,-241,-231,-232,182,-240,-220,-237,-245,-238,-242,-239,-230,221,-117,-115,-83,-250,-21,-80,-22,-79,-248,-246,-226,-227,-110,-111,221,-113,-112,221,312,221,-98,325,-237,-85,-84,-225,-224,-223,-234,221,221,312,-100,-99,-132,325,-221,-222,325,-146,-140,-142,-144,-135,325,-133,-141,-143,-145,-134,325,-228,-229,]),'WCHAR_CONST':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,96,-45,-219,96,-217,96,-216,96,-215,96,96,-214,-218,96,96,-250,96,-176,-179,-177,-173,-174,-178,-180,96,-182,-183,-175,-181,96,-215,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,-251,-39,-42,-38,96,-40,96,96,-148,-147,-43,-149,96,-41,96,96,96,-215,96,-12,96,96,-11,-167,-166,96,-164,96,96,-150,96,-163,-151,96,96,96,96,-251,96,-215,-251,-131,-162,-165,96,-154,96,-152,96,96,96,-153,96,96,96,-251,96,-158,-157,-155,96,96,96,-159,-156,96,-161,-160,]),'FLOAT_CONST':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,97,-45,-219,97,-217,97,-216,97,-215,97,97,-214,-218,97,97,-250,97,-176,-179,-177,-173,-174,-178,-180,97,-182,-183,-175,-181,97,-215,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,-251,-39,-42,-38,97,-40,97,97,-148,-147,-43,-149,97,-41,97,97,97,-215,97,-12,97,97,-11,-167,-166,97,-164,97,97,-150,97,-163,-151,97,97,97,97,-251,97,-215,-251,-131,-162,-165,97,-154,97,-152,97,97,97,-153,97,97,97,-251,97,-158,-157,-155,97,97,97,-159,-156,97,-161,-160,]),'MINUS':([55,61,75,91,92,93,94,95,96,97,98,99,100,101,102,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,180,182,183,184,186,187,188,189,190,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,262,270,273,274,277,281,282,283,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,349,350,351,352,353,356,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,401,404,405,406,408,409,410,413,415,416,417,418,419,420,],[-249,100,-45,-219,-206,-233,-243,-247,-244,-241,-231,100,-217,-232,-208,-187,100,-216,100,-240,-215,-220,100,100,-237,-245,-214,-238,200,-242,-239,-218,-230,100,100,-250,100,-176,-179,-177,-173,-174,-178,-180,100,-182,-183,-175,-181,-248,100,-212,-215,-246,-226,100,100,-227,100,-206,-211,100,-209,-210,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,-251,-39,-42,-38,100,-40,100,100,-148,-147,-43,-149,100,-41,-237,100,-225,-224,-223,-234,100,100,200,200,200,-192,200,200,200,-191,200,200,-189,-188,200,200,200,200,200,-190,-215,100,-12,100,100,-11,-167,-166,100,-164,100,100,-150,100,-163,-151,100,100,-213,-221,-222,100,100,-207,-251,100,-215,-251,-131,-162,-165,100,-154,100,-152,100,100,100,-153,100,100,100,-251,-228,100,-158,-157,-155,-229,100,100,100,-159,-156,100,-161,-160,]),'RPAREN':([1,2,3,5,6,8,9,12,13,16,17,18,20,22,23,24,26,27,28,31,32,34,36,39,40,42,43,44,45,46,49,50,51,52,53,54,56,58,59,62,63,64,66,67,68,69,76,77,83,87,89,92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,122,124,125,126,127,128,129,130,131,132,138,139,149,151,152,153,154,155,174,176,178,180,183,184,185,187,188,190,191,192,193,194,195,196,216,217,218,219,220,222,223,224,225,231,247,264,265,271,272,273,274,276,277,278,279,280,281,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,306,307,308,309,313,314,315,316,317,318,319,339,349,350,351,355,356,359,360,361,362,365,378,380,383,384,386,387,388,389,401,404,407,409,410,411,414,],[-251,-61,-72,-71,-58,-54,-55,-59,-251,-53,-68,-63,-52,-56,-170,-106,-66,-251,-69,-73,-108,-64,-60,-62,-65,-251,-67,-251,-70,-74,-57,-50,-9,-10,83,-82,-81,-49,-107,-251,-97,-96,-26,-114,-116,-25,-48,-51,-109,-251,-251,-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,-185,-242,-239,-171,-230,216,-15,217,-120,-251,-16,-118,-124,-117,-115,-83,-250,-21,-80,-22,-79,-248,-212,-246,-226,277,-227,-110,-206,-211,-209,-111,281,283,-168,-251,-210,-113,-112,-251,-123,-2,-122,-139,-137,-1,-98,-14,-85,-84,-172,349,-225,-224,-235,-223,351,353,354,-234,-136,-251,-137,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,-202,-190,-19,-20,359,360,-251,-138,-125,-119,-121,-100,-99,-13,-213,-221,-222,-169,-207,-146,-140,-142,-144,389,395,397,399,-236,-186,-141,-143,-145,-228,-251,412,-229,-251,415,418,]),'LONG':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[18,18,-61,-72,-71,-58,-54,-55,-33,-29,-59,18,-34,-53,-68,-63,-52,18,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,18,-67,18,-70,-74,18,-57,-82,-249,-81,18,-107,-30,18,-97,-96,18,-45,-46,18,-109,18,18,18,18,-88,18,18,-36,18,-47,18,18,-83,-89,-250,18,-110,18,18,-111,-113,-112,18,18,-98,-37,-39,-42,-38,-40,18,-148,-147,-43,-149,-41,-85,-84,-90,18,18,-100,-99,-167,-166,18,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'PLUS':([55,61,75,91,92,93,94,95,96,97,98,99,100,101,102,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,180,182,183,184,186,187,188,189,190,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,262,270,273,274,277,281,282,283,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,349,350,351,352,353,356,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,401,404,405,406,408,409,410,413,415,416,417,418,419,420,],[-249,106,-45,-219,-206,-233,-243,-247,-244,-241,-231,106,-217,-232,-208,-187,106,-216,106,-240,-215,-220,106,106,-237,-245,-214,-238,204,-242,-239,-218,-230,106,106,-250,106,-176,-179,-177,-173,-174,-178,-180,106,-182,-183,-175,-181,-248,106,-212,-215,-246,-226,106,106,-227,106,-206,-211,106,-209,-210,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,-251,-39,-42,-38,106,-40,106,106,-148,-147,-43,-149,106,-41,-237,106,-225,-224,-223,-234,106,106,204,204,204,-192,204,204,204,-191,204,204,-189,-188,204,204,204,204,204,-190,-215,106,-12,106,106,-11,-167,-166,106,-164,106,106,-150,106,-163,-151,106,106,-213,-221,-222,106,106,-207,-251,106,-215,-251,-131,-162,-165,106,-154,106,-152,106,106,106,-153,106,106,106,-251,-228,106,-158,-157,-155,-229,106,106,106,-159,-156,106,-161,-160,]),'ELLIPSIS':([227,],[316,]),'GT':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,205,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,205,-194,-192,-196,205,-195,-191,-198,205,-189,-188,-197,205,205,205,205,-190,-213,-221,-222,-207,-228,-229,]),'GOTO':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,240,-250,-39,-42,-38,-40,240,-148,-147,-43,-149,240,-41,-167,-166,-164,240,-150,-163,-151,240,-162,-165,-154,240,-152,240,-153,240,240,-158,-157,-155,240,240,-159,-156,240,-161,-160,]),'ENUM':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[25,25,-61,-72,-71,-58,-54,-55,-33,-29,-59,25,-34,-53,-68,-63,-52,25,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,25,-67,25,-70,-74,25,-57,-82,-249,-81,25,-107,-30,25,-97,-96,25,-45,-46,25,-109,25,25,25,25,-88,25,25,-36,25,-47,25,25,-83,-89,-250,25,-110,25,25,-111,-113,-112,25,25,-98,-37,-39,-42,-38,-40,25,-148,-147,-43,-149,-41,-85,-84,-90,25,25,-100,-99,-167,-166,25,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'PERIOD':([55,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,178,180,184,235,262,273,274,277,281,323,329,350,351,357,366,369,371,390,400,401,409,],[-249,-233,-243,-247,-244,-241,-231,-232,181,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-246,-226,-227,324,-237,-225,-224,-223,-234,-132,324,-221,-222,324,-135,324,-133,-134,324,-228,-229,]),'GE':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,209,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,209,-194,-192,-196,209,-195,-191,-198,209,-189,-188,-197,209,209,209,209,-190,-213,-221,-222,-207,-228,-229,]),'INT_CONST_DEC':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,117,-45,-219,117,-217,117,-216,117,-215,117,117,-214,-218,117,117,-250,117,-176,-179,-177,-173,-174,-178,-180,117,-182,-183,-175,-181,117,-215,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,-251,-39,-42,-38,117,-40,117,117,-148,-147,-43,-149,117,-41,117,117,117,-215,117,-12,117,117,-11,-167,-166,117,-164,117,117,-150,117,-163,-151,117,117,117,117,-251,117,-215,-251,-131,-162,-165,117,-154,117,-152,117,117,117,-153,117,117,117,-251,117,-158,-157,-155,117,117,117,-159,-156,117,-161,-160,]),'ARROW':([93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,178,180,184,262,273,274,277,281,350,351,401,409,],[-233,-243,-247,-244,-241,-231,-232,179,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-246,-226,-227,-237,-225,-224,-223,-234,-221,-222,-228,-229,]),'HEX_FLOAT_CONST':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,119,-45,-219,119,-217,119,-216,119,-215,119,119,-214,-218,119,119,-250,119,-176,-179,-177,-173,-174,-178,-180,119,-182,-183,-175,-181,119,-215,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,-251,-39,-42,-38,119,-40,119,119,-148,-147,-43,-149,119,-41,119,119,119,-215,119,-12,119,119,-11,-167,-166,119,-164,119,119,-150,119,-163,-151,119,119,119,119,-251,119,-215,-251,-131,-162,-165,119,-154,119,-152,119,119,119,-153,119,119,119,-251,119,-158,-157,-155,119,119,119,-159,-156,119,-161,-160,]),'DOUBLE':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[40,40,-61,-72,-71,-58,-54,-55,-33,-29,-59,40,-34,-53,-68,-63,-52,40,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,40,-67,40,-70,-74,40,-57,-82,-249,-81,40,-107,-30,40,-97,-96,40,-45,-46,40,-109,40,40,40,40,-88,40,40,-36,40,-47,40,40,-83,-89,-250,40,-110,40,40,-111,-113,-112,40,40,-98,-37,-39,-42,-38,-40,40,-148,-147,-43,-149,-41,-85,-84,-90,40,40,-100,-99,-167,-166,40,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'MINUSEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[163,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'INT_CONST_OCT':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,120,-45,-219,120,-217,120,-216,120,-215,120,120,-214,-218,120,120,-250,120,-176,-179,-177,-173,-174,-178,-180,120,-182,-183,-175,-181,120,-215,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,-251,-39,-42,-38,120,-40,120,120,-148,-147,-43,-149,120,-41,120,120,120,-215,120,-12,120,120,-11,-167,-166,120,-164,120,120,-150,120,-163,-151,120,120,120,120,-251,120,-215,-251,-131,-162,-165,120,-154,120,-152,120,120,120,-153,120,120,120,-251,120,-158,-157,-155,120,120,120,-159,-156,120,-161,-160,]),'TIMESEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[172,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'OR':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,214,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,214,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,214,-199,-201,-202,-190,-213,-221,-222,-207,-228,-229,]),'SHORT':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[2,2,-61,-72,-71,-58,-54,-55,-33,-29,-59,2,-34,-53,-68,-63,-52,2,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,2,-67,2,-70,-74,2,-57,-82,-249,-81,2,-107,-30,2,-97,-96,2,-45,-46,2,-109,2,2,2,2,-88,2,2,-36,2,-47,2,2,-83,-89,-250,2,-110,2,2,-111,-113,-112,2,2,-98,-37,-39,-42,-38,-40,2,-148,-147,-43,-149,-41,-85,-84,-90,2,2,-100,-99,-167,-166,2,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'RETURN':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,243,-250,-39,-42,-38,-40,243,-148,-147,-43,-149,243,-41,-167,-166,-164,243,-150,-163,-151,243,-162,-165,-154,243,-152,243,-153,243,243,-158,-157,-155,243,243,-159,-156,243,-161,-160,]),'RSHIFTEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[173,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'RESTRICT':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,27,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,66,68,73,75,80,82,83,84,85,86,87,88,89,112,138,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[31,31,-61,-72,-71,-58,-54,-55,-33,-29,-59,31,-34,-53,-68,-63,-52,31,-56,-170,-106,-66,31,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,31,-67,31,-70,-74,31,-57,-82,-249,-81,31,-107,-30,31,-97,-96,31,-116,31,-45,-46,31,-109,31,31,31,31,-88,31,31,-117,-36,31,-47,31,31,-83,-89,-250,31,-110,31,31,-111,-113,-112,31,31,-98,-37,-39,-42,-38,-40,31,-148,-147,-43,-149,-41,-85,-84,-90,31,31,-100,-99,-167,-166,31,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'STATIC':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,59,60,62,63,64,73,75,80,82,83,144,145,146,149,151,185,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[8,8,-61,-72,-71,-58,-54,-55,-33,-29,-59,8,-34,-53,-68,-63,-52,8,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,8,-67,8,-70,-74,8,-57,-82,-249,-81,-107,-30,8,-97,-96,8,-45,-46,8,-109,-36,8,-47,-83,-250,-110,-111,-113,-112,8,8,-98,-37,-39,-42,-38,-40,8,-148,-147,-43,-149,-41,-85,-84,8,8,-100,-99,-167,-166,8,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'SIZEOF':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,99,-45,-219,99,-217,99,-216,99,-215,99,99,-214,-218,99,99,-250,99,-176,-179,-177,-173,-174,-178,-180,99,-182,-183,-175,-181,99,-215,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,-251,-39,-42,-38,99,-40,99,99,-148,-147,-43,-149,99,-41,99,99,99,-215,99,-12,99,99,-11,-167,-166,99,-164,99,99,-150,99,-163,-151,99,99,99,99,-251,99,-215,-251,-131,-162,-165,99,-154,99,-152,99,99,99,-153,99,99,99,-251,99,-158,-157,-155,99,99,99,-159,-156,99,-161,-160,]),'UNSIGNED':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[17,17,-61,-72,-71,-58,-54,-55,-33,-29,-59,17,-34,-53,-68,-63,-52,17,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,17,-67,17,-70,-74,17,-57,-82,-249,-81,17,-107,-30,17,-97,-96,17,-45,-46,17,-109,17,17,17,17,-88,17,17,-36,17,-47,17,17,-83,-89,-250,17,-110,17,17,-111,-113,-112,17,17,-98,-37,-39,-42,-38,-40,17,-148,-147,-43,-149,-41,-85,-84,-90,17,17,-100,-99,-167,-166,17,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'UNION':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[19,19,-61,-72,-71,-58,-54,-55,-33,-29,-59,19,-34,-53,-68,-63,-52,19,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,19,-67,19,-70,-74,19,-57,-82,-249,-81,19,-107,-30,19,-97,-96,19,-45,-46,19,-109,19,19,19,19,-88,19,19,-36,19,-47,19,19,-83,-89,-250,19,-110,19,19,-111,-113,-112,19,19,-98,-37,-39,-42,-38,-40,19,-148,-147,-43,-149,-41,-85,-84,-90,19,19,-100,-99,-167,-166,19,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'COLON':([2,3,5,6,12,17,18,23,24,26,28,31,32,34,36,39,40,43,45,46,54,56,59,63,64,83,87,89,90,92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,122,124,149,151,152,153,154,155,161,174,176,178,180,184,185,187,188,190,191,194,196,216,217,231,248,262,264,265,267,268,271,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,318,319,338,349,350,351,355,356,386,401,409,],[-61,-72,-71,-58,-59,-68,-63,-170,-106,-66,-69,-73,-108,-64,-60,-62,-65,-67,-70,-74,-82,-81,-107,-97,-96,-109,-251,-251,156,-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,-185,-242,-239,-171,-230,-83,-250,-21,-80,-22,-79,270,-248,-212,-246,-226,-227,-110,-206,-211,-209,-111,-168,-210,-113,-112,-98,336,345,-85,-84,-184,156,-172,-225,-224,-223,-234,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,358,-202,-190,-100,-99,379,-213,-221,-222,-169,-207,-186,-228,-229,]),'$end':([0,10,11,14,21,30,35,37,38,47,60,75,144,151,237,344,],[-251,-33,-29,-34,-27,-32,-31,-35,0,-28,-30,-45,-36,-250,-37,-151,]),'WSTRING_LITERAL':([55,61,75,91,93,95,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,95,-45,-219,174,-247,95,-217,95,-216,95,-215,95,95,-214,-218,95,95,-250,95,-176,-179,-177,-173,-174,-178,-180,95,-182,-183,-175,-181,-248,95,-215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,-251,-39,-42,-38,95,-40,95,95,-148,-147,-43,-149,95,-41,95,95,95,-215,95,-12,95,95,-11,-167,-166,95,-164,95,95,-150,95,-163,-151,95,95,95,95,-251,95,-215,-251,-131,-162,-165,95,-154,95,-152,95,95,95,-153,95,95,95,-251,95,-158,-157,-155,95,95,95,-159,-156,95,-161,-160,]),'DIVIDE':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,207,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,207,207,207,207,207,207,207,207,207,207,-189,-188,207,207,207,207,207,-190,-213,-221,-222,-207,-228,-229,]),'FOR':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,245,-250,-39,-42,-38,-40,245,-148,-147,-43,-149,245,-41,-167,-166,-164,245,-150,-163,-151,245,-162,-165,-154,245,-152,245,-153,245,245,-158,-157,-155,245,245,-159,-156,245,-161,-160,]),'PLUSPLUS':([55,61,75,91,93,94,95,96,97,98,99,100,101,102,105,106,108,109,110,111,112,113,114,115,116,117,119,120,123,124,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,177,178,180,182,183,184,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,262,270,273,274,277,281,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,350,351,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,401,404,405,406,408,409,410,413,415,416,417,418,419,420,],[-249,108,-45,-219,-233,-243,-247,-244,-241,-231,108,-217,-232,180,108,-216,108,-240,-215,-220,108,108,-237,-245,-214,-238,-242,-239,-218,-230,108,108,-250,108,-176,-179,-177,-173,-174,-178,-180,108,-182,-183,-175,-181,-248,108,-215,-246,-226,108,108,-227,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,-251,-39,-42,-38,108,-40,108,108,-148,-147,-43,-149,108,-41,-237,108,-225,-224,-223,-234,108,108,-215,108,-12,108,108,-11,-167,-166,108,-164,108,108,-150,108,-163,-151,108,108,-221,-222,108,108,-251,108,-215,-251,-131,-162,-165,108,-154,108,-152,108,108,108,-153,108,108,108,-251,-228,108,-158,-157,-155,-229,108,108,108,-159,-156,108,-161,-160,]),'EQUALS':([24,32,59,73,83,92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,137,143,151,174,176,178,180,184,185,187,188,190,191,196,216,217,262,273,274,277,281,323,329,349,350,351,356,366,371,390,401,409,],[-106,-108,-107,141,-109,165,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,232,141,-250,-248,-212,-246,-226,-227,-110,-206,-211,-209,-111,-210,-113,-112,-237,-225,-224,-223,-234,-132,372,-213,-221,-222,-207,-135,-133,-134,-228,-229,]),'ELSE':([151,238,239,242,244,255,260,331,332,335,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[-250,-39,-42,-38,-40,-43,-41,-167,-166,-164,-163,-151,-162,-165,-154,-152,-153,-158,-157,413,-159,-156,-161,-160,]),'ANDEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[170,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'EQ':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,211,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,211,-194,-192,-196,-200,-195,-191,-198,211,-189,-188,-197,211,-199,211,211,-190,-213,-221,-222,-207,-228,-229,]),'AND':([55,61,75,91,92,93,94,95,96,97,98,99,100,101,102,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,180,182,183,184,186,187,188,189,190,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,262,270,273,274,277,281,282,283,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,349,350,351,352,353,356,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,401,404,405,406,408,409,410,413,415,416,417,418,419,420,],[-249,116,-45,-219,-206,-233,-243,-247,-244,-241,-231,116,-217,-232,-208,-187,116,-216,116,-240,-215,-220,116,116,-237,-245,-214,-238,212,-242,-239,-218,-230,116,116,-250,116,-176,-179,-177,-173,-174,-178,-180,116,-182,-183,-175,-181,-248,116,-212,-215,-246,-226,116,116,-227,116,-206,-211,116,-209,-210,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,-251,-39,-42,-38,116,-40,116,116,-148,-147,-43,-149,116,-41,-237,116,-225,-224,-223,-234,116,116,-193,212,-194,-192,-196,-200,-195,-191,-198,212,-189,-188,-197,212,-199,-201,212,-190,-215,116,-12,116,116,-11,-167,-166,116,-164,116,116,-150,116,-163,-151,116,116,-213,-221,-222,116,116,-207,-251,116,-215,-251,-131,-162,-165,116,-154,116,-152,116,116,116,-153,116,116,116,-251,-228,116,-158,-157,-155,-229,116,116,116,-159,-156,116,-161,-160,]),'TYPEID':([0,1,2,3,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,28,30,31,32,33,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[23,23,-61,-72,-71,-58,54,-54,-55,-33,-29,-59,23,-34,-53,-68,-63,-87,-52,23,-56,-170,-106,63,-66,-69,-32,-73,-108,-86,-64,-31,-60,-35,-62,-65,23,-67,23,-70,-74,23,-57,-82,-249,-81,23,-107,-30,23,-97,-96,23,-45,-46,23,-109,23,23,23,23,-88,23,23,-36,23,-47,23,23,-83,-89,-250,23,-110,23,23,-111,-113,-112,23,23,-98,-37,-39,-42,-38,-40,23,-148,-147,-43,-149,-41,-85,-84,-90,23,23,-100,-99,-167,-166,23,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'LBRACE':([7,19,24,25,32,33,48,54,55,56,59,63,64,73,75,78,80,81,82,83,141,142,145,146,151,185,191,216,217,235,238,239,242,244,251,253,254,255,257,259,260,283,322,326,327,331,332,335,336,340,342,344,345,349,353,354,357,369,372,373,374,377,379,382,391,395,396,397,399,400,405,406,408,413,415,416,417,418,419,420,],[55,-87,-106,55,-108,-86,-251,55,-249,55,-107,55,55,-251,-45,-7,-46,55,-8,-109,55,55,55,-47,-250,-110,-111,-113,-112,-251,-39,-42,-38,-40,55,-148,-147,-43,-149,55,-41,55,-12,55,-11,-167,-166,-164,55,-150,-163,-151,55,55,55,55,-251,-251,-131,-162,-165,-154,55,-152,55,55,-153,55,55,-251,-158,-157,-155,55,55,-159,-156,55,-161,-160,]),'PPHASH':([0,10,11,14,21,30,35,37,60,75,144,151,237,344,],[37,-33,-29,-34,37,-32,-31,-35,-30,-45,-36,-250,-37,-151,]),'INT':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[39,39,-61,-72,-71,-58,-54,-55,-33,-29,-59,39,-34,-53,-68,-63,-52,39,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,39,-67,39,-70,-74,39,-57,-82,-249,-81,39,-107,-30,39,-97,-96,39,-45,-46,39,-109,39,39,39,39,-88,39,39,-36,39,-47,39,39,-83,-89,-250,39,-110,39,39,-111,-113,-112,39,39,-98,-37,-39,-42,-38,-40,39,-148,-147,-43,-149,-41,-85,-84,-90,39,39,-100,-99,-167,-166,39,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'SIGNED':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[43,43,-61,-72,-71,-58,-54,-55,-33,-29,-59,43,-34,-53,-68,-63,-52,43,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,43,-67,43,-70,-74,43,-57,-82,-249,-81,43,-107,-30,43,-97,-96,43,-45,-46,43,-109,43,43,43,43,-88,43,43,-36,43,-47,43,43,-83,-89,-250,43,-110,43,43,-111,-113,-112,43,43,-98,-37,-39,-42,-38,-40,43,-148,-147,-43,-149,-41,-85,-84,-90,43,43,-100,-99,-167,-166,43,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'CONTINUE':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,246,-250,-39,-42,-38,-40,246,-148,-147,-43,-149,246,-41,-167,-166,-164,246,-150,-163,-151,246,-162,-165,-154,246,-152,246,-153,246,246,-158,-157,-155,246,246,-159,-156,246,-161,-160,]),'NOT':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,123,-45,-219,123,-217,123,-216,123,-215,123,123,-214,-218,123,123,-250,123,-176,-179,-177,-173,-174,-178,-180,123,-182,-183,-175,-181,123,-215,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,-251,-39,-42,-38,123,-40,123,123,-148,-147,-43,-149,123,-41,123,123,123,-215,123,-12,123,123,-11,-167,-166,123,-164,123,123,-150,123,-163,-151,123,123,123,123,-251,123,-215,-251,-131,-162,-165,123,-154,123,-152,123,123,123,-153,123,123,123,-251,123,-158,-157,-155,123,123,123,-159,-156,123,-161,-160,]),'OREQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[171,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'MOD':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,215,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,215,215,215,215,215,215,215,215,215,215,-189,-188,215,215,215,215,215,-190,-213,-221,-222,-207,-228,-229,]),'RSHIFT':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,197,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,197,-194,-192,197,197,197,-191,197,197,-189,-188,197,197,197,197,197,-190,-213,-221,-222,-207,-228,-229,]),'DEFAULT':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,248,-250,-39,-42,-38,-40,248,-148,-147,-43,-149,248,-41,-167,-166,-164,248,-150,-163,-151,248,-162,-165,-154,248,-152,248,-153,248,248,-158,-157,-155,248,248,-159,-156,248,-161,-160,]),'CHAR':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[36,36,-61,-72,-71,-58,-54,-55,-33,-29,-59,36,-34,-53,-68,-63,-52,36,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,36,-67,36,-70,-74,36,-57,-82,-249,-81,36,-107,-30,36,-97,-96,36,-45,-46,36,-109,36,36,36,36,-88,36,36,-36,36,-47,36,36,-83,-89,-250,36,-110,36,36,-111,-113,-112,36,36,-98,-37,-39,-42,-38,-40,36,-148,-147,-43,-149,-41,-85,-84,-90,36,36,-100,-99,-167,-166,36,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'WHILE':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,343,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,249,-250,-39,-42,-38,-40,249,-148,-147,-43,-149,249,-41,-167,-166,-164,249,-150,-163,381,-151,249,-162,-165,-154,249,-152,249,-153,249,249,-158,-157,-155,249,249,-159,-156,249,-161,-160,]),'DIVEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[162,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'EXTERN':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,59,60,62,63,64,73,75,80,82,83,144,145,146,149,151,185,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[9,9,-61,-72,-71,-58,-54,-55,-33,-29,-59,9,-34,-53,-68,-63,-52,9,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,9,-67,9,-70,-74,9,-57,-82,-249,-81,-107,-30,9,-97,-96,9,-45,-46,9,-109,-36,9,-47,-83,-250,-110,-111,-113,-112,9,9,-98,-37,-39,-42,-38,-40,9,-148,-147,-43,-149,-41,-85,-84,9,9,-100,-99,-167,-166,9,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'CASE':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,250,-250,-39,-42,-38,-40,250,-148,-147,-43,-149,250,-41,-167,-166,-164,250,-150,-163,-151,250,-162,-165,-154,250,-152,250,-153,250,250,-158,-157,-155,250,250,-159,-156,250,-161,-160,]),'LAND':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,210,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,210,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,-202,-190,-213,-221,-222,-207,-228,-229,]),'REGISTER':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,59,60,62,63,64,73,75,80,82,83,144,145,146,149,151,185,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[16,16,-61,-72,-71,-58,-54,-55,-33,-29,-59,16,-34,-53,-68,-63,-52,16,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,16,-67,16,-70,-74,16,-57,-82,-249,-81,-107,-30,16,-97,-96,16,-45,-46,16,-109,-36,16,-47,-83,-250,-110,-111,-113,-112,16,16,-98,-37,-39,-42,-38,-40,16,-148,-147,-43,-149,-41,-85,-84,16,16,-100,-99,-167,-166,16,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'MODEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[164,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'NE':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,202,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,202,-194,-192,-196,-200,-195,-191,-198,202,-189,-188,-197,202,-199,202,202,-190,-213,-221,-222,-207,-228,-229,]),'SWITCH':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,252,-250,-39,-42,-38,-40,252,-148,-147,-43,-149,252,-41,-167,-166,-164,252,-150,-163,-151,252,-162,-165,-154,252,-152,252,-153,252,252,-158,-157,-155,252,252,-159,-156,252,-161,-160,]),'INT_CONST_HEX':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,109,-45,-219,109,-217,109,-216,109,-215,109,109,-214,-218,109,109,-250,109,-176,-179,-177,-173,-174,-178,-180,109,-182,-183,-175,-181,109,-215,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,-251,-39,-42,-38,109,-40,109,109,-148,-147,-43,-149,109,-41,109,109,109,-215,109,-12,109,109,-11,-167,-166,109,-164,109,109,-150,109,-163,-151,109,109,109,109,-251,109,-215,-251,-131,-162,-165,109,-154,109,-152,109,109,109,-153,109,109,109,-251,109,-158,-157,-155,109,109,109,-159,-156,109,-161,-160,]),'_COMPLEX':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[26,26,-61,-72,-71,-58,-54,-55,-33,-29,-59,26,-34,-53,-68,-63,-52,26,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,26,-67,26,-70,-74,26,-57,-82,-249,-81,26,-107,-30,26,-97,-96,26,-45,-46,26,-109,26,26,26,26,-88,26,26,-36,26,-47,26,26,-83,-89,-250,26,-110,26,26,-111,-113,-112,26,26,-98,-37,-39,-42,-38,-40,26,-148,-147,-43,-149,-41,-85,-84,-90,26,26,-100,-99,-167,-166,26,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'PLUSEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[167,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'STRUCT':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[33,33,-61,-72,-71,-58,-54,-55,-33,-29,-59,33,-34,-53,-68,-63,-52,33,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,33,-67,33,-70,-74,33,-57,-82,-249,-81,33,-107,-30,33,-97,-96,33,-45,-46,33,-109,33,33,33,33,-88,33,33,-36,33,-47,33,33,-83,-89,-250,33,-110,33,33,-111,-113,-112,33,33,-98,-37,-39,-42,-38,-40,33,-148,-147,-43,-149,-41,-85,-84,-90,33,33,-100,-99,-167,-166,33,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'CONDOP':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,213,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,-202,-190,-213,-221,-222,-207,-228,-229,]),'BREAK':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,256,-250,-39,-42,-38,-40,256,-148,-147,-43,-149,256,-41,-167,-166,-164,256,-150,-163,-151,256,-162,-165,-154,256,-152,256,-153,256,256,-158,-157,-155,256,256,-159,-156,256,-161,-160,]),'VOLATILE':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,27,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,66,68,73,75,80,82,83,84,85,86,87,88,89,112,138,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[46,46,-61,-72,-71,-58,-54,-55,-33,-29,-59,46,-34,-53,-68,-63,-52,46,-56,-170,-106,-66,46,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,46,-67,46,-70,-74,46,-57,-82,-249,-81,46,-107,-30,46,-97,-96,46,-116,46,-45,-46,46,-109,46,46,46,46,-88,46,46,-117,-36,46,-47,46,46,-83,-89,-250,46,-110,46,46,-111,-113,-112,46,46,-98,-37,-39,-42,-38,-40,46,-148,-147,-43,-149,-41,-85,-84,-90,46,46,-100,-99,-167,-166,46,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'INLINE':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,59,60,62,63,64,73,75,80,82,83,144,145,146,149,151,185,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[49,49,-61,-72,-71,-58,-54,-55,-33,-29,-59,49,-34,-53,-68,-63,-52,49,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,49,-67,49,-70,-74,49,-57,-82,-249,-81,-107,-30,49,-97,-96,49,-45,-46,49,-109,-36,49,-47,-83,-250,-110,-111,-113,-112,49,49,-98,-37,-39,-42,-38,-40,49,-148,-147,-43,-149,-41,-85,-84,49,49,-100,-99,-167,-166,49,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'DO':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,259,-250,-39,-42,-38,-40,259,-148,-147,-43,-149,259,-41,-167,-166,-164,259,-150,-163,-151,259,-162,-165,-154,259,-152,259,-153,259,259,-158,-157,-155,259,259,-159,-156,259,-161,-160,]),'LNOT':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,91,-45,-219,91,-217,91,-216,91,-215,91,91,-214,-218,91,91,-250,91,-176,-179,-177,-173,-174,-178,-180,91,-182,-183,-175,-181,91,-215,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,91,-251,-39,-42,-38,91,-40,91,91,-148,-147,-43,-149,91,-41,91,91,91,-215,91,-12,91,91,-11,-167,-166,91,-164,91,91,-150,91,-163,-151,91,91,91,91,-251,91,-215,-251,-131,-162,-165,91,-154,91,-152,91,91,91,-153,91,91,91,-251,91,-158,-157,-155,91,91,91,-159,-156,91,-161,-160,]),'CONST':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,27,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,66,68,73,75,80,82,83,84,85,86,87,88,89,112,138,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[3,3,-61,-72,-71,-58,-54,-55,-33,-29,-59,3,-34,-53,-68,-63,-52,3,-56,-170,-106,-66,3,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,3,-67,3,-70,-74,3,-57,-82,-249,-81,3,-107,-30,3,-97,-96,3,-116,3,-45,-46,3,-109,3,3,3,3,-88,3,3,-117,-36,3,-47,3,3,-83,-89,-250,3,-110,3,3,-111,-113,-112,3,3,-98,-37,-39,-42,-38,-40,3,-148,-147,-43,-149,-41,-85,-84,-90,3,3,-100,-99,-167,-166,3,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'LOR':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,198,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,-202,-190,-213,-221,-222,-207,-228,-229,]),'CHAR_CONST':([55,61,75,91,99,100,105,106,108,110,112,113,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,94,-45,-219,94,-217,94,-216,94,-215,94,94,-214,-218,94,94,-250,94,-176,-179,-177,-173,-174,-178,-180,94,-182,-183,-175,-181,94,-215,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,-251,-39,-42,-38,94,-40,94,94,-148,-147,-43,-149,94,-41,94,94,94,-215,94,-12,94,94,-11,-167,-166,94,-164,94,94,-150,94,-163,-151,94,94,94,94,-251,94,-215,-251,-131,-162,-165,94,-154,94,-152,94,94,94,-153,94,94,94,-251,94,-158,-157,-155,94,94,94,-159,-156,94,-161,-160,]),'LSHIFT':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,199,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,199,-194,-192,199,199,199,-191,199,199,-189,-188,199,199,199,199,199,-190,-213,-221,-222,-207,-228,-229,]),'RBRACE':([55,75,86,88,92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,122,124,135,136,137,145,147,148,150,151,174,176,178,180,184,187,188,190,196,228,229,230,236,238,239,242,244,251,253,254,255,257,258,260,261,267,269,271,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,320,321,328,331,332,335,340,342,344,349,350,351,356,368,369,370,373,374,377,382,385,386,392,396,400,401,402,405,406,408,409,416,417,419,420,],[-249,-45,151,-88,-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,-185,-242,-239,-171,-230,-101,151,-104,-251,151,151,-89,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,151,151,-102,-126,-39,-42,-38,-40,-6,-148,-147,-43,-149,-5,-41,151,-184,-90,-172,-225,-224,-223,-234,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,-202,-190,-103,-105,151,-167,-166,-164,-150,-163,-151,-213,-221,-222,-207,-129,151,-127,-162,-165,-154,-152,151,-186,-128,-153,151,-228,-130,-158,-157,-155,-229,-159,-156,-161,-160,]),'_BOOL':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[12,12,-61,-72,-71,-58,-54,-55,-33,-29,-59,12,-34,-53,-68,-63,-52,12,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,12,-67,12,-70,-74,12,-57,-82,-249,-81,12,-107,-30,12,-97,-96,12,-45,-46,12,-109,12,12,12,12,-88,12,12,-36,12,-47,12,12,-83,-89,-250,12,-110,12,12,-111,-113,-112,12,12,-98,-37,-39,-42,-38,-40,12,-148,-147,-43,-149,-41,-85,-84,-90,12,12,-100,-99,-167,-166,12,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'LE':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,201,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,201,-194,-192,-196,201,-195,-191,-198,201,-189,-188,-197,201,201,201,201,-190,-213,-221,-222,-207,-228,-229,]),'SEMI':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,29,30,31,32,34,35,36,37,39,40,41,42,43,44,45,46,49,50,51,52,54,55,56,58,59,60,63,64,70,71,72,73,74,75,76,77,79,83,87,89,90,92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,122,124,143,144,145,149,151,152,153,154,155,157,158,159,160,161,174,176,178,180,184,185,187,188,190,191,194,196,216,217,231,233,234,236,237,238,239,241,242,243,244,246,247,251,253,254,255,256,257,258,259,260,262,264,265,266,267,271,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,318,319,330,331,332,333,334,335,336,339,340,342,344,345,347,348,349,350,351,355,356,370,373,374,375,376,377,379,382,386,392,393,394,395,396,397,399,401,403,405,406,408,409,412,413,415,416,417,418,419,420,],[14,-251,-61,-72,-71,-58,-54,-55,-33,-29,-59,-251,-34,-53,-68,-63,-52,14,-56,-170,-106,-66,-69,-251,-32,-73,-108,-64,-31,-60,-35,-62,-65,75,-251,-67,-251,-70,-74,-57,-50,-9,-10,-82,-249,-81,-49,-107,-30,-97,-96,-18,-44,-17,-77,-75,-45,-48,-51,-251,-109,-251,-251,-251,-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,-185,-242,-239,-171,-230,-77,-36,-251,-83,-250,-21,-80,-22,-79,-24,269,-91,-23,-93,-248,-212,-246,-226,-227,-110,-206,-211,-209,-111,-168,-210,-113,-112,-98,-76,-78,-126,-37,-39,-42,331,-38,332,-40,335,-14,-251,-148,-147,-43,342,-149,-13,-251,-41,-237,-85,-84,-95,-184,-172,-225,-224,-223,-234,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,-202,-190,-100,-99,373,-167,-166,374,-251,-164,-251,-13,-150,-163,-151,-251,-92,-94,-213,-221,-222,-169,-207,-127,-162,-165,393,-251,-154,-251,-152,-186,-128,-251,404,-251,-153,-251,-251,-228,410,-158,-157,-155,-229,416,-251,-251,-159,-156,-251,-161,-160,]),'LT':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,203,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,203,-194,-192,-196,203,-195,-191,-198,203,-189,-188,-197,203,203,203,203,-190,-213,-221,-222,-207,-228,-229,]),'COMMA':([1,2,3,5,6,8,9,12,13,16,17,18,20,22,23,24,26,27,28,31,32,34,36,39,40,42,43,44,45,46,49,50,51,52,54,56,58,59,63,64,66,67,68,69,70,73,74,76,77,83,92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,122,124,128,129,130,131,132,135,136,137,138,139,143,149,151,157,159,161,174,176,178,180,184,185,187,188,190,191,192,194,196,216,217,219,220,222,223,224,225,228,229,230,231,233,234,236,247,262,264,265,266,267,271,273,274,275,276,277,278,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,314,315,317,318,319,320,321,328,333,347,348,349,350,351,355,356,359,360,361,362,368,370,378,380,383,384,385,386,387,388,389,392,401,402,407,409,],[-251,-61,-72,-71,-58,-54,-55,-59,-251,-53,-68,-63,-52,-56,-170,-106,-66,-251,-69,-73,-108,-64,-60,-62,-65,-251,-67,-251,-70,-74,-57,-50,-9,-10,-82,-81,-49,-107,-97,-96,-26,-114,-116,-25,140,-77,-75,-48,-51,-109,-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,-185,-242,-239,-171,-230,-120,-251,226,227,-124,-101,230,-104,-117,-115,-77,-83,-250,268,-91,-93,-248,-212,-246,-226,-227,-110,-206,-211,-209,-111,282,-168,-210,-113,-112,-123,-2,-122,-139,-137,-1,230,230,-102,-98,-76,-78,-126,282,-237,-85,-84,-95,-184,-172,-225,-224,282,-235,-223,352,-234,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,282,-202,-190,-138,-125,-121,-100,-99,-103,-105,369,282,-92,-94,-213,-221,-222,-169,-207,-146,-140,-142,-144,-129,-127,282,282,282,-236,400,-186,-141,-143,-145,-128,-228,-130,282,-229,]),'TYPEDEF':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,59,60,62,63,64,73,75,80,82,83,144,145,146,149,151,185,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[22,22,-61,-72,-71,-58,-54,-55,-33,-29,-59,22,-34,-53,-68,-63,-52,22,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,22,-67,22,-70,-74,22,-57,-82,-249,-81,-107,-30,22,-97,-96,22,-45,-46,22,-109,-36,22,-47,-83,-250,-110,-111,-113,-112,22,22,-98,-37,-39,-42,-38,-40,22,-148,-147,-43,-149,-41,-85,-84,22,22,-100,-99,-167,-166,22,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'XOR':([92,93,94,95,96,97,98,101,102,104,109,111,114,115,117,118,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,349,350,351,356,401,409,],[-206,-233,-243,-247,-244,-241,-231,-232,-208,-187,-240,-220,-237,-245,-238,206,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-193,206,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,206,-199,-201,206,-190,-213,-221,-222,-207,-228,-229,]),'AUTO':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,59,60,62,63,64,73,75,80,82,83,144,145,146,149,151,185,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[20,20,-61,-72,-71,-58,-54,-55,-33,-29,-59,20,-34,-53,-68,-63,-52,20,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,20,-67,20,-70,-74,20,-57,-82,-249,-81,-107,-30,20,-97,-96,20,-45,-46,20,-109,-36,20,-47,-83,-250,-110,-111,-113,-112,20,20,-98,-37,-39,-42,-38,-40,20,-148,-147,-43,-149,-41,-85,-84,20,20,-100,-99,-167,-166,20,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'TIMES':([0,1,2,3,4,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,26,27,28,29,30,31,34,35,36,37,39,40,42,43,44,45,46,49,50,51,52,54,55,56,58,60,61,63,64,66,67,68,69,75,76,77,79,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,123,124,129,138,140,141,144,145,149,151,152,153,154,155,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,180,182,183,184,186,187,188,189,190,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,218,221,231,232,235,237,238,239,242,243,244,250,251,253,254,255,257,259,260,262,264,265,268,270,273,274,277,281,282,283,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,311,312,318,319,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,349,350,351,352,353,356,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,401,404,405,406,408,409,410,413,415,416,417,418,419,420,],[27,-251,-61,-72,27,-71,-58,-54,-55,-33,-29,-59,-251,-34,-53,-68,-63,-52,27,-56,-170,-66,-251,-69,27,-32,-73,-64,-31,-60,-35,-62,-65,-251,-67,-251,-70,-74,-57,-50,-9,-10,-82,-249,-81,-49,-30,110,-97,-96,-26,27,-116,-25,-45,-48,-51,27,-251,-251,27,-219,-206,-233,-243,-247,-244,-241,-231,177,-217,-232,-208,-187,177,-216,177,-240,-215,-220,177,177,-237,-245,-214,-238,208,-242,-239,-218,-230,27,-117,27,177,-36,177,-83,-250,-21,-80,-22,-79,177,-176,-179,-177,-173,-174,-178,-180,177,-182,-183,-175,-181,-248,177,-212,-215,-246,-226,177,177,-227,177,-206,-211,177,-209,27,-210,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,27,311,-98,177,-251,-37,-39,-42,-38,177,-40,177,177,-148,-147,-43,-149,177,-41,-237,-85,-84,27,177,-225,-224,-223,-234,177,177,27,208,208,208,208,208,208,208,208,208,208,-189,-188,208,208,208,208,208,-190,-215,364,-100,-99,-12,177,177,-11,-167,-166,177,-164,177,177,-150,177,-163,-151,177,177,-213,-221,-222,177,177,-207,-251,177,-215,-251,-131,-162,-165,177,-154,177,-152,177,177,177,-153,177,177,177,-251,-228,177,-158,-157,-155,-229,177,177,177,-159,-156,177,-161,-160,]),'LPAREN':([0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,26,27,28,29,30,31,32,34,35,36,37,39,40,42,43,44,45,46,49,50,51,52,54,55,56,58,59,60,61,63,64,66,67,68,69,75,76,77,79,83,87,89,90,91,93,94,95,96,97,98,99,100,101,102,105,106,108,109,110,111,112,113,114,115,116,117,119,120,123,124,129,138,139,140,141,144,145,149,151,152,153,154,155,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,177,178,180,182,183,184,185,186,189,191,195,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,221,223,224,231,232,235,237,238,239,242,243,244,245,249,250,251,252,253,254,255,257,259,260,262,263,264,265,268,270,273,274,277,281,282,283,285,286,311,312,314,318,319,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,350,351,352,353,357,358,359,360,361,362,364,369,372,373,374,376,377,379,381,382,387,388,389,391,393,395,396,397,398,399,400,401,404,405,406,408,409,410,413,415,416,417,418,419,420,],[4,-251,-61,-72,4,-71,-58,-54,-55,-33,-29,-59,-251,-34,4,-53,-68,-63,-52,4,-56,-170,62,-66,-251,-69,4,-32,-73,-108,-64,-31,-60,-35,-62,-65,-251,-67,-251,-70,-74,-57,-50,-9,-10,-82,-249,-81,-49,62,-30,112,-97,-96,-26,-114,-116,-25,-45,-48,-51,4,-109,-251,-251,4,-219,-233,-243,-247,-244,-241,-231,175,-217,-232,183,186,-216,189,-240,-215,-220,112,189,-237,-245,-214,-238,-242,-239,-218,-230,218,-117,-115,4,112,-36,112,-83,-250,-21,-80,-22,-79,186,-176,-179,-177,-173,-174,-178,-180,112,-182,-183,-175,-181,-248,112,-215,-246,-226,112,112,-227,-110,112,112,-111,285,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,112,186,186,-113,-112,218,112,313,218,-98,186,-251,-37,-39,-42,-38,112,-40,334,337,186,112,341,-148,-147,-43,-149,112,-41,-237,346,-85,-84,4,186,-225,-224,-223,-234,112,186,285,285,-215,112,313,-100,-99,-12,186,112,-11,-167,-166,112,-164,112,112,-150,112,-163,-151,112,112,-221,-222,112,186,-251,186,-146,-140,-142,-144,-215,-251,-131,-162,-165,112,-154,112,398,-152,-141,-143,-145,112,112,112,-153,112,112,112,-251,-228,112,-158,-157,-155,-229,112,112,112,-159,-156,112,-161,-160,]),'MINUSMINUS':([55,61,75,91,93,94,95,96,97,98,99,100,101,102,105,106,108,109,110,111,112,113,114,115,116,117,119,120,123,124,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,174,175,177,178,180,182,183,184,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,262,270,273,274,277,281,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,350,351,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,401,404,405,406,408,409,410,413,415,416,417,418,419,420,],[-249,113,-45,-219,-233,-243,-247,-244,-241,-231,113,-217,-232,184,113,-216,113,-240,-215,-220,113,113,-237,-245,-214,-238,-242,-239,-218,-230,113,113,-250,113,-176,-179,-177,-173,-174,-178,-180,113,-182,-183,-175,-181,-248,113,-215,-246,-226,113,113,-227,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,-251,-39,-42,-38,113,-40,113,113,-148,-147,-43,-149,113,-41,-237,113,-225,-224,-223,-234,113,113,-215,113,-12,113,113,-11,-167,-166,113,-164,113,113,-150,113,-163,-151,113,113,-221,-222,113,113,-251,113,-215,-251,-131,-162,-165,113,-154,113,-152,113,113,113,-153,113,113,113,-251,-228,113,-158,-157,-155,-229,113,113,113,-159,-156,113,-161,-160,]),'ID':([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37,39,40,42,43,44,45,46,49,50,51,52,54,55,56,58,60,61,62,63,64,65,66,67,68,69,75,76,77,79,87,89,90,91,99,100,105,106,108,110,112,113,116,123,129,133,134,138,139,140,141,144,145,149,151,152,153,154,155,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,179,181,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,218,221,224,226,230,231,232,235,237,238,239,240,242,243,244,250,251,253,254,255,257,259,260,264,265,268,270,282,283,311,312,318,319,322,324,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[32,-251,-61,-72,32,-71,-58,56,-54,-55,-33,-29,-59,-251,-34,32,-53,-68,-63,-87,-52,32,-56,-170,64,-66,-251,-69,32,-32,-73,-86,-64,-31,-60,-35,-62,-65,-251,-67,-251,-70,-74,-57,-50,-9,-10,-82,-249,-81,-49,-30,114,114,-97,-96,137,-26,-114,-116,-25,-45,-48,-51,32,-251,-251,32,-219,114,-217,114,-216,114,-215,114,114,-214,-218,32,137,137,-117,-115,32,114,-36,262,-83,-250,-21,-80,-22,-79,114,-176,-179,-177,-173,-174,-178,-180,114,-182,-183,-175,-181,114,-215,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,32,114,32,114,137,-98,114,-251,-37,-39,-42,330,-38,114,-40,114,262,-148,-147,-43,-149,262,-41,-85,-84,32,114,114,114,-215,114,-100,-99,-12,114,114,114,-11,-167,-166,114,-164,262,114,-150,114,-163,-151,262,114,114,114,-251,114,-215,-251,-131,-162,-165,114,-154,262,-152,114,114,262,-153,262,114,262,-251,114,-158,-157,-155,114,262,262,-159,-156,262,-161,-160,]),'IF':([55,75,145,151,238,239,242,244,251,253,254,255,257,259,260,331,332,335,336,340,342,344,345,373,374,377,379,382,395,396,397,399,405,406,408,413,415,416,417,418,419,420,],[-249,-45,263,-250,-39,-42,-38,-40,263,-148,-147,-43,-149,263,-41,-167,-166,-164,263,-150,-163,-151,263,-162,-165,-154,263,-152,263,-153,263,263,-158,-157,-155,263,263,-159,-156,263,-161,-160,]),'STRING_LITERAL':([55,61,75,91,99,100,101,105,106,108,110,112,113,115,116,123,141,145,151,156,162,163,164,165,166,167,168,169,170,171,172,173,175,177,178,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,235,238,239,242,243,244,250,251,253,254,255,257,259,260,270,282,283,311,312,322,325,326,327,331,332,334,335,336,337,340,341,342,344,345,346,352,353,357,358,364,369,372,373,374,376,377,379,382,391,393,395,396,397,398,399,400,404,405,406,408,410,413,415,416,417,418,419,420,],[-249,115,-45,-219,115,-217,178,115,-216,115,-215,115,115,-245,-214,-218,115,115,-250,115,-176,-179,-177,-173,-174,-178,-180,115,-182,-183,-175,-181,115,-215,-246,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,-251,-39,-42,-38,115,-40,115,115,-148,-147,-43,-149,115,-41,115,115,115,-215,115,-12,115,115,-11,-167,-166,115,-164,115,115,-150,115,-163,-151,115,115,115,115,-251,115,-215,-251,-131,-162,-165,115,-154,115,-152,115,115,115,-153,115,115,115,-251,115,-158,-157,-155,115,115,115,-159,-156,115,-161,-160,]),'FLOAT':([0,1,2,3,5,6,8,9,10,11,12,13,14,16,17,18,20,21,22,23,24,26,28,30,31,32,34,35,36,37,39,40,42,43,44,45,46,48,49,54,55,56,57,59,60,62,63,64,73,75,80,82,83,84,85,86,87,88,89,112,144,145,146,147,148,149,150,151,175,185,186,189,191,216,217,218,227,231,237,238,239,242,244,251,253,254,255,257,260,264,265,269,285,313,318,319,331,332,334,335,340,342,344,373,374,377,382,396,405,406,408,416,417,419,420,],[34,34,-61,-72,-71,-58,-54,-55,-33,-29,-59,34,-34,-53,-68,-63,-52,34,-56,-170,-106,-66,-69,-32,-73,-108,-64,-31,-60,-35,-62,-65,34,-67,34,-70,-74,34,-57,-82,-249,-81,34,-107,-30,34,-97,-96,34,-45,-46,34,-109,34,34,34,34,-88,34,34,-36,34,-47,34,34,-83,-89,-250,34,-110,34,34,-111,-113,-112,34,34,-98,-37,-39,-42,-38,-40,34,-148,-147,-43,-149,-41,-85,-84,-90,34,34,-100,-99,-167,-166,34,-164,-150,-163,-151,-162,-165,-154,-152,-153,-158,-157,-155,-159,-156,-161,-160,]),'XOREQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[166,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'LSHIFTEQUAL':([92,93,94,95,96,97,98,101,102,109,111,114,115,117,119,120,124,151,174,176,178,180,184,187,188,190,196,262,273,274,277,281,349,350,351,356,401,409,],[168,-233,-243,-247,-244,-241,-231,-232,-208,-240,-220,-237,-245,-238,-242,-239,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-210,-237,-225,-224,-223,-234,-213,-221,-222,-207,-228,-229,]),'RBRACKET':([61,92,93,94,95,96,97,98,101,102,103,104,107,109,110,111,114,115,117,118,119,120,121,122,124,151,174,176,178,180,184,187,188,190,194,196,221,267,271,273,274,275,277,281,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,304,305,310,311,312,349,350,351,355,356,363,364,367,386,401,409,],[-251,-206,-233,-243,-247,-244,-241,-231,-232,-208,185,-187,-4,-240,191,-220,-237,-245,-238,-185,-242,-239,-3,-171,-230,-250,-248,-212,-246,-226,-227,-206,-211,-209,-168,-210,-251,-184,-172,-225,-224,350,-223,-234,-193,-205,-194,-192,-196,-200,-195,-191,-198,-203,-189,-188,-197,-204,-199,-201,-202,-190,361,362,-251,-213,-221,-222,-169,-207,387,388,390,-186,-228,-229,]),} _lr_action = { } for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = { } _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'storage_class_specifier':([0,1,13,21,42,44,48,62,73,82,145,218,227,251,285,313,334,],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,]),'identifier_list_opt':([62,],[125,]),'selection_statement':([145,251,259,336,345,379,395,397,399,413,415,418,],[260,260,260,260,260,260,260,260,260,260,260,260,]),'constant':([61,99,105,108,112,113,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,]),'unary_expression':([61,99,105,108,112,113,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[92,176,187,190,92,196,92,92,187,92,92,92,92,92,92,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,92,187,187,92,187,92,187,92,92,187,92,187,92,187,92,92,92,92,92,92,92,92,187,187,92,92,92,92,92,92,92,92,92,92,92,92,92,]),'conditional_expression':([61,112,141,145,156,169,175,182,183,186,189,213,221,232,243,250,251,259,270,282,312,325,326,334,336,337,341,345,346,352,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[122,122,122,122,267,122,122,122,122,122,122,122,122,267,122,267,122,122,267,122,122,267,122,122,122,122,122,122,122,122,386,122,122,122,122,122,122,122,122,122,122,122,122,122,]),'brace_close':([86,136,147,148,228,229,261,328,369,385,400,],[149,231,264,265,318,319,344,370,392,401,409,]),'struct_or_union_specifier':([0,1,13,21,42,44,48,57,62,73,82,84,85,86,87,89,112,145,147,148,175,186,189,218,227,251,285,313,334,],[5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,]),'unified_wstring_literal':([61,99,105,108,112,113,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,]),'abstract_declarator_opt':([129,195,],[219,284,]),'iteration_statement':([145,251,259,336,345,379,395,397,399,413,415,418,],[239,239,239,239,239,239,239,239,239,239,239,239,]),'init_declarator_list':([29,79,],[70,70,]),'translation_unit_or_empty':([0,],[38,]),'struct_declaration_list':([57,84,85,],[86,147,148,]),'enumerator':([65,133,134,230,],[135,135,135,320,]),'pp_directive':([0,21,],[10,10,]),'declaration_list':([48,73,],[82,82,]),'declaration_specifiers_opt':([1,13,42,44,],[50,58,76,77,]),'abstract_declarator':([129,195,218,285,],[220,220,309,309,]),'external_declaration':([0,21,],[11,60,]),'type_specifier':([0,1,13,21,42,44,48,57,62,73,82,84,85,86,87,89,112,145,147,148,175,186,189,218,227,251,285,313,334,],[13,13,13,13,13,13,13,87,13,13,13,87,87,87,87,87,87,13,87,87,87,87,87,13,13,13,13,13,13,]),'designation':([235,357,369,400,],[322,322,322,322,]),'compound_statement':([81,142,145,251,259,336,345,379,395,397,399,413,415,418,],[144,237,244,244,244,244,244,244,244,244,244,244,244,244,]),'pointer':([0,4,21,29,67,79,90,129,140,195,218,268,285,],[15,15,15,15,139,15,15,224,15,286,224,15,286,]),'type_name':([112,175,186,189,],[193,272,279,280,]),'unified_string_literal':([61,99,105,108,112,113,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,]),'postfix_expression':([61,99,105,108,112,113,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,]),'assignment_expression_opt':([61,221,312,],[103,310,363,]),'statement':([145,251,259,336,345,379,395,397,399,413,415,418,],[253,253,343,377,382,396,405,406,408,417,419,420,]),'expression_statement':([145,251,259,336,345,379,395,397,399,413,415,418,],[238,238,238,238,238,238,238,238,238,238,238,238,]),'unary_operator':([61,99,105,108,112,113,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,]),'cast_expression':([61,105,112,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[104,188,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,356,104,104,104,104,104,104,104,104,104,104,356,104,104,104,104,104,104,104,104,104,104,104,104,104,104,]),'init_declarator':([29,79,140,],[74,74,233,]),'struct_declarator_list':([90,],[157,]),'brace_open':([7,25,54,56,63,64,81,141,142,145,251,259,283,326,336,345,349,353,354,379,391,395,397,399,413,415,418,],[57,65,84,85,133,134,145,235,145,145,145,145,357,235,145,145,357,357,357,145,235,145,145,145,145,145,145,]),'assignment_operator':([92,],[169,]),'struct_or_union':([0,1,13,21,42,44,48,57,62,73,82,84,85,86,87,89,112,145,147,148,175,186,189,218,227,251,285,313,334,],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,]),'block_item_list_opt':([145,],[261,]),'struct_declaration':([57,84,85,86,147,148,],[88,88,88,150,150,150,]),'assignment_expression':([61,112,141,145,169,175,182,183,186,189,213,221,243,251,259,282,312,326,334,336,337,341,345,346,352,376,379,391,393,395,397,398,399,404,410,413,415,418,],[107,194,236,194,271,194,194,276,194,194,194,107,194,194,194,355,107,236,194,194,194,194,194,194,384,194,194,236,194,194,194,194,194,194,194,194,194,194,]),'designation_opt':([235,357,369,400,],[326,326,391,391,]),'parameter_type_list':([62,218,285,313,],[127,307,307,307,]),'type_qualifier_list_opt':([27,],[67,]),'direct_declarator':([0,4,15,21,29,79,90,129,140,218,224,268,],[24,24,59,24,24,24,24,24,24,24,59,24,]),'type_qualifier_list':([27,],[66,]),'designator':([235,329,357,369,400,],[323,371,323,323,323,]),'argument_expression_list':([183,],[278,]),'initializer':([141,326,391,],[234,368,402,]),'direct_abstract_declarator':([129,195,218,224,285,286,],[223,223,223,314,223,314,]),'specifier_qualifier_list_opt':([87,89,],[153,155,]),'constant_expression':([156,232,250,270,325,],[266,321,338,348,367,]),'expression_opt':([145,251,259,334,336,345,376,379,393,395,397,399,404,410,413,415,418,],[241,241,241,375,241,241,394,241,403,241,241,241,411,414,241,241,241,]),'primary_expression':([61,99,105,108,112,113,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,283,312,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,]),'declaration_specifiers':([0,1,13,21,42,44,48,62,73,82,145,218,227,251,285,313,334,],[29,52,52,29,52,52,79,129,79,79,79,129,129,79,129,129,79,]),'declaration':([0,21,48,73,82,145,251,334,],[30,30,80,80,146,254,254,376,]),'struct_declarator_list_opt':([90,],[158,]),'identifier_list':([62,],[130,]),'typedef_name':([0,1,13,21,42,44,48,57,62,73,82,84,85,86,87,89,112,145,147,148,175,186,189,218,227,251,285,313,334,],[28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,]),'parameter_type_list_opt':([218,285,313,],[308,308,365,]),'jump_statement':([145,251,259,336,345,379,395,397,399,413,415,418,],[255,255,255,255,255,255,255,255,255,255,255,255,]),'declaration_list_opt':([48,73,],[81,142,]),'struct_declarator':([90,268,],[159,347,]),'function_definition':([0,21,],[35,35,]),'binary_expression':([61,112,141,145,156,169,175,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,232,243,250,251,259,270,282,312,325,326,334,336,337,341,345,346,352,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[118,118,118,118,118,118,118,118,118,118,118,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,118,304,305,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,]),'parameter_list':([62,218,285,313,],[131,131,131,131,]),'init_declarator_list_opt':([29,79,],[71,71,]),'enum_specifier':([0,1,13,21,42,44,48,57,62,73,82,84,85,86,87,89,112,145,147,148,175,186,189,218,227,251,285,313,334,],[45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,]),'decl_body':([0,21,48,73,82,145,251,334,],[41,41,41,41,41,41,41,41,]),'type_qualifier':([0,1,13,21,27,42,44,48,57,62,66,73,82,84,85,86,87,89,112,145,147,148,175,186,189,218,227,251,285,313,334,],[42,42,42,42,68,42,42,42,89,42,138,42,42,89,89,89,89,89,89,42,89,89,89,89,89,42,42,42,42,42,42,]),'enumerator_list':([65,133,134,],[136,228,229,]),'labeled_statement':([145,251,259,336,345,379,395,397,399,413,415,418,],[242,242,242,242,242,242,242,242,242,242,242,242,]),'function_specifier':([0,1,13,21,42,44,48,62,73,82,145,218,227,251,285,313,334,],[44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,]),'specifier_qualifier_list':([57,84,85,86,87,89,112,147,148,175,186,189,],[90,90,90,90,154,154,195,90,90,195,195,195,]),'block_item':([145,251,],[257,340,]),'block_item_list':([145,],[251,]),'empty':([0,1,13,27,29,42,44,48,61,62,73,79,87,89,90,129,145,195,218,221,235,251,259,285,312,313,334,336,345,357,369,376,379,393,395,397,399,400,404,410,413,415,418,],[47,51,51,69,72,51,51,78,121,126,78,72,152,152,160,225,258,225,306,121,327,339,339,306,121,306,339,339,339,327,327,339,339,339,339,339,339,327,339,339,339,339,339,]),'translation_unit':([0,],[21,]),'initializer_list':([235,357,],[328,385,]),'declarator':([0,4,21,29,79,90,129,140,218,268,],[48,53,48,73,143,161,222,143,53,161,]),'parameter_declaration':([62,218,227,285,313,],[128,128,317,128,128,]),'designator_list':([235,357,369,400,],[329,329,329,329,]),'identifier':([61,62,99,105,108,112,113,141,145,156,169,175,179,181,182,183,186,189,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,221,226,232,243,250,251,259,270,282,283,312,324,325,326,334,336,337,341,345,346,352,353,358,376,379,391,393,395,397,398,399,404,410,413,415,418,],[124,132,124,124,124,124,124,124,124,124,124,124,273,274,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,315,124,124,124,124,124,124,124,124,124,366,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,]),'expression':([112,145,175,182,186,189,213,243,251,259,334,336,337,341,345,346,376,379,393,395,397,398,399,404,410,413,415,418,],[192,247,192,275,192,192,303,333,247,247,247,247,378,380,247,383,247,247,247,247,247,407,247,247,247,247,247,247,]),} _lr_goto = { } for _k, _v in _lr_goto_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_goto: _lr_goto[_x] = { } _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> translation_unit_or_empty","S'",1,None,None,None), ('abstract_declarator_opt -> empty','abstract_declarator_opt',1,'p_abstract_declarator_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('abstract_declarator_opt -> abstract_declarator','abstract_declarator_opt',1,'p_abstract_declarator_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('assignment_expression_opt -> empty','assignment_expression_opt',1,'p_assignment_expression_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('assignment_expression_opt -> assignment_expression','assignment_expression_opt',1,'p_assignment_expression_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('block_item_list_opt -> empty','block_item_list_opt',1,'p_block_item_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('block_item_list_opt -> block_item_list','block_item_list_opt',1,'p_block_item_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('declaration_list_opt -> empty','declaration_list_opt',1,'p_declaration_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('declaration_list_opt -> declaration_list','declaration_list_opt',1,'p_declaration_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('declaration_specifiers_opt -> empty','declaration_specifiers_opt',1,'p_declaration_specifiers_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('declaration_specifiers_opt -> declaration_specifiers','declaration_specifiers_opt',1,'p_declaration_specifiers_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('designation_opt -> empty','designation_opt',1,'p_designation_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('designation_opt -> designation','designation_opt',1,'p_designation_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('expression_opt -> empty','expression_opt',1,'p_expression_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('expression_opt -> expression','expression_opt',1,'p_expression_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('identifier_list_opt -> empty','identifier_list_opt',1,'p_identifier_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('identifier_list_opt -> identifier_list','identifier_list_opt',1,'p_identifier_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('init_declarator_list_opt -> empty','init_declarator_list_opt',1,'p_init_declarator_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('init_declarator_list_opt -> init_declarator_list','init_declarator_list_opt',1,'p_init_declarator_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('parameter_type_list_opt -> empty','parameter_type_list_opt',1,'p_parameter_type_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('parameter_type_list_opt -> parameter_type_list','parameter_type_list_opt',1,'p_parameter_type_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('specifier_qualifier_list_opt -> empty','specifier_qualifier_list_opt',1,'p_specifier_qualifier_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('specifier_qualifier_list_opt -> specifier_qualifier_list','specifier_qualifier_list_opt',1,'p_specifier_qualifier_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('struct_declarator_list_opt -> empty','struct_declarator_list_opt',1,'p_struct_declarator_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('struct_declarator_list_opt -> struct_declarator_list','struct_declarator_list_opt',1,'p_struct_declarator_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('type_qualifier_list_opt -> empty','type_qualifier_list_opt',1,'p_type_qualifier_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',41), ('type_qualifier_list_opt -> type_qualifier_list','type_qualifier_list_opt',1,'p_type_qualifier_list_opt','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/plyparser.py',42), ('translation_unit_or_empty -> translation_unit','translation_unit_or_empty',1,'p_translation_unit_or_empty','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',363), ('translation_unit_or_empty -> empty','translation_unit_or_empty',1,'p_translation_unit_or_empty','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',364), ('translation_unit -> external_declaration','translation_unit',1,'p_translation_unit_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',372), ('translation_unit -> translation_unit external_declaration','translation_unit',2,'p_translation_unit_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',379), ('external_declaration -> function_definition','external_declaration',1,'p_external_declaration_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',391), ('external_declaration -> declaration','external_declaration',1,'p_external_declaration_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',396), ('external_declaration -> pp_directive','external_declaration',1,'p_external_declaration_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',401), ('external_declaration -> SEMI','external_declaration',1,'p_external_declaration_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',406), ('pp_directive -> PPHASH','pp_directive',1,'p_pp_directive','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',411), ('function_definition -> declarator declaration_list_opt compound_statement','function_definition',3,'p_function_definition_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',420), ('function_definition -> declaration_specifiers declarator declaration_list_opt compound_statement','function_definition',4,'p_function_definition_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',432), ('statement -> labeled_statement','statement',1,'p_statement','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',443), ('statement -> expression_statement','statement',1,'p_statement','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',444), ('statement -> compound_statement','statement',1,'p_statement','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',445), ('statement -> selection_statement','statement',1,'p_statement','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',446), ('statement -> iteration_statement','statement',1,'p_statement','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',447), ('statement -> jump_statement','statement',1,'p_statement','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',448), ('decl_body -> declaration_specifiers init_declarator_list_opt','decl_body',2,'p_decl_body','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',462), ('declaration -> decl_body SEMI','declaration',2,'p_declaration','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',550), ('declaration_list -> declaration','declaration_list',1,'p_declaration_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',559), ('declaration_list -> declaration_list declaration','declaration_list',2,'p_declaration_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',560), ('declaration_specifiers -> type_qualifier declaration_specifiers_opt','declaration_specifiers',2,'p_declaration_specifiers_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',565), ('declaration_specifiers -> type_specifier declaration_specifiers_opt','declaration_specifiers',2,'p_declaration_specifiers_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',570), ('declaration_specifiers -> storage_class_specifier declaration_specifiers_opt','declaration_specifiers',2,'p_declaration_specifiers_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',575), ('declaration_specifiers -> function_specifier declaration_specifiers_opt','declaration_specifiers',2,'p_declaration_specifiers_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',580), ('storage_class_specifier -> AUTO','storage_class_specifier',1,'p_storage_class_specifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',585), ('storage_class_specifier -> REGISTER','storage_class_specifier',1,'p_storage_class_specifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',586), ('storage_class_specifier -> STATIC','storage_class_specifier',1,'p_storage_class_specifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',587), ('storage_class_specifier -> EXTERN','storage_class_specifier',1,'p_storage_class_specifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',588), ('storage_class_specifier -> TYPEDEF','storage_class_specifier',1,'p_storage_class_specifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',589), ('function_specifier -> INLINE','function_specifier',1,'p_function_specifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',594), ('type_specifier -> VOID','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',599), ('type_specifier -> _BOOL','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',600), ('type_specifier -> CHAR','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',601), ('type_specifier -> SHORT','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',602), ('type_specifier -> INT','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',603), ('type_specifier -> LONG','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',604), ('type_specifier -> FLOAT','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',605), ('type_specifier -> DOUBLE','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',606), ('type_specifier -> _COMPLEX','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',607), ('type_specifier -> SIGNED','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',608), ('type_specifier -> UNSIGNED','type_specifier',1,'p_type_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',609), ('type_specifier -> typedef_name','type_specifier',1,'p_type_specifier_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',614), ('type_specifier -> enum_specifier','type_specifier',1,'p_type_specifier_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',615), ('type_specifier -> struct_or_union_specifier','type_specifier',1,'p_type_specifier_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',616), ('type_qualifier -> CONST','type_qualifier',1,'p_type_qualifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',621), ('type_qualifier -> RESTRICT','type_qualifier',1,'p_type_qualifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',622), ('type_qualifier -> VOLATILE','type_qualifier',1,'p_type_qualifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',623), ('init_declarator_list -> init_declarator','init_declarator_list',1,'p_init_declarator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',628), ('init_declarator_list -> init_declarator_list COMMA init_declarator','init_declarator_list',3,'p_init_declarator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',629), ('init_declarator -> declarator','init_declarator',1,'p_init_declarator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',637), ('init_declarator -> declarator EQUALS initializer','init_declarator',3,'p_init_declarator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',638), ('specifier_qualifier_list -> type_qualifier specifier_qualifier_list_opt','specifier_qualifier_list',2,'p_specifier_qualifier_list_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',643), ('specifier_qualifier_list -> type_specifier specifier_qualifier_list_opt','specifier_qualifier_list',2,'p_specifier_qualifier_list_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',648), ('struct_or_union_specifier -> struct_or_union ID','struct_or_union_specifier',2,'p_struct_or_union_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',656), ('struct_or_union_specifier -> struct_or_union TYPEID','struct_or_union_specifier',2,'p_struct_or_union_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',657), ('struct_or_union_specifier -> struct_or_union brace_open struct_declaration_list brace_close','struct_or_union_specifier',4,'p_struct_or_union_specifier_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',666), ('struct_or_union_specifier -> struct_or_union ID brace_open struct_declaration_list brace_close','struct_or_union_specifier',5,'p_struct_or_union_specifier_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',675), ('struct_or_union_specifier -> struct_or_union TYPEID brace_open struct_declaration_list brace_close','struct_or_union_specifier',5,'p_struct_or_union_specifier_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',676), ('struct_or_union -> STRUCT','struct_or_union',1,'p_struct_or_union','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',685), ('struct_or_union -> UNION','struct_or_union',1,'p_struct_or_union','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',686), ('struct_declaration_list -> struct_declaration','struct_declaration_list',1,'p_struct_declaration_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',693), ('struct_declaration_list -> struct_declaration_list struct_declaration','struct_declaration_list',2,'p_struct_declaration_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',694), ('struct_declaration -> specifier_qualifier_list struct_declarator_list_opt SEMI','struct_declaration',3,'p_struct_declaration_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',699), ('struct_declarator_list -> struct_declarator','struct_declarator_list',1,'p_struct_declarator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',750), ('struct_declarator_list -> struct_declarator_list COMMA struct_declarator','struct_declarator_list',3,'p_struct_declarator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',751), ('struct_declarator -> declarator','struct_declarator',1,'p_struct_declarator_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',759), ('struct_declarator -> declarator COLON constant_expression','struct_declarator',3,'p_struct_declarator_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',764), ('struct_declarator -> COLON constant_expression','struct_declarator',2,'p_struct_declarator_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',765), ('enum_specifier -> ENUM ID','enum_specifier',2,'p_enum_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',773), ('enum_specifier -> ENUM TYPEID','enum_specifier',2,'p_enum_specifier_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',774), ('enum_specifier -> ENUM brace_open enumerator_list brace_close','enum_specifier',4,'p_enum_specifier_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',779), ('enum_specifier -> ENUM ID brace_open enumerator_list brace_close','enum_specifier',5,'p_enum_specifier_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',784), ('enum_specifier -> ENUM TYPEID brace_open enumerator_list brace_close','enum_specifier',5,'p_enum_specifier_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',785), ('enumerator_list -> enumerator','enumerator_list',1,'p_enumerator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',790), ('enumerator_list -> enumerator_list COMMA','enumerator_list',2,'p_enumerator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',791), ('enumerator_list -> enumerator_list COMMA enumerator','enumerator_list',3,'p_enumerator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',792), ('enumerator -> ID','enumerator',1,'p_enumerator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',803), ('enumerator -> ID EQUALS constant_expression','enumerator',3,'p_enumerator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',804), ('declarator -> direct_declarator','declarator',1,'p_declarator_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',816), ('declarator -> pointer direct_declarator','declarator',2,'p_declarator_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',821), ('direct_declarator -> ID','direct_declarator',1,'p_direct_declarator_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',826), ('direct_declarator -> LPAREN declarator RPAREN','direct_declarator',3,'p_direct_declarator_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',835), ('direct_declarator -> direct_declarator LBRACKET assignment_expression_opt RBRACKET','direct_declarator',4,'p_direct_declarator_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',840), ('direct_declarator -> direct_declarator LBRACKET TIMES RBRACKET','direct_declarator',4,'p_direct_declarator_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',852), ('direct_declarator -> direct_declarator LPAREN parameter_type_list RPAREN','direct_declarator',4,'p_direct_declarator_5','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',862), ('direct_declarator -> direct_declarator LPAREN identifier_list_opt RPAREN','direct_declarator',4,'p_direct_declarator_5','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',863), ('pointer -> TIMES type_qualifier_list_opt','pointer',2,'p_pointer','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',873), ('pointer -> TIMES type_qualifier_list_opt pointer','pointer',3,'p_pointer','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',874), ('type_qualifier_list -> type_qualifier','type_qualifier_list',1,'p_type_qualifier_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',884), ('type_qualifier_list -> type_qualifier_list type_qualifier','type_qualifier_list',2,'p_type_qualifier_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',885), ('parameter_type_list -> parameter_list','parameter_type_list',1,'p_parameter_type_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',890), ('parameter_type_list -> parameter_list COMMA ELLIPSIS','parameter_type_list',3,'p_parameter_type_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',891), ('parameter_list -> parameter_declaration','parameter_list',1,'p_parameter_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',899), ('parameter_list -> parameter_list COMMA parameter_declaration','parameter_list',3,'p_parameter_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',900), ('parameter_declaration -> declaration_specifiers declarator','parameter_declaration',2,'p_parameter_declaration_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',909), ('parameter_declaration -> declaration_specifiers abstract_declarator_opt','parameter_declaration',2,'p_parameter_declaration_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',928), ('identifier_list -> identifier','identifier_list',1,'p_identifier_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',940), ('identifier_list -> identifier_list COMMA identifier','identifier_list',3,'p_identifier_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',941), ('initializer -> assignment_expression','initializer',1,'p_initializer_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',950), ('initializer -> brace_open initializer_list brace_close','initializer',3,'p_initializer_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',955), ('initializer -> brace_open initializer_list COMMA brace_close','initializer',4,'p_initializer_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',956), ('initializer_list -> designation_opt initializer','initializer_list',2,'p_initializer_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',961), ('initializer_list -> initializer_list COMMA designation_opt initializer','initializer_list',4,'p_initializer_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',962), ('designation -> designator_list EQUALS','designation',2,'p_designation','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',973), ('designator_list -> designator','designator_list',1,'p_designator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',981), ('designator_list -> designator_list designator','designator_list',2,'p_designator_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',982), ('designator -> LBRACKET constant_expression RBRACKET','designator',3,'p_designator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',987), ('designator -> PERIOD identifier','designator',2,'p_designator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',988), ('type_name -> specifier_qualifier_list abstract_declarator_opt','type_name',2,'p_type_name','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',993), ('abstract_declarator -> pointer','abstract_declarator',1,'p_abstract_declarator_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1009), ('abstract_declarator -> pointer direct_abstract_declarator','abstract_declarator',2,'p_abstract_declarator_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1017), ('abstract_declarator -> direct_abstract_declarator','abstract_declarator',1,'p_abstract_declarator_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1022), ('direct_abstract_declarator -> LPAREN abstract_declarator RPAREN','direct_abstract_declarator',3,'p_direct_abstract_declarator_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1032), ('direct_abstract_declarator -> direct_abstract_declarator LBRACKET assignment_expression_opt RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1036), ('direct_abstract_declarator -> LBRACKET assignment_expression_opt RBRACKET','direct_abstract_declarator',3,'p_direct_abstract_declarator_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1046), ('direct_abstract_declarator -> direct_abstract_declarator LBRACKET TIMES RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1054), ('direct_abstract_declarator -> LBRACKET TIMES RBRACKET','direct_abstract_declarator',3,'p_direct_abstract_declarator_5','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1064), ('direct_abstract_declarator -> direct_abstract_declarator LPAREN parameter_type_list_opt RPAREN','direct_abstract_declarator',4,'p_direct_abstract_declarator_6','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1072), ('direct_abstract_declarator -> LPAREN parameter_type_list_opt RPAREN','direct_abstract_declarator',3,'p_direct_abstract_declarator_7','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1082), ('block_item -> declaration','block_item',1,'p_block_item','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1093), ('block_item -> statement','block_item',1,'p_block_item','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1094), ('block_item_list -> block_item','block_item_list',1,'p_block_item_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1101), ('block_item_list -> block_item_list block_item','block_item_list',2,'p_block_item_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1102), ('compound_statement -> brace_open block_item_list_opt brace_close','compound_statement',3,'p_compound_statement_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1108), ('labeled_statement -> ID COLON statement','labeled_statement',3,'p_labeled_statement_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1114), ('labeled_statement -> CASE constant_expression COLON statement','labeled_statement',4,'p_labeled_statement_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1118), ('labeled_statement -> DEFAULT COLON statement','labeled_statement',3,'p_labeled_statement_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1122), ('selection_statement -> IF LPAREN expression RPAREN statement','selection_statement',5,'p_selection_statement_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1126), ('selection_statement -> IF LPAREN expression RPAREN statement ELSE statement','selection_statement',7,'p_selection_statement_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1130), ('selection_statement -> SWITCH LPAREN expression RPAREN statement','selection_statement',5,'p_selection_statement_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1134), ('iteration_statement -> WHILE LPAREN expression RPAREN statement','iteration_statement',5,'p_iteration_statement_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1139), ('iteration_statement -> DO statement WHILE LPAREN expression RPAREN SEMI','iteration_statement',7,'p_iteration_statement_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1143), ('iteration_statement -> FOR LPAREN expression_opt SEMI expression_opt SEMI expression_opt RPAREN statement','iteration_statement',9,'p_iteration_statement_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1147), ('iteration_statement -> FOR LPAREN declaration expression_opt SEMI expression_opt RPAREN statement','iteration_statement',8,'p_iteration_statement_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1151), ('jump_statement -> GOTO ID SEMI','jump_statement',3,'p_jump_statement_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1155), ('jump_statement -> BREAK SEMI','jump_statement',2,'p_jump_statement_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1159), ('jump_statement -> CONTINUE SEMI','jump_statement',2,'p_jump_statement_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1163), ('jump_statement -> RETURN expression SEMI','jump_statement',3,'p_jump_statement_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1167), ('jump_statement -> RETURN SEMI','jump_statement',2,'p_jump_statement_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1168), ('expression_statement -> expression_opt SEMI','expression_statement',2,'p_expression_statement','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1173), ('expression -> assignment_expression','expression',1,'p_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1180), ('expression -> expression COMMA assignment_expression','expression',3,'p_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1181), ('typedef_name -> TYPEID','typedef_name',1,'p_typedef_name','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1193), ('assignment_expression -> conditional_expression','assignment_expression',1,'p_assignment_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1197), ('assignment_expression -> unary_expression assignment_operator assignment_expression','assignment_expression',3,'p_assignment_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1198), ('assignment_operator -> EQUALS','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1211), ('assignment_operator -> XOREQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1212), ('assignment_operator -> TIMESEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1213), ('assignment_operator -> DIVEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1214), ('assignment_operator -> MODEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1215), ('assignment_operator -> PLUSEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1216), ('assignment_operator -> MINUSEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1217), ('assignment_operator -> LSHIFTEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1218), ('assignment_operator -> RSHIFTEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1219), ('assignment_operator -> ANDEQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1220), ('assignment_operator -> OREQUAL','assignment_operator',1,'p_assignment_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1221), ('constant_expression -> conditional_expression','constant_expression',1,'p_constant_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1226), ('conditional_expression -> binary_expression','conditional_expression',1,'p_conditional_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1230), ('conditional_expression -> binary_expression CONDOP expression COLON conditional_expression','conditional_expression',5,'p_conditional_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1231), ('binary_expression -> cast_expression','binary_expression',1,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1239), ('binary_expression -> binary_expression TIMES binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1240), ('binary_expression -> binary_expression DIVIDE binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1241), ('binary_expression -> binary_expression MOD binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1242), ('binary_expression -> binary_expression PLUS binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1243), ('binary_expression -> binary_expression MINUS binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1244), ('binary_expression -> binary_expression RSHIFT binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1245), ('binary_expression -> binary_expression LSHIFT binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1246), ('binary_expression -> binary_expression LT binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1247), ('binary_expression -> binary_expression LE binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1248), ('binary_expression -> binary_expression GE binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1249), ('binary_expression -> binary_expression GT binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1250), ('binary_expression -> binary_expression EQ binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1251), ('binary_expression -> binary_expression NE binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1252), ('binary_expression -> binary_expression AND binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1253), ('binary_expression -> binary_expression OR binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1254), ('binary_expression -> binary_expression XOR binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1255), ('binary_expression -> binary_expression LAND binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1256), ('binary_expression -> binary_expression LOR binary_expression','binary_expression',3,'p_binary_expression','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1257), ('cast_expression -> unary_expression','cast_expression',1,'p_cast_expression_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1265), ('cast_expression -> LPAREN type_name RPAREN cast_expression','cast_expression',4,'p_cast_expression_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1269), ('unary_expression -> postfix_expression','unary_expression',1,'p_unary_expression_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1273), ('unary_expression -> PLUSPLUS unary_expression','unary_expression',2,'p_unary_expression_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1277), ('unary_expression -> MINUSMINUS unary_expression','unary_expression',2,'p_unary_expression_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1278), ('unary_expression -> unary_operator cast_expression','unary_expression',2,'p_unary_expression_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1279), ('unary_expression -> SIZEOF unary_expression','unary_expression',2,'p_unary_expression_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1284), ('unary_expression -> SIZEOF LPAREN type_name RPAREN','unary_expression',4,'p_unary_expression_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1285), ('unary_operator -> AND','unary_operator',1,'p_unary_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1293), ('unary_operator -> TIMES','unary_operator',1,'p_unary_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1294), ('unary_operator -> PLUS','unary_operator',1,'p_unary_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1295), ('unary_operator -> MINUS','unary_operator',1,'p_unary_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1296), ('unary_operator -> NOT','unary_operator',1,'p_unary_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1297), ('unary_operator -> LNOT','unary_operator',1,'p_unary_operator','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1298), ('postfix_expression -> primary_expression','postfix_expression',1,'p_postfix_expression_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1303), ('postfix_expression -> postfix_expression LBRACKET expression RBRACKET','postfix_expression',4,'p_postfix_expression_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1307), ('postfix_expression -> postfix_expression LPAREN argument_expression_list RPAREN','postfix_expression',4,'p_postfix_expression_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1311), ('postfix_expression -> postfix_expression LPAREN RPAREN','postfix_expression',3,'p_postfix_expression_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1312), ('postfix_expression -> postfix_expression PERIOD identifier','postfix_expression',3,'p_postfix_expression_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1317), ('postfix_expression -> postfix_expression ARROW identifier','postfix_expression',3,'p_postfix_expression_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1318), ('postfix_expression -> postfix_expression PLUSPLUS','postfix_expression',2,'p_postfix_expression_5','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1323), ('postfix_expression -> postfix_expression MINUSMINUS','postfix_expression',2,'p_postfix_expression_5','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1324), ('postfix_expression -> LPAREN type_name RPAREN brace_open initializer_list brace_close','postfix_expression',6,'p_postfix_expression_6','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1329), ('postfix_expression -> LPAREN type_name RPAREN brace_open initializer_list COMMA brace_close','postfix_expression',7,'p_postfix_expression_6','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1330), ('primary_expression -> identifier','primary_expression',1,'p_primary_expression_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1335), ('primary_expression -> constant','primary_expression',1,'p_primary_expression_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1339), ('primary_expression -> unified_string_literal','primary_expression',1,'p_primary_expression_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1343), ('primary_expression -> unified_wstring_literal','primary_expression',1,'p_primary_expression_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1344), ('primary_expression -> LPAREN expression RPAREN','primary_expression',3,'p_primary_expression_4','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1349), ('argument_expression_list -> assignment_expression','argument_expression_list',1,'p_argument_expression_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1353), ('argument_expression_list -> argument_expression_list COMMA assignment_expression','argument_expression_list',3,'p_argument_expression_list','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1354), ('identifier -> ID','identifier',1,'p_identifier','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1363), ('constant -> INT_CONST_DEC','constant',1,'p_constant_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1367), ('constant -> INT_CONST_OCT','constant',1,'p_constant_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1368), ('constant -> INT_CONST_HEX','constant',1,'p_constant_1','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1369), ('constant -> FLOAT_CONST','constant',1,'p_constant_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1375), ('constant -> HEX_FLOAT_CONST','constant',1,'p_constant_2','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1376), ('constant -> CHAR_CONST','constant',1,'p_constant_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1382), ('constant -> WCHAR_CONST','constant',1,'p_constant_3','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1383), ('unified_string_literal -> STRING_LITERAL','unified_string_literal',1,'p_unified_string_literal','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1394), ('unified_string_literal -> unified_string_literal STRING_LITERAL','unified_string_literal',2,'p_unified_string_literal','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1395), ('unified_wstring_literal -> WSTRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1405), ('unified_wstring_literal -> unified_wstring_literal WSTRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1406), ('brace_open -> LBRACE','brace_open',1,'p_brace_open','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1416), ('brace_close -> RBRACE','brace_close',1,'p_brace_close','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1422), ('empty -> <empty>','empty',0,'p_empty','/home/heryxpc/Documents/soton/dissertation/tools/pycparser/barel/barel-pycparser-b9ad39646ebc/pycparser/c_parser.py',1428), ]
501.348754
72,171
0.728348
27,766
140,879
3.623712
0.029893
0.027441
0.049893
0.062366
0.769371
0.739485
0.720263
0.700853
0.682595
0.667111
0
0.408637
0.011698
140,879
280
72,172
503.139286
0.314018
0.000433
0
0.00738
1
0.926199
0.367641
0.259591
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
1
0
0
0
1
1
1
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
10
60b2263de9f0d0c14268d8422330b96e5591bfe3
191,638
py
Python
parser/team23/grammar/parsetab.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
parser/team23/grammar/parsetab.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
parser/team23/grammar/parsetab.py
itsmjoe/tytus
3b0341cc854d67979b766c5c8b06ed172ce0c913
[ "MIT" ]
null
null
null
# parsetab.py # This file is automatically generated. Do not edit. # pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'leftPAR_ABREPAR_CIERRArightIGUALleftORleftANDleftNO_IGUALnonassocMAYORMENORMAYOR_IGUALMENOR_IGUALleftMASMENOSleftASTERISCODIVISIONMODULOleftPOTENCIArightNOTleftLLAVE_ABRELLAVE_CIERRAABS ACOS ACOSD ACOSH ADD ALL ALTER AND AS ASC ASIN ASIND ASINH ASTERISCO ATAN ATAN2 ATAN2D ATAND ATANH AVG BETWEEN BIGINT BOOLEAN BY CADENA CASE CASTEO CBRT CEIL CEILING CHAR CHARACTER CHECK COLUMN COMA CONSTRAINT CORCHE_ABRE CORCHE_CIERRA COS COSD COSH COT COTD COUNT CREATE CURRENT_USER DATABASE DATABASES DATE DAY DECIMAL DECIMAL_NUM DEFAULT DEGREES DELETE DESC DIFERENTE DISTINCT DIV DIVISION DOUBLE DROP ELSE END ENTERO ENUM EXISTS EXP FACTORIAL FALSE FIELDS FIRST FLOOR FOREIGN FROM FULL GCD GREATEST GROUP HAVING HOUR ID IF IGUAL ILIKE IN INHERITS INNER INSERT INTEGER INTERSECT INTERVAL INTO IS ISNULL JOIN KEY LAST LEAST LEFT LIKE LIMIT LLAVE_ABRE LLAVE_CIERRA LN LOG MAS MAX MAYOR MAYOR_IGUAL MENOR MENOR_IGUAL MENOS MIN MINUTE MOD MODE MODULO MONEY MONTH NOT NOTNULL NO_IGUAL NULL NULLS NUMERIC OFFSET OR ORDER OUTER OWNER PAR_ABRE PAR_CIERRA PI POTENCIA POWER PRECISION PRIMARY PUNTO PUNTOCOMA RADIANS RANDOM REAL REFERENCE REFERENCES RENAME REPLACE RIGHT ROUND SECOND SELECT SESSION_USER SET SHOW SIGN SIMILAR SIN SIND SINH SMALLINT SQRT SUBSTRING SUM SYMMETRIC TABLE TAN TAND TANH TEXT THEN TIME TIMESTAMP TO TRUE TRUNC TYPE UNION UNIQUE UNKNOWN UPDATE USE VALUES VARCHAR VARYING WHEN WHERE WIDTH_BUCKET WITH WITHOUT YEAR ZONEinit : instruccionesinstrucciones : instrucciones instruccioninstrucciones : instruccion instruccion : crear_statement PUNTOCOMA\n | alter_statement PUNTOCOMA\n | drop_statement PUNTOCOMA\n | seleccionar PUNTOCOMA\n | union PUNTOCOMAinstruccion : SHOW DATABASES PUNTOCOMA\n | INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA\n | INSERT INTO ID PAR_ABRE list_id PAR_CIERRA VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA\n | UPDATE ID SET ID IGUAL expression where PUNTOCOMA\n | DELETE FROM ID WHERE expression PUNTOCOMA\n | DELETE FROM ID PUNTOCOMA\n | USE DATABASE ID PUNTOCOMAunion : PAR_ABRE seleccionar PAR_CIERRA UNION PAR_ABRE seleccionar PAR_CIERRAcrear_statement : CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statementcrear_statement : CREATE or_replace DATABASE if_not_exists ID owner_ mode_or_replace : OR REPLACE\n | if_not_exists : IF NOT EXISTS\n | owner_ : OWNER IGUAL ID\n | mode_ : MODE IGUAL ENTERO\n | alter_statement : ALTER DATABASE ID rename_owneralter_statement : ALTER TABLE ID alter_listalter_list : alter_list COMA alter_opalter_list : alter_oprename_owner : RENAME TO ID\n | OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRAow_op : ID\n | CURRENT_USER\n | SESSION_USERdrop_statement : DROP DATABASE if_exists IDdrop_statement : DROP TABLE IDif_exists : IF EXISTS\n | contenido_tabla : contenido_tabla COMA manejo_tablacontenido_tabla : manejo_tablamanejo_tabla : declaracion_columna\n | condition_columndeclaracion_columna : ID type_column condition_column_rowdeclaracion_columna : ID type_columntype_column : SMALLINT\n | INTEGER\n\t | BIGINT\n\t | DECIMAL\n\t | NUMERIC\n\t | REAL\n\t | DOUBLE PRECISION\n\t | MONEY\n\t | VARCHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA\n \t | TEXT\n\t | DATE\n | TIMESTAMP\n | TIMEcondition_column_row : condition_column_row condition_columncondition_column_row : condition_columncondition_column : constraint UNIQUE PAR_ABRE list_id PAR_CIERRA\n | constraint CHECK PAR_ABRE expression PAR_CIERRA\n | constraint key_tablecondition_column : key_table_row\n | key_tablecondition_column : DEFAULT expression\n | NOT NULL\n | UNIQUE PAR_ABRE list_id PAR_CIERRA\n | CHECK PAR_ABRE expression PAR_CIERRA\n \t\t | condition_column : constraint UNIQUE\n | UNIQUEkey_table_row : PRIMARY KEY\n | FOREIGN KEY REFERENCES ID PAR_ABRE ID PAR_CIERRAconstraint : CONSTRAINT ID\n | list_id : list_id COMA aliaslist_id : aliasalias : IDkey_table : PRIMARY KEY list_key\n\t | FOREIGN KEY list_key REFERENCES ID list_keylist_key : PAR_ABRE list_id PAR_CIERRA\n\t | alter_op : ADD condition_column\n\t | ALTER COLUMN ID alter_col_op\n\t | DROP alter_drop ID\n | RENAME TO IDalter_op : ADD COLUMN ID type_column condition_columnalter_drop : CONSTRAINT\n\t | COLUMN op_add : CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA\n | CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA\n | key_table REFERENCES PAR_ABRE list_id PAR_CIERRAalter_col_op : SET NOT NULL\n | SET DEFAULT expression\n | TYPE type_columninherits_statement : INHERITS PAR_ABRE ID PAR_CIERRA\n | list_val : list_val COMA expressionlist_val : expressionwhere : WHERE expression\n | seleccionar : SELECT distinto select_list FROM list_id donde group_by order_by group_having limiteseleccionar : SELECT GREATEST expressiones\n | SELECT LEAST expressionesseleccionar : SELECT list_expression_fexpressiones : PAR_ABRE list_expression PAR_CIERRAexpressiones : list_expressiondistinto : DISTINCT\n\t | select_list : ASTERISCO\n\t | expressiones table_expression : expressionesdonde : WHERE expression\n | group_by : GROUP BY list_id\n | order_by : ORDER BY list_id asc_desc nulls_f_l\n | group_having : HAVING expressiones\n | asc_desc : ASC\n\t | DESCnulls_f_l : NULLS LAST\n\t | NULLS FIRST\n\t | limite : LIMIT ENTERO\n\t | LIMIT ALL\n\t | OFFSET ENTERO\n\t | list_expression : list_expression COMA expressionlist_expression : expressionlist_expression_f : list_expression_f COMA expression_flist_expression_f : expression_fexpression : SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRAexpression : expression NOT BETWEEN SYMMETRIC expression AND expressionexpression : expression NOT BETWEEN expression AND expression\n | expression BETWEEN SYMMETRIC expression AND expressionexpression : expression BETWEEN expression AND expressionexpression : expression IS DISTINCT FROM expressionexpression : expression IS NOT DISTINCT FROM expressionexpression : ID PUNTO IDexpression : expression IS NOT NULL\n | expression IS NOT TRUE\n | expression IS NOT FALSE\n | expression IS NOT UNKNOWNexpression : expression IS NULL\n | expression IS TRUE\n | expression IS FALSE\n | expression IS UNKNOWNexpression : expression ISNULL\n | expression NOTNULLexpression : SUM PAR_ABRE expression PAR_CIERRA\n | COUNT PAR_ABRE expression PAR_CIERRA\n | AVG PAR_ABRE expression PAR_CIERRA\n | MAX PAR_ABRE expression PAR_CIERRA\n | MIN PAR_ABRE expression PAR_CIERRA\n | ABS PAR_ABRE expression PAR_CIERRA\n | CBRT PAR_ABRE expression PAR_CIERRA\n | CEIL PAR_ABRE expression PAR_CIERRA\n | CEILING PAR_ABRE expression PAR_CIERRA \n | DEGREES PAR_ABRE expression PAR_CIERRA\n | DIV PAR_ABRE expression COMA expression PAR_CIERRA\n | EXP PAR_ABRE expression PAR_CIERRA\n | FACTORIAL PAR_ABRE expression PAR_CIERRA \n | FLOOR PAR_ABRE expression PAR_CIERRA\n | GCD PAR_ABRE expression COMA expression PAR_CIERRA\n | LN PAR_ABRE expression PAR_CIERRA\n | LOG PAR_ABRE expression PAR_CIERRA\n | MOD PAR_ABRE expression COMA expression PAR_CIERRA\n | PI PAR_ABRE PAR_CIERRA\n | POWER PAR_ABRE expression COMA expression PAR_CIERRA\n | RADIANS PAR_ABRE expression PAR_CIERRA\n | ROUND PAR_ABRE expression PAR_CIERRA\n | SIGN PAR_ABRE expression PAR_CIERRA\n | SQRT PAR_ABRE expression PAR_CIERRA\n | WIDTH_BUCKET PAR_ABRE expression COMA expression COMA expression COMA expression PAR_CIERRA\n | TRUNC PAR_ABRE expression PAR_CIERRA\n | RANDOM PAR_ABRE PAR_CIERRA expression : ACOS PAR_ABRE expression PAR_CIERRA\n | ACOSD PAR_ABRE expression PAR_CIERRA\n | ASIN PAR_ABRE expression PAR_CIERRA\n | ASIND PAR_ABRE expression PAR_CIERRA\n | ATAN PAR_ABRE expression PAR_CIERRA\n | ATAND PAR_ABRE expression PAR_CIERRA\n | ATAN2 PAR_ABRE expression COMA expression PAR_CIERRA\n | ATAN2D PAR_ABRE expression COMA expression PAR_CIERRA\n | COS PAR_ABRE expression PAR_CIERRA\n | COSD PAR_ABRE expression PAR_CIERRA\n | COT PAR_ABRE expression PAR_CIERRA\n | COTD PAR_ABRE expression PAR_CIERRA\n | SIN PAR_ABRE expression PAR_CIERRA\n | SIND PAR_ABRE expression PAR_CIERRA\n | TAN PAR_ABRE expression PAR_CIERRA\n | TAND PAR_ABRE expression PAR_CIERRA\n | SINH PAR_ABRE expression PAR_CIERRA\n | COSH PAR_ABRE expression PAR_CIERRA\n | TANH PAR_ABRE expression PAR_CIERRA\n | ASINH PAR_ABRE expression PAR_CIERRA\n | ACOSH PAR_ABRE expression PAR_CIERRA\n | ATANH PAR_ABRE expression PAR_CIERRA expression_f : SUM PAR_ABRE expression PAR_CIERRA\n | COUNT PAR_ABRE expression PAR_CIERRA\n | AVG PAR_ABRE expression PAR_CIERRA\n | MAX PAR_ABRE expression PAR_CIERRA\n | MIN PAR_ABRE expression PAR_CIERRA\n | ABS PAR_ABRE expression PAR_CIERRA\n | CBRT PAR_ABRE expression PAR_CIERRA\n | CEIL PAR_ABRE expression PAR_CIERRA\n | CEILING PAR_ABRE expression PAR_CIERRA \n | DEGREES PAR_ABRE expression PAR_CIERRA\n | DIV PAR_ABRE expression COMA expression PAR_CIERRA\n | EXP PAR_ABRE expression PAR_CIERRA\n | FACTORIAL PAR_ABRE expression PAR_CIERRA \n | FLOOR PAR_ABRE expression PAR_CIERRA\n | GCD PAR_ABRE expression COMA expression PAR_CIERRA\n | LN PAR_ABRE expression PAR_CIERRA\n | LOG PAR_ABRE expression PAR_CIERRA\n | MOD PAR_ABRE expression COMA expression PAR_CIERRA\n | PI PAR_ABRE PAR_CIERRA\n | POWER PAR_ABRE expression COMA expression PAR_CIERRA\n | RADIANS PAR_ABRE expression PAR_CIERRA\n | ROUND PAR_ABRE expression PAR_CIERRA\n | SIGN PAR_ABRE expression PAR_CIERRA\n | SQRT PAR_ABRE expression PAR_CIERRA\n | WIDTH_BUCKET PAR_ABRE expression COMA expression COMA expression COMA expression PAR_CIERRA\n | TRUNC PAR_ABRE expression PAR_CIERRA\n | RANDOM PAR_ABRE PAR_CIERRA expression_f : ACOS PAR_ABRE expression PAR_CIERRA\n | ACOSD PAR_ABRE expression PAR_CIERRA\n | ASIN PAR_ABRE expression PAR_CIERRA\n | ASIND PAR_ABRE expression PAR_CIERRA\n | ATAN PAR_ABRE expression PAR_CIERRA\n | ATAND PAR_ABRE expression PAR_CIERRA\n | ATAN2 PAR_ABRE expression COMA expression PAR_CIERRA\n | ATAN2D PAR_ABRE expression COMA expression PAR_CIERRA\n | COS PAR_ABRE expression PAR_CIERRA\n | COSD PAR_ABRE expression PAR_CIERRA\n | COT PAR_ABRE expression PAR_CIERRA\n | COTD PAR_ABRE expression PAR_CIERRA\n | SIN PAR_ABRE expression PAR_CIERRA\n | SIND PAR_ABRE expression PAR_CIERRA\n | TAN PAR_ABRE expression PAR_CIERRA\n | TAND PAR_ABRE expression PAR_CIERRA\n | SINH PAR_ABRE expression PAR_CIERRA\n | COSH PAR_ABRE expression PAR_CIERRA\n | TANH PAR_ABRE expression PAR_CIERRA\n | ASINH PAR_ABRE expression PAR_CIERRA\n | ACOSH PAR_ABRE expression PAR_CIERRA\n | ATANH PAR_ABRE expression PAR_CIERRA expression : seleccionarexpression : PAR_ABRE expression PAR_CIERRAexpression : expression MAYOR expressionexpression : expression MENOR expressionexpression : expression MAYOR_IGUAL expressionexpression : expression MENOR_IGUAL expressionexpression : expression IGUAL expressionexpression : expression NO_IGUAL expressionexpression : expression DIFERENTE expressionexpression : expression AND expressionexpression : expression OR expressionexpression : NOT expressionexpression : ID\n | ASTERISCOexpression : ENTEROexpression : DECIMAL_NUMexpression : NULLexpression : CADENA' _lr_action_items = {'SHOW':([0,2,3,19,20,21,22,23,24,93,228,229,526,696,699,772,],[9,9,-3,-2,-4,-5,-6,-7,-8,-9,-14,-15,-13,-10,-12,-11,]),'INSERT':([0,2,3,19,20,21,22,23,24,93,228,229,526,696,699,772,],[10,10,-3,-2,-4,-5,-6,-7,-8,-9,-14,-15,-13,-10,-12,-11,]),'UPDATE':([0,2,3,19,20,21,22,23,24,93,228,229,526,696,699,772,],[12,12,-3,-2,-4,-5,-6,-7,-8,-9,-14,-15,-13,-10,-12,-11,]),'DELETE':([0,2,3,19,20,21,22,23,24,93,228,229,526,696,699,772,],[13,13,-3,-2,-4,-5,-6,-7,-8,-9,-14,-15,-13,-10,-12,-11,]),'USE':([0,2,3,19,20,21,22,23,24,93,228,229,526,696,699,772,],[14,14,-3,-2,-4,-5,-6,-7,-8,-9,-14,-15,-13,-10,-12,-11,]),'CREATE':([0,2,3,19,20,21,22,23,24,93,228,229,526,696,699,772,],[15,15,-3,-2,-4,-5,-6,-7,-8,-9,-14,-15,-13,-10,-12,-11,]),'ALTER':([0,2,3,19,20,21,22,23,24,93,103,228,229,392,526,696,699,772,],[16,16,-3,-2,-4,-5,-6,-7,-8,-9,236,-14,-15,236,-13,-10,-12,-11,]),'DROP':([0,2,3,19,20,21,22,23,24,93,103,228,229,392,526,696,699,772,],[17,17,-3,-2,-4,-5,-6,-7,-8,-9,240,-14,-15,240,-13,-10,-12,-11,]),'SELECT':([0,2,3,11,18,19,20,21,22,23,24,38,39,40,42,93,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,228,229,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,369,370,382,404,406,483,487,490,491,496,504,505,526,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,696,698,699,718,725,728,733,752,758,770,772,],[18,18,-3,18,-113,-2,-4,-5,-6,-7,-8,18,18,18,-112,-9,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,-14,-15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,-13,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,-10,18,-12,18,18,18,18,18,18,18,-11,]),'PAR_ABRE':([0,2,3,18,19,20,21,22,23,24,38,39,40,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,99,110,113,114,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,225,227,228,229,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,378,379,382,404,406,483,487,490,491,496,504,505,526,536,537,538,545,546,551,555,556,568,570,571,573,579,590,594,597,598,603,611,612,635,636,640,647,649,652,653,654,675,678,680,693,696,698,699,712,718,725,728,733,747,752,758,770,772,],[11,11,-3,-113,-2,-4,-5,-6,-7,-8,110,110,110,-112,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,-9,224,230,245,263,245,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,365,369,245,-14,-15,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,550,551,245,245,245,245,245,245,245,245,245,245,-13,644,645,646,651,652,245,658,658,245,245,245,245,245,245,245,245,245,245,245,245,245,698,245,705,706,245,658,658,245,245,245,245,-10,245,-12,746,245,245,245,245,658,110,245,245,-11,]),'$end':([1,2,3,19,20,21,22,23,24,93,228,229,526,696,699,772,],[0,-1,-3,-2,-4,-5,-6,-7,-8,-9,-14,-15,-13,-10,-12,-11,]),'PUNTOCOMA':([4,5,6,7,8,25,41,43,97,98,106,111,112,115,116,166,167,168,169,170,171,172,233,237,238,239,242,253,254,264,315,334,342,366,368,371,378,380,381,387,393,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,525,528,529,530,531,532,533,535,539,540,541,542,543,545,547,552,553,555,557,560,563,565,566,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,634,637,638,639,643,648,653,657,661,668,671,672,674,677,679,689,690,691,692,694,695,700,709,710,715,716,719,720,721,724,726,727,729,730,731,732,734,735,738,739,740,743,744,745,747,748,749,750,751,754,755,759,760,761,763,764,767,769,773,774,775,776,777,778,779,781,782,784,785,786,],[20,21,22,23,24,93,-109,-137,228,229,-37,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-27,-28,-30,-73,-36,-154,-155,-265,-136,-223,-231,-82,-81,526,-75,-68,-67,-24,-87,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-105,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,-101,-74,-66,-69,-70,-76,-26,-31,-29,-89,-90,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,696,-80,-16,699,-52,-17,-86,-83,-18,-88,-73,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-104,-71,-72,-23,-32,-99,-91,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-54,-55,-56,-64,-65,-85,-86,-25,-97,-98,-133,-119,-139,772,-57,-100,-84,-106,-123,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'DATABASES':([9,],[25,]),'INTO':([10,],[26,]),'ID':([12,18,26,29,30,31,34,35,36,37,38,39,40,42,96,100,104,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,224,227,230,231,243,244,245,248,250,251,255,256,257,258,259,260,261,262,263,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,384,389,391,394,395,396,397,398,404,406,483,487,490,491,496,504,505,523,544,550,551,559,561,568,570,571,573,579,590,594,597,598,603,611,612,635,640,651,652,658,659,663,675,678,680,693,698,706,713,718,723,725,728,733,746,752,753,758,770,],[28,-113,94,97,98,99,102,103,-39,106,115,115,115,-112,226,-22,242,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,366,115,372,387,-38,366,115,115,115,115,115,115,115,115,115,115,115,115,115,423,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,554,560,562,564,565,-92,-93,566,115,115,115,115,115,115,115,115,115,366,372,366,115,-21,665,115,115,115,115,115,115,115,115,115,115,115,115,115,115,366,115,366,712,715,115,115,115,115,115,742,747,115,366,115,115,115,762,115,366,115,115,]),'FROM':([13,41,43,107,108,109,111,112,115,116,166,167,168,169,170,171,172,253,254,264,315,334,342,366,368,399,401,402,403,407,408,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,567,574,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,672,674,677,679,689,690,691,692,694,695,721,724,726,727,729,730,731,732,734,735,751,754,755,764,767,769,774,775,776,777,778,779,781,782,784,785,786,],[29,-109,-137,244,-114,-115,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-154,-155,-265,-136,-223,-231,-82,-81,-118,-110,-255,-134,-263,573,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-120,680,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-133,-119,-139,-106,-123,-138,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'DATABASE':([14,15,16,17,32,101,],[30,-20,34,36,100,-19,]),'TABLE':([15,16,17,],[31,35,37,]),'OR':([15,41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[33,-109,-137,-267,-111,262,-266,-270,-254,-268,-269,-271,-107,-267,-108,262,-154,-155,-265,-136,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,-223,262,262,262,262,262,262,262,-231,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,-82,-81,262,-118,262,-110,-255,262,262,-263,-150,-151,-152,-153,-256,-257,-258,-259,262,-261,262,-264,262,-145,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,-174,262,262,262,262,262,262,262,-182,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,262,262,262,-120,262,262,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,262,262,262,262,262,262,262,-80,262,-122,262,262,-142,262,262,262,262,262,262,262,262,262,-215,-219,-222,-224,-238,-239,262,262,262,-124,-140,-141,262,-166,-170,-173,-175,-189,-190,262,262,-133,-119,-139,262,262,-106,-123,-138,262,-130,-131,-132,-129,-125,-126,262,-229,-121,-180,-127,-128,]),'GREATEST':([18,],[39,]),'LEAST':([18,],[40,]),'DISTINCT':([18,252,409,],[42,408,574,]),'ASTERISCO':([18,38,39,40,42,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[-113,108,171,171,-112,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,]),'SUBSTRING':([18,38,39,40,42,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[-113,113,113,113,-112,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,]),'SUM':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[44,117,117,117,-112,117,117,44,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,]),'COUNT':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[45,118,118,118,-112,118,118,45,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,]),'AVG':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[46,119,119,119,-112,119,119,46,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,]),'MAX':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[47,120,120,120,-112,120,120,47,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,]),'MIN':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[48,121,121,121,-112,121,121,48,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,]),'ABS':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[49,122,122,122,-112,122,122,49,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,]),'CBRT':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[50,123,123,123,-112,123,123,50,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,]),'CEIL':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[51,124,124,124,-112,124,124,51,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,]),'CEILING':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[52,125,125,125,-112,125,125,52,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,]),'DEGREES':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[53,126,126,126,-112,126,126,53,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,]),'DIV':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[54,127,127,127,-112,127,127,54,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,]),'EXP':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[55,128,128,128,-112,128,128,55,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,]),'FACTORIAL':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[56,129,129,129,-112,129,129,56,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,]),'FLOOR':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[57,130,130,130,-112,130,130,57,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,]),'GCD':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[58,131,131,131,-112,131,131,58,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,]),'LN':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[59,132,132,132,-112,132,132,59,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,]),'LOG':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[60,133,133,133,-112,133,133,60,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,]),'MOD':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[61,134,134,134,-112,134,134,61,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,]),'PI':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[62,135,135,135,-112,135,135,62,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,]),'POWER':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[63,136,136,136,-112,136,136,63,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,]),'RADIANS':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[64,137,137,137,-112,137,137,64,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,]),'ROUND':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[65,138,138,138,-112,138,138,65,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,]),'SIGN':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[66,139,139,139,-112,139,139,66,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,]),'SQRT':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[67,140,140,140,-112,140,140,67,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,]),'WIDTH_BUCKET':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[68,141,141,141,-112,141,141,68,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,]),'TRUNC':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[69,142,142,142,-112,142,142,69,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,]),'RANDOM':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[70,143,143,143,-112,143,143,70,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,]),'ACOS':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[71,144,144,144,-112,144,144,71,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,]),'ACOSD':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[72,145,145,145,-112,145,145,72,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,]),'ASIN':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[73,146,146,146,-112,146,146,73,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,]),'ASIND':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[74,147,147,147,-112,147,147,74,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,]),'ATAN':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[75,148,148,148,-112,148,148,75,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,]),'ATAND':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[76,149,149,149,-112,149,149,76,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,]),'ATAN2':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[77,150,150,150,-112,150,150,77,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,]),'ATAN2D':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[78,151,151,151,-112,151,151,78,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,]),'COS':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[79,152,152,152,-112,152,152,79,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,]),'COSD':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[80,153,153,153,-112,153,153,80,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,]),'COT':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[81,154,154,154,-112,154,154,81,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,]),'COTD':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[82,155,155,155,-112,155,155,82,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,]),'SIN':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[83,156,156,156,-112,156,156,83,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,]),'SIND':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[84,157,157,157,-112,157,157,84,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,]),'TAN':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[85,158,158,158,-112,158,158,85,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,]),'TAND':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[86,159,159,159,-112,159,159,86,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,]),'SINH':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[87,160,160,160,-112,160,160,87,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,]),'COSH':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[88,161,161,161,-112,161,161,88,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,]),'TANH':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[89,162,162,162,-112,162,162,89,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,]),'ASINH':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[90,163,163,163,-112,163,163,90,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,]),'ACOSH':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[91,164,164,164,-112,164,164,91,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,]),'ATANH':([18,38,39,40,42,110,114,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[92,165,165,165,-112,165,165,92,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,]),'NOT':([18,38,39,40,41,42,43,108,110,111,112,114,115,116,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,230,232,239,245,247,248,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,368,370,371,378,380,381,382,399,400,401,402,403,404,405,406,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,551,552,553,555,567,568,569,570,571,572,573,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,635,637,640,641,642,643,652,653,656,657,669,671,672,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,697,698,700,701,708,709,710,718,721,724,725,726,727,728,729,730,731,732,733,734,735,736,738,739,740,743,744,745,747,750,751,752,754,755,756,757,758,760,763,764,767,769,770,771,773,774,775,776,777,778,779,780,781,782,784,785,786,],[-113,114,114,114,-109,-112,-137,-267,114,-111,249,114,-266,-270,-254,-268,-269,-271,-107,-267,-108,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,383,388,383,114,249,114,114,114,409,-154,-155,114,114,114,114,114,114,114,114,114,249,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,-136,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,-223,249,249,249,249,249,249,249,-231,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,114,-82,-81,114,249,-75,-68,-67,114,-118,249,-110,-255,249,114,249,114,249,-150,-151,-152,-153,249,249,249,249,249,249,249,249,249,-145,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,-174,249,249,249,249,249,249,249,-182,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,114,-216,-217,-218,114,-220,-221,114,114,-225,-226,-227,-228,114,-230,-232,-233,-234,-235,-236,-237,114,114,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,249,249,383,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,383,-74,-66,114,249,-70,-76,-120,114,249,114,114,249,114,-146,-147,-148,-149,114,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,114,-167,-168,-169,114,-171,-172,114,114,-176,-177,-178,-179,114,-181,-183,-184,-185,-186,-187,-188,114,114,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,249,249,249,249,249,249,249,114,-80,114,383,-63,-52,114,-86,249,-83,717,383,-122,249,114,249,249,114,249,114,249,249,249,249,249,249,249,249,-215,-219,-222,-224,114,-238,-239,249,114,249,-62,249,-71,-72,114,-124,249,114,249,249,114,-166,-170,-173,-175,114,-189,-190,249,-54,-55,-56,-64,-65,-85,-86,249,-133,114,-119,249,249,249,114,-57,-84,-106,-123,-138,114,249,-77,-130,-131,-132,-129,-125,-126,249,-229,-121,-180,-127,-128,]),'ENTERO':([18,38,39,40,42,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,644,645,646,652,675,678,680,693,698,705,714,718,725,728,733,752,758,765,766,770,],[-113,167,167,167,-112,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,702,703,704,167,167,167,167,167,167,741,748,167,167,167,167,167,167,774,776,167,]),'DECIMAL_NUM':([18,38,39,40,42,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[-113,168,168,168,-112,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,]),'NULL':([18,38,39,40,42,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,252,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,383,404,406,409,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,717,718,725,728,733,752,758,770,],[-113,116,116,116,-112,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,410,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,553,116,116,575,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,749,116,116,116,116,116,116,116,]),'CADENA':([18,38,39,40,42,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[-113,169,169,169,-112,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,]),'PAR_CIERRA':([27,41,43,111,112,115,116,166,167,168,169,170,171,172,192,200,230,246,247,253,254,264,284,292,315,316,317,318,319,320,321,322,323,324,325,327,328,329,331,332,334,336,337,338,339,341,342,343,344,345,346,347,348,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,367,368,373,374,375,376,378,380,381,399,400,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,424,425,426,427,428,429,430,431,432,433,435,436,437,439,440,442,444,445,446,447,449,450,451,452,453,454,455,456,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,524,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,555,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,632,633,637,641,642,643,650,653,655,656,657,672,674,677,679,682,683,684,685,687,688,689,690,691,692,694,695,697,701,702,703,704,707,708,709,710,711,721,724,726,727,729,730,731,732,734,735,737,738,739,740,741,742,743,744,745,747,751,754,755,756,760,762,763,764,767,769,771,773,774,775,776,777,778,779,780,781,782,784,785,786,],[95,-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,334,342,-73,401,402,-154,-155,-265,442,450,-136,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,-223,492,493,494,495,497,-231,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,-82,522,-81,543,-41,-42,-43,-75,-68,-67,-118,402,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,-174,599,600,601,602,604,-182,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,634,-103,638,-45,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,-73,-74,-66,-69,-70,-76,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,689,690,691,692,694,695,-80,-44,-63,-52,-40,-86,709,710,-83,-122,-117,-142,-143,729,730,731,732,734,735,-215,-219,-222,-224,-238,-239,-102,-62,738,739,740,743,744,-71,-72,745,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,759,-54,-55,-56,760,761,-64,-65,-85,-86,-133,-119,-139,769,-57,773,-84,-106,-123,-138,781,-77,-130,-131,-132,-129,-125,-126,784,-229,-121,-180,-127,-128,]),'SET':([28,562,],[96,669,]),'REPLACE':([33,],[101,]),'IF':([36,100,],[105,232,]),'BETWEEN':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,249,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,250,-266,-270,-254,-268,-269,-271,-107,-267,-108,250,404,-154,-155,-265,-136,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,-223,250,250,250,250,250,250,250,-231,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,-82,-81,250,-118,250,-110,-255,250,250,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,250,-264,250,-145,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,-174,250,250,250,250,250,250,250,-182,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,250,250,250,-120,250,250,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,250,250,250,250,250,250,250,-80,250,-122,250,250,-142,250,250,250,250,250,250,250,250,250,-215,-219,-222,-224,-238,-239,250,250,250,-124,-140,-141,250,-166,-170,-173,-175,-189,-190,250,250,-133,-119,-139,250,250,-106,-123,-138,250,-130,-131,-132,-129,-125,-126,250,-229,-121,-180,-127,-128,]),'IS':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,252,-266,-270,-254,-268,-269,-271,-107,-267,-108,252,-154,-155,-265,-136,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,-223,252,252,252,252,252,252,252,-231,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,-82,-81,252,-118,252,-110,-255,252,252,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,252,-264,252,-145,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,-174,252,252,252,252,252,252,252,-182,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,252,252,252,-120,252,252,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,252,252,252,252,252,252,252,-80,252,-122,252,252,-142,252,252,252,252,252,252,252,252,252,-215,-219,-222,-224,-238,-239,252,252,252,-124,-140,-141,252,-166,-170,-173,-175,-189,-190,252,252,-133,-119,-139,252,252,-106,-123,-138,252,-130,-131,-132,-129,-125,-126,252,-229,-121,-180,-127,-128,]),'ISNULL':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,253,-266,-270,-254,-268,-269,-271,-107,-267,-108,253,-154,-155,-265,-136,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,-223,253,253,253,253,253,253,253,-231,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,-82,-81,253,-118,253,-110,-255,253,253,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,253,-264,253,-145,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,-174,253,253,253,253,253,253,253,-182,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,253,253,253,-120,253,253,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,253,253,253,253,253,253,253,-80,253,-122,253,253,-142,253,253,253,253,253,253,253,253,253,-215,-219,-222,-224,-238,-239,253,253,253,-124,-140,-141,253,-166,-170,-173,-175,-189,-190,253,253,-133,-119,-139,253,253,-106,-123,-138,253,-130,-131,-132,-129,-125,-126,253,-229,-121,-180,-127,-128,]),'NOTNULL':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,254,-266,-270,-254,-268,-269,-271,-107,-267,-108,254,-154,-155,-265,-136,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,-223,254,254,254,254,254,254,254,-231,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,-82,-81,254,-118,254,-110,-255,254,254,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,254,-264,254,-145,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,-174,254,254,254,254,254,254,254,-182,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,254,254,254,-120,254,254,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,254,254,254,254,254,254,254,-80,254,-122,254,254,-142,254,254,254,254,254,254,254,254,254,-215,-219,-222,-224,-238,-239,254,254,254,-124,-140,-141,254,-166,-170,-173,-175,-189,-190,254,254,-133,-119,-139,254,254,-106,-123,-138,254,-130,-131,-132,-129,-125,-126,254,-229,-121,-180,-127,-128,]),'MAYOR':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,255,-266,-270,-254,-268,-269,-271,-107,-267,-108,255,-154,-155,-265,-136,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,-223,255,255,255,255,255,255,255,-231,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,-82,-81,255,-118,255,-110,-255,255,255,255,-150,-151,-152,-153,None,None,None,None,255,255,255,255,255,-145,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,-174,255,255,255,255,255,255,255,-182,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,255,255,255,-120,255,255,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,255,255,255,255,255,255,255,-80,255,-122,255,255,255,255,255,255,255,255,255,255,255,255,-215,-219,-222,-224,-238,-239,255,255,255,-124,255,255,255,-166,-170,-173,-175,-189,-190,255,255,-133,-119,255,255,255,-106,-123,-138,255,-130,-131,-132,-129,-125,-126,255,-229,-121,-180,-127,-128,]),'MENOR':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,256,-266,-270,-254,-268,-269,-271,-107,-267,-108,256,-154,-155,-265,-136,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-223,256,256,256,256,256,256,256,-231,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-82,-81,256,-118,256,-110,-255,256,256,256,-150,-151,-152,-153,None,None,None,None,256,256,256,256,256,-145,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-174,256,256,256,256,256,256,256,-182,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,256,256,256,-120,256,256,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,256,256,256,256,256,256,256,-80,256,-122,256,256,256,256,256,256,256,256,256,256,256,256,-215,-219,-222,-224,-238,-239,256,256,256,-124,256,256,256,-166,-170,-173,-175,-189,-190,256,256,-133,-119,256,256,256,-106,-123,-138,256,-130,-131,-132,-129,-125,-126,256,-229,-121,-180,-127,-128,]),'MAYOR_IGUAL':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,257,-266,-270,-254,-268,-269,-271,-107,-267,-108,257,-154,-155,-265,-136,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,-223,257,257,257,257,257,257,257,-231,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,-82,-81,257,-118,257,-110,-255,257,257,257,-150,-151,-152,-153,None,None,None,None,257,257,257,257,257,-145,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,-174,257,257,257,257,257,257,257,-182,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,257,257,257,-120,257,257,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,257,257,257,257,257,257,257,-80,257,-122,257,257,257,257,257,257,257,257,257,257,257,257,-215,-219,-222,-224,-238,-239,257,257,257,-124,257,257,257,-166,-170,-173,-175,-189,-190,257,257,-133,-119,257,257,257,-106,-123,-138,257,-130,-131,-132,-129,-125,-126,257,-229,-121,-180,-127,-128,]),'MENOR_IGUAL':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,258,-266,-270,-254,-268,-269,-271,-107,-267,-108,258,-154,-155,-265,-136,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,-223,258,258,258,258,258,258,258,-231,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,-82,-81,258,-118,258,-110,-255,258,258,258,-150,-151,-152,-153,None,None,None,None,258,258,258,258,258,-145,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,-174,258,258,258,258,258,258,258,-182,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,258,258,258,-120,258,258,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,258,258,258,258,258,258,258,-80,258,-122,258,258,258,258,258,258,258,258,258,258,258,258,-215,-219,-222,-224,-238,-239,258,258,258,-124,258,258,258,-166,-170,-173,-175,-189,-190,258,258,-133,-119,258,258,258,-106,-123,-138,258,-130,-131,-132,-129,-125,-126,258,-229,-121,-180,-127,-128,]),'IGUAL':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,226,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,558,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,662,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,259,-266,-270,-254,-268,-269,-271,-107,-267,-108,370,259,-154,-155,-265,-136,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,-223,259,259,259,259,259,259,259,-231,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,-82,-81,259,-118,259,-110,-255,259,259,-263,-150,-151,-152,-153,-256,-257,-258,-259,259,-261,259,-264,259,-145,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,-174,259,259,259,259,259,259,259,-182,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,259,259,259,663,-120,259,259,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,259,259,259,259,259,259,259,-80,259,714,-122,259,259,-142,259,259,259,259,259,259,259,259,259,-215,-219,-222,-224,-238,-239,259,259,259,-124,-140,-141,259,-166,-170,-173,-175,-189,-190,259,259,-133,-119,-139,259,259,-106,-123,-138,259,-130,-131,-132,-129,-125,-126,259,-229,-121,-180,-127,-128,]),'NO_IGUAL':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,260,-266,-270,-254,-268,-269,-271,-107,-267,-108,260,-154,-155,-265,-136,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,-223,260,260,260,260,260,260,260,-231,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,-82,-81,260,-118,260,-110,-255,260,260,260,-150,-151,-152,-153,-256,-257,-258,-259,260,-261,260,260,260,-145,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,-174,260,260,260,260,260,260,260,-182,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,260,260,260,-120,260,260,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,260,260,260,260,260,260,260,-80,260,-122,260,260,260,260,260,260,260,260,260,260,260,260,-215,-219,-222,-224,-238,-239,260,260,260,-124,260,260,260,-166,-170,-173,-175,-189,-190,260,260,-133,-119,260,260,260,-106,-123,-138,260,-130,-131,-132,-129,-125,-126,260,-229,-121,-180,-127,-128,]),'DIFERENTE':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,261,-266,-270,-254,-268,-269,-271,-107,-267,-108,261,-154,-155,-265,-136,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,-223,261,261,261,261,261,261,261,-231,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,-82,-81,261,-118,261,-110,-255,261,261,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,261,-264,261,-145,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,-174,261,261,261,261,261,261,261,-182,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,261,261,261,-120,261,261,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,261,261,261,261,261,261,261,-80,261,-122,261,261,-142,261,261,261,261,261,261,261,261,261,-215,-219,-222,-224,-238,-239,261,261,261,-124,-140,-141,261,-166,-170,-173,-175,-189,-190,261,261,-133,-119,-139,261,261,-106,-123,-138,261,-130,-131,-132,-129,-125,-126,261,-229,-121,-180,-127,-128,]),'AND':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,247,253,254,264,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,366,368,371,399,400,401,402,403,405,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,521,525,552,567,569,572,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,637,656,672,674,676,677,679,681,682,683,684,685,686,687,688,689,690,691,692,694,695,697,700,708,721,724,726,727,729,730,731,732,734,735,736,750,751,754,755,756,757,764,767,769,771,774,775,776,777,778,779,780,781,782,784,785,786,],[-109,-137,-267,-111,251,-266,-270,-254,-268,-269,-271,-107,-267,-108,251,-154,-155,-265,-136,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,-223,251,251,251,251,251,251,251,-231,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,-82,-81,251,-118,251,-110,-255,251,571,-263,-150,-151,-152,-153,-256,-257,-258,-259,251,-261,251,251,251,-145,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,-174,251,251,251,251,251,251,251,-182,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,251,251,251,-120,675,678,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,251,251,251,251,251,251,251,-80,251,-122,251,725,-142,251,251,251,251,251,251,251,251,251,-215,-219,-222,-224,-238,-239,251,251,251,-124,-140,-141,251,-166,-170,-173,-175,-189,-190,251,251,-133,-119,-139,251,251,-106,-123,-138,251,-130,-131,-132,-129,-125,-126,251,-229,-121,-180,-127,-128,]),'COMA':([41,43,108,111,112,115,116,166,167,168,169,170,171,172,230,237,238,239,246,247,253,254,264,315,326,330,333,334,335,340,342,349,350,366,367,368,373,374,375,376,378,380,381,393,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,422,423,434,438,441,442,443,448,450,457,458,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,555,563,565,566,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,631,637,641,642,643,650,653,655,657,668,671,672,674,677,679,681,686,689,690,691,692,694,695,697,701,707,709,710,711,719,720,721,724,726,727,729,730,731,732,734,735,736,737,738,739,740,743,744,745,747,749,750,751,754,755,757,760,763,764,767,768,769,773,774,775,776,777,778,779,781,782,784,785,786,],[173,-137,-267,248,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-73,392,-30,-73,248,-135,-154,-155,-265,-136,483,487,490,-223,491,496,-231,504,505,-82,523,-81,544,-41,-42,-43,-75,-68,-67,-87,523,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,579,-145,590,594,597,-174,598,603,-182,611,612,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,635,-103,-45,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,-73,-74,-66,-69,-70,-76,-29,-89,-90,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,693,-80,-44,-63,-52,-40,-86,523,-83,-88,-73,-122,-117,-142,-143,728,733,-215,-219,-222,-224,-238,-239,-102,-62,523,-71,-72,523,-99,-91,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,758,635,-54,-55,-56,-64,-65,-85,-86,-97,-98,-133,523,-139,770,-57,-84,-106,-123,523,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'LIMIT':([41,43,111,112,115,116,166,167,168,169,170,171,172,253,254,264,315,334,342,366,368,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,672,674,677,679,689,690,691,692,694,695,721,724,726,727,729,730,731,732,734,735,751,754,755,764,767,769,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-154,-155,-265,-136,-223,-231,-82,-81,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,765,-119,-139,-106,-123,-138,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'OFFSET':([41,43,111,112,115,116,166,167,168,169,170,171,172,253,254,264,315,334,342,366,368,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,672,674,677,679,689,690,691,692,694,695,721,724,726,727,729,730,731,732,734,735,751,754,755,764,767,769,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-154,-155,-265,-136,-223,-231,-82,-81,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,766,-119,-139,-106,-123,-138,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'WHERE':([41,43,97,111,112,115,116,166,167,168,169,170,171,172,253,254,264,315,334,342,366,368,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,525,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,672,674,677,679,689,690,691,692,694,695,721,724,726,727,729,730,731,732,734,735,751,754,755,764,767,769,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,227,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-154,-155,-265,-136,-223,-231,-82,-81,568,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,640,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-133,-119,-139,-106,-123,-138,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'DEFAULT':([41,43,111,112,115,116,166,167,168,169,170,171,172,230,239,253,254,264,315,334,342,366,368,378,380,381,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,555,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,641,642,643,653,657,669,671,672,674,677,679,689,690,691,692,694,695,701,709,710,721,724,726,727,729,730,731,732,734,735,738,739,740,743,744,745,747,751,754,755,760,763,764,767,769,773,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,382,382,-154,-155,-265,-136,-223,-231,-82,-81,-75,-68,-67,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,382,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,382,-74,-66,-69,-70,-76,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,382,-63,-52,-86,-83,718,382,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-62,-71,-72,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-54,-55,-56,-64,-65,-85,-86,-133,-119,-139,-57,-84,-106,-123,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'UNIQUE':([41,43,111,112,115,116,166,167,168,169,170,171,172,230,239,253,254,264,315,334,342,366,368,377,378,380,381,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,554,555,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,641,642,643,653,657,671,672,674,677,679,689,690,691,692,694,695,701,709,710,721,724,726,727,729,730,731,732,734,735,738,739,740,743,744,745,747,751,754,755,760,763,764,767,769,773,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,378,378,-154,-155,-265,-136,-223,-231,-82,-81,545,-75,-68,-67,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,378,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,378,-74,-66,-69,-70,-78,-76,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,378,-63,-52,-86,-83,378,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-62,-71,-72,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-54,-55,-56,-64,-65,-85,-86,-133,-119,-139,-57,-84,-106,-123,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'CHECK':([41,43,111,112,115,116,166,167,168,169,170,171,172,230,239,253,254,264,315,334,342,366,368,377,378,380,381,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,554,555,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,641,642,643,653,657,671,672,674,677,679,689,690,691,692,694,695,701,709,710,721,724,726,727,729,730,731,732,734,735,738,739,740,743,744,745,747,751,754,755,760,763,764,767,769,773,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,379,379,-154,-155,-265,-136,-223,-231,-82,-81,546,-75,-68,-67,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,379,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,379,-74,-66,-69,-70,-78,-76,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,379,-63,-52,-86,-83,379,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-62,-71,-72,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-54,-55,-56,-64,-65,-85,-86,-133,-119,-139,-57,-84,-106,-123,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'CONSTRAINT':([41,43,111,112,115,116,166,167,168,169,170,171,172,230,239,240,253,254,264,315,334,342,366,368,378,380,381,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,555,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,641,642,643,653,657,671,672,674,677,679,689,690,691,692,694,695,701,709,710,721,724,726,727,729,730,731,732,734,735,738,739,740,743,744,745,747,751,754,755,760,763,764,767,769,773,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,384,384,396,-154,-155,-265,-136,-223,-231,-82,-81,-75,-68,-67,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,384,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,384,-74,-66,-69,-70,-76,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,384,-63,-52,-86,-83,384,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-62,-71,-72,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-54,-55,-56,-64,-65,-85,-86,-133,-119,-139,-57,-84,-106,-123,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'PRIMARY':([41,43,111,112,115,116,166,167,168,169,170,171,172,230,239,253,254,264,315,334,342,366,368,377,378,380,381,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,554,555,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,641,642,643,653,657,671,672,674,677,679,689,690,691,692,694,695,701,709,710,721,724,726,727,729,730,731,732,734,735,738,739,740,743,744,745,747,751,754,755,760,763,764,767,769,773,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,385,385,-154,-155,-265,-136,-223,-231,-82,-81,548,-75,-68,-67,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,385,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,385,-74,-66,-69,-70,-78,-76,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,385,-63,-52,-86,-83,385,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-62,-71,-72,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-54,-55,-56,-64,-65,-85,-86,-133,-119,-139,-57,-84,-106,-123,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'FOREIGN':([41,43,111,112,115,116,166,167,168,169,170,171,172,230,239,253,254,264,315,334,342,366,368,377,378,380,381,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,527,528,529,530,531,532,533,535,539,540,541,542,544,545,547,552,553,554,555,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,641,642,643,653,657,671,672,674,677,679,689,690,691,692,694,695,701,709,710,721,724,726,727,729,730,731,732,734,735,738,739,740,743,744,745,747,751,754,755,760,763,764,767,769,773,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,386,386,-154,-155,-265,-136,-223,-231,-82,-81,549,-75,-68,-67,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,386,-46,-47,-48,-49,-50,-51,-53,-58,-59,-60,-61,386,-74,-66,-69,-70,-78,-76,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,386,-63,-52,-86,-83,386,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-62,-71,-72,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-54,-55,-56,-64,-65,-85,-86,-133,-119,-139,-57,-84,-106,-123,-138,-77,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'GROUP':([41,43,111,112,115,116,166,167,168,169,170,171,172,253,254,264,315,334,342,366,368,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,672,674,677,679,689,690,691,692,694,695,721,724,726,727,729,730,731,732,734,735,751,754,755,764,767,769,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-154,-155,-265,-136,-223,-231,-82,-81,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,673,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-133,-119,-139,-106,-123,-138,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'ORDER':([41,43,111,112,115,116,166,167,168,169,170,171,172,253,254,264,315,334,342,366,368,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,672,674,677,679,689,690,691,692,694,695,721,724,726,727,729,730,731,732,734,735,751,754,755,764,767,769,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-154,-155,-265,-136,-223,-231,-82,-81,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,722,-117,-142,-143,-215,-219,-222,-224,-238,-239,-124,-140,-141,-144,-166,-170,-173,-175,-189,-190,-133,-119,-139,-106,-123,-138,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'HAVING':([41,43,111,112,115,116,166,167,168,169,170,171,172,253,254,264,315,334,342,366,368,399,401,402,403,407,410,411,412,413,414,415,416,417,418,419,420,421,423,442,450,473,474,475,476,477,478,479,480,481,482,484,485,486,488,489,492,493,494,495,497,498,499,500,501,502,503,506,507,508,509,510,511,512,513,514,515,516,517,518,519,567,575,576,577,578,580,581,582,583,584,585,586,587,588,589,591,592,593,595,596,599,600,601,602,604,605,606,607,608,609,610,613,614,615,616,617,618,619,620,621,622,623,624,625,626,637,672,674,677,679,689,690,691,692,694,695,721,724,726,727,729,730,731,732,734,735,751,754,755,764,767,769,774,775,776,777,778,779,781,782,784,785,786,],[-109,-137,-111,-135,-266,-270,-254,-268,-269,-271,-107,-267,-108,-154,-155,-265,-136,-223,-231,-82,-81,-118,-110,-255,-134,-263,-150,-151,-152,-153,-256,-257,-258,-259,-260,-261,-262,-264,-145,-174,-182,-205,-206,-207,-208,-209,-210,-211,-212,-213,-214,-216,-217,-218,-220,-221,-225,-226,-227,-228,-230,-232,-233,-234,-235,-236,-237,-240,-241,-242,-243,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-120,-146,-147,-148,-149,-156,-157,-158,-159,-160,-161,-162,-163,-164,-165,-167,-168,-169,-171,-172,-176,-177,-178,-179,-181,-183,-184,-185,-186,-187,-188,-191,-192,-193,-194,-195,-196,-197,-198,-199,-200,-201,-202,-203,-204,-80,-122,-117,-142,-143,-215,-219,-222,-224,-238,-239,752,-140,-141,-144,-166,-170,-173,-175,-189,-190,-133,-119,-139,-106,-123,-138,-130,-131,-132,-129,-125,-126,-229,-121,-180,-127,-128,]),'VALUES':([94,522,],[223,636,]),'UNION':([95,],[225,]),'RENAME':([102,103,392,],[234,241,241,]),'OWNER':([102,387,],[235,558,]),'ADD':([103,392,],[239,239,]),'EXISTS':([105,388,],[243,559,]),'PUNTO':([115,],[265,]),'TO':([234,235,241,],[389,390,398,]),'COLUMN':([236,239,240,],[391,394,397,]),'SYMMETRIC':([250,404,],[406,570,]),'TRUE':([252,409,],[411,576,]),'FALSE':([252,409,],[412,577,]),'UNKNOWN':([252,409,],[413,578,]),'ASC':([366,368,637,768,],[-82,-81,-80,778,]),'DESC':([366,368,637,768,],[-82,-81,-80,779,]),'SMALLINT':([372,564,670,],[528,528,528,]),'INTEGER':([372,564,670,],[529,529,529,]),'BIGINT':([372,564,670,],[530,530,530,]),'DECIMAL':([372,564,670,],[531,531,531,]),'NUMERIC':([372,564,670,],[532,532,532,]),'REAL':([372,564,670,],[533,533,533,]),'DOUBLE':([372,564,670,],[534,534,534,]),'MONEY':([372,564,670,],[535,535,535,]),'VARCHAR':([372,564,670,],[536,536,536,]),'CHAR':([372,564,670,],[537,537,537,]),'CHARACTER':([372,564,670,],[538,538,538,]),'TEXT':([372,564,670,],[539,539,539,]),'DATE':([372,564,670,],[540,540,540,]),'TIMESTAMP':([372,564,670,],[541,541,541,]),'TIME':([372,564,670,],[542,542,542,]),'KEY':([385,386,548,549,],[555,556,653,654,]),'MODE':([387,557,715,],[-24,662,-23,]),'LLAVE_ABRE':([390,],[561,]),'PRECISION':([534,],[643,]),'VARYING':([538,],[647,]),'INHERITS':([543,],[649,]),'REFERENCES':([556,654,660,745,],[659,-86,713,-85,]),'CURRENT_USER':([561,],[666,]),'SESSION_USER':([561,],[667,]),'TYPE':([562,],[670,]),'LLAVE_CIERRA':([664,665,666,667,],[716,-33,-34,-35,]),'BY':([673,722,],[723,753,]),'ALL':([765,],[775,]),'NULLS':([777,778,779,],[783,-125,-126,]),'LAST':([783,],[785,]),'FIRST':([783,],[786,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'init':([0,],[1,]),'instrucciones':([0,],[2,]),'instruccion':([0,2,],[3,19,]),'crear_statement':([0,2,],[4,4,]),'alter_statement':([0,2,],[5,5,]),'drop_statement':([0,2,],[6,6,]),'seleccionar':([0,2,11,38,39,40,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,369,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[7,7,27,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,524,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,]),'union':([0,2,],[8,8,]),'or_replace':([15,],[32,]),'distinto':([18,],[38,]),'list_expression_f':([18,],[41,]),'expression_f':([18,173,],[43,315,]),'if_exists':([36,],[104,]),'select_list':([38,],[107,]),'expressiones':([38,39,40,752,],[109,170,172,767,]),'list_expression':([38,39,40,110,752,],[111,111,111,246,111,]),'expression':([38,39,40,110,114,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,227,245,248,250,251,255,256,257,258,259,260,261,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,365,370,382,404,406,483,487,490,491,496,504,505,551,568,570,571,573,579,590,594,597,598,603,611,612,635,640,652,675,678,680,693,698,718,725,728,733,752,758,770,],[112,112,112,247,264,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,335,336,337,338,339,340,341,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,371,400,403,405,407,414,415,416,417,418,419,420,421,422,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,443,444,445,446,447,448,449,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,521,525,552,569,572,627,628,629,630,631,632,633,656,674,676,677,679,681,682,683,684,685,686,687,688,697,700,708,724,726,727,736,521,750,755,756,757,112,771,780,]),'if_not_exists':([100,],[231,]),'rename_owner':([102,],[233,]),'alter_list':([103,],[237,]),'alter_op':([103,392,],[238,563,]),'list_id':([224,244,550,651,658,723,753,],[367,399,655,707,711,754,768,]),'alias':([224,244,523,550,651,658,723,753,],[368,368,637,368,368,368,368,368,]),'contenido_tabla':([230,],[373,]),'manejo_tabla':([230,544,],[374,650,]),'declaracion_columna':([230,544,],[375,375,]),'condition_column':([230,239,527,544,641,671,],[376,393,642,376,701,720,]),'constraint':([230,239,527,544,641,671,],[377,377,377,377,377,377,]),'key_table':([230,239,377,527,544,641,671,],[380,380,547,380,380,380,380,]),'key_table_row':([230,239,527,544,641,671,],[381,381,381,381,381,381,]),'alter_drop':([240,],[395,]),'list_val':([365,698,],[520,737,]),'type_column':([372,564,670,],[527,671,719,]),'owner_':([387,],[557,]),'donde':([399,],[567,]),'where':([525,],[639,]),'condition_column_row':([527,],[641,]),'inherits_statement':([543,],[648,]),'list_key':([555,556,653,654,747,],[657,660,657,660,763,]),'mode_':([557,],[661,]),'ow_op':([561,],[664,]),'alter_col_op':([562,],[668,]),'group_by':([567,],[672,]),'order_by':([672,],[721,]),'group_having':([721,],[751,]),'limite':([751,],[764,]),'asc_desc':([768,],[777,]),'nulls_f_l':([777,],[782,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> init","S'",1,None,None,None), ('init -> instrucciones','init',1,'p_init','sql_grammar.py',366), ('instrucciones -> instrucciones instruccion','instrucciones',2,'p_instrucciones_lista','sql_grammar.py',371), ('instrucciones -> instruccion','instrucciones',1,'p_instrucciones_instruccion','sql_grammar.py',377), ('instruccion -> crear_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',382), ('instruccion -> alter_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',383), ('instruccion -> drop_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',384), ('instruccion -> seleccionar PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',385), ('instruccion -> union PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',386), ('instruccion -> SHOW DATABASES PUNTOCOMA','instruccion',3,'p_aux_instruccion','sql_grammar.py',391), ('instruccion -> INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',392), ('instruccion -> INSERT INTO ID PAR_ABRE list_id PAR_CIERRA VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA','instruccion',11,'p_aux_instruccion','sql_grammar.py',393), ('instruccion -> UPDATE ID SET ID IGUAL expression where PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',394), ('instruccion -> DELETE FROM ID WHERE expression PUNTOCOMA','instruccion',6,'p_aux_instruccion','sql_grammar.py',395), ('instruccion -> DELETE FROM ID PUNTOCOMA','instruccion',4,'p_aux_instruccion','sql_grammar.py',396), ('instruccion -> USE DATABASE ID PUNTOCOMA','instruccion',4,'p_aux_instruccion','sql_grammar.py',397), ('union -> PAR_ABRE seleccionar PAR_CIERRA UNION PAR_ABRE seleccionar PAR_CIERRA','union',7,'p_union','sql_grammar.py',425), ('crear_statement -> CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statement','crear_statement',7,'p_crear_statement_tbl','sql_grammar.py',435), ('crear_statement -> CREATE or_replace DATABASE if_not_exists ID owner_ mode_','crear_statement',7,'p_crear_statement_db','sql_grammar.py',442), ('or_replace -> OR REPLACE','or_replace',2,'p_or_replace_db','sql_grammar.py',449), ('or_replace -> <empty>','or_replace',0,'p_or_replace_db','sql_grammar.py',450), ('if_not_exists -> IF NOT EXISTS','if_not_exists',3,'p_if_not_exists_db','sql_grammar.py',459), ('if_not_exists -> <empty>','if_not_exists',0,'p_if_not_exists_db','sql_grammar.py',460), ('owner_ -> OWNER IGUAL ID','owner_',3,'p_owner_db','sql_grammar.py',469), ('owner_ -> <empty>','owner_',0,'p_owner_db','sql_grammar.py',470), ('mode_ -> MODE IGUAL ENTERO','mode_',3,'p_mode_db','sql_grammar.py',481), ('mode_ -> <empty>','mode_',0,'p_mode_db','sql_grammar.py',482), ('alter_statement -> ALTER DATABASE ID rename_owner','alter_statement',4,'p_alter_db','sql_grammar.py',493), ('alter_statement -> ALTER TABLE ID alter_list','alter_statement',4,'p_alter_tbl','sql_grammar.py',500), ('alter_list -> alter_list COMA alter_op','alter_list',3,'p_lista_alter','sql_grammar.py',507), ('alter_list -> alter_op','alter_list',1,'p_aux_lista_alter','sql_grammar.py',513), ('rename_owner -> RENAME TO ID','rename_owner',3,'p_rename_owner_db','sql_grammar.py',518), ('rename_owner -> OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRA','rename_owner',5,'p_rename_owner_db','sql_grammar.py',519), ('ow_op -> ID','ow_op',1,'p_ow_op_db','sql_grammar.py',530), ('ow_op -> CURRENT_USER','ow_op',1,'p_ow_op_db','sql_grammar.py',531), ('ow_op -> SESSION_USER','ow_op',1,'p_ow_op_db','sql_grammar.py',532), ('drop_statement -> DROP DATABASE if_exists ID','drop_statement',4,'p_drop_db','sql_grammar.py',537), ('drop_statement -> DROP TABLE ID','drop_statement',3,'p_drop_tbl','sql_grammar.py',547), ('if_exists -> IF EXISTS','if_exists',2,'p_if_exists_db','sql_grammar.py',554), ('if_exists -> <empty>','if_exists',0,'p_if_exists_db','sql_grammar.py',555), ('contenido_tabla -> contenido_tabla COMA manejo_tabla','contenido_tabla',3,'p_contenido_tabla','sql_grammar.py',563), ('contenido_tabla -> manejo_tabla','contenido_tabla',1,'p_aux_contenido_table','sql_grammar.py',569), ('manejo_tabla -> declaracion_columna','manejo_tabla',1,'p_manejo_tabla','sql_grammar.py',574), ('manejo_tabla -> condition_column','manejo_tabla',1,'p_manejo_tabla','sql_grammar.py',575), ('declaracion_columna -> ID type_column condition_column_row','declaracion_columna',3,'p_aux_declaracion_columna','sql_grammar.py',580), ('declaracion_columna -> ID type_column','declaracion_columna',2,'p_declaracion_columna','sql_grammar.py',587), ('type_column -> SMALLINT','type_column',1,'p_type_column','sql_grammar.py',594), ('type_column -> INTEGER','type_column',1,'p_type_column','sql_grammar.py',595), ('type_column -> BIGINT','type_column',1,'p_type_column','sql_grammar.py',596), ('type_column -> DECIMAL','type_column',1,'p_type_column','sql_grammar.py',597), ('type_column -> NUMERIC','type_column',1,'p_type_column','sql_grammar.py',598), ('type_column -> REAL','type_column',1,'p_type_column','sql_grammar.py',599), ('type_column -> DOUBLE PRECISION','type_column',2,'p_type_column','sql_grammar.py',600), ('type_column -> MONEY','type_column',1,'p_type_column','sql_grammar.py',601), ('type_column -> VARCHAR PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',602), ('type_column -> CHAR PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',603), ('type_column -> CHARACTER PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',604), ('type_column -> CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA','type_column',5,'p_type_column','sql_grammar.py',605), ('type_column -> TEXT','type_column',1,'p_type_column','sql_grammar.py',606), ('type_column -> DATE','type_column',1,'p_type_column','sql_grammar.py',607), ('type_column -> TIMESTAMP','type_column',1,'p_type_column','sql_grammar.py',608), ('type_column -> TIME','type_column',1,'p_type_column','sql_grammar.py',609), ('condition_column_row -> condition_column_row condition_column','condition_column_row',2,'p_condition_column_row','sql_grammar.py',643), ('condition_column_row -> condition_column','condition_column_row',1,'p_aux_condition_column_row','sql_grammar.py',649), ('condition_column -> constraint UNIQUE PAR_ABRE list_id PAR_CIERRA','condition_column',5,'p_condition_column','sql_grammar.py',654), ('condition_column -> constraint CHECK PAR_ABRE expression PAR_CIERRA','condition_column',5,'p_condition_column','sql_grammar.py',655), ('condition_column -> constraint key_table','condition_column',2,'p_condition_column','sql_grammar.py',656), ('condition_column -> key_table_row','condition_column',1,'p_aux_condition_key_table','sql_grammar.py',670), ('condition_column -> key_table','condition_column',1,'p_aux_condition_key_table','sql_grammar.py',671), ('condition_column -> DEFAULT expression','condition_column',2,'p_aux_condition_column','sql_grammar.py',676), ('condition_column -> NOT NULL','condition_column',2,'p_aux_condition_column','sql_grammar.py',677), ('condition_column -> UNIQUE PAR_ABRE list_id PAR_CIERRA','condition_column',4,'p_aux_condition_column','sql_grammar.py',678), ('condition_column -> CHECK PAR_ABRE expression PAR_CIERRA','condition_column',4,'p_aux_condition_column','sql_grammar.py',679), ('condition_column -> <empty>','condition_column',0,'p_aux_condition_column','sql_grammar.py',680), ('condition_column -> constraint UNIQUE','condition_column',2,'p_condition_unique','sql_grammar.py',700), ('condition_column -> UNIQUE','condition_column',1,'p_condition_unique','sql_grammar.py',701), ('key_table_row -> PRIMARY KEY','key_table_row',2,'p_key_table_row','sql_grammar.py',712), ('key_table_row -> FOREIGN KEY REFERENCES ID PAR_ABRE ID PAR_CIERRA','key_table_row',7,'p_key_table_row','sql_grammar.py',713), ('constraint -> CONSTRAINT ID','constraint',2,'p_constraint','sql_grammar.py',726), ('constraint -> <empty>','constraint',0,'p_constraint','sql_grammar.py',727), ('list_id -> list_id COMA alias','list_id',3,'p_list_id','sql_grammar.py',737), ('list_id -> alias','list_id',1,'p_aux_list_id','sql_grammar.py',743), ('alias -> ID','alias',1,'p_alias','sql_grammar.py',748), ('key_table -> PRIMARY KEY list_key','key_table',3,'p_key_table','sql_grammar.py',753), ('key_table -> FOREIGN KEY list_key REFERENCES ID list_key','key_table',6,'p_key_table','sql_grammar.py',754), ('list_key -> PAR_ABRE list_id PAR_CIERRA','list_key',3,'p_list_key','sql_grammar.py',765), ('list_key -> <empty>','list_key',0,'p_list_key','sql_grammar.py',766), ('alter_op -> ADD condition_column','alter_op',2,'p_alter_op','sql_grammar.py',774), ('alter_op -> ALTER COLUMN ID alter_col_op','alter_op',4,'p_alter_op','sql_grammar.py',775), ('alter_op -> DROP alter_drop ID','alter_op',3,'p_alter_op','sql_grammar.py',776), ('alter_op -> RENAME TO ID','alter_op',3,'p_alter_op','sql_grammar.py',777), ('alter_op -> ADD COLUMN ID type_column condition_column','alter_op',5,'p_alter_op_add_col','sql_grammar.py',797), ('alter_drop -> CONSTRAINT','alter_drop',1,'p_aux_alter_op','sql_grammar.py',804), ('alter_drop -> COLUMN','alter_drop',1,'p_aux_alter_op','sql_grammar.py',805), ('op_add -> CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA','op_add',6,'p_op_add','sql_grammar.py',810), ('op_add -> CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA','op_add',6,'p_op_add','sql_grammar.py',811), ('op_add -> key_table REFERENCES PAR_ABRE list_id PAR_CIERRA','op_add',5,'p_op_add','sql_grammar.py',812), ('alter_col_op -> SET NOT NULL','alter_col_op',3,'p_alter_col_op','sql_grammar.py',826), ('alter_col_op -> SET DEFAULT expression','alter_col_op',3,'p_alter_col_op','sql_grammar.py',827), ('alter_col_op -> TYPE type_column','alter_col_op',2,'p_alter_col_op','sql_grammar.py',828), ('inherits_statement -> INHERITS PAR_ABRE ID PAR_CIERRA','inherits_statement',4,'p_inherits_tbl','sql_grammar.py',842), ('inherits_statement -> <empty>','inherits_statement',0,'p_inherits_tbl','sql_grammar.py',843), ('list_val -> list_val COMA expression','list_val',3,'p_list_val','sql_grammar.py',853), ('list_val -> expression','list_val',1,'p_aux_list_val','sql_grammar.py',859), ('where -> WHERE expression','where',2,'p_where','sql_grammar.py',864), ('where -> <empty>','where',0,'p_where','sql_grammar.py',865), ('seleccionar -> SELECT distinto select_list FROM list_id donde group_by order_by group_having limite','seleccionar',10,'p_seleccionar','sql_grammar.py',876), ('seleccionar -> SELECT GREATEST expressiones','seleccionar',3,'p_aux_seleccionar','sql_grammar.py',886), ('seleccionar -> SELECT LEAST expressiones','seleccionar',3,'p_aux_seleccionar','sql_grammar.py',887), ('seleccionar -> SELECT list_expression_f','seleccionar',2,'p_seleccionar_funciones','sql_grammar.py',893), ('expressiones -> PAR_ABRE list_expression PAR_CIERRA','expressiones',3,'p_expressiones','sql_grammar.py',903), ('expressiones -> list_expression','expressiones',1,'p_aux_expressiones','sql_grammar.py',908), ('distinto -> DISTINCT','distinto',1,'p_distinto','sql_grammar.py',913), ('distinto -> <empty>','distinto',0,'p_distinto','sql_grammar.py',914), ('select_list -> ASTERISCO','select_list',1,'p_select_list','sql_grammar.py',922), ('select_list -> expressiones','select_list',1,'p_select_list','sql_grammar.py',923), ('table_expression -> expressiones','table_expression',1,'p_table_expression','sql_grammar.py',928), ('donde -> WHERE expression','donde',2,'p_donde','sql_grammar.py',933), ('donde -> <empty>','donde',0,'p_donde','sql_grammar.py',934), ('group_by -> GROUP BY list_id','group_by',3,'p_group_by','sql_grammar.py',944), ('group_by -> <empty>','group_by',0,'p_group_by','sql_grammar.py',945), ('order_by -> ORDER BY list_id asc_desc nulls_f_l','order_by',5,'p_order_by','sql_grammar.py',956), ('order_by -> <empty>','order_by',0,'p_order_by','sql_grammar.py',957), ('group_having -> HAVING expressiones','group_having',2,'p_group_having','sql_grammar.py',967), ('group_having -> <empty>','group_having',0,'p_group_having','sql_grammar.py',968), ('asc_desc -> ASC','asc_desc',1,'p_asc_desc','sql_grammar.py',978), ('asc_desc -> DESC','asc_desc',1,'p_asc_desc','sql_grammar.py',979), ('nulls_f_l -> NULLS LAST','nulls_f_l',2,'p_nulls_f_l','sql_grammar.py',984), ('nulls_f_l -> NULLS FIRST','nulls_f_l',2,'p_nulls_f_l','sql_grammar.py',985), ('nulls_f_l -> <empty>','nulls_f_l',0,'p_nulls_f_l','sql_grammar.py',986), ('limite -> LIMIT ENTERO','limite',2,'p_limite','sql_grammar.py',994), ('limite -> LIMIT ALL','limite',2,'p_limite','sql_grammar.py',995), ('limite -> OFFSET ENTERO','limite',2,'p_limite','sql_grammar.py',996), ('limite -> <empty>','limite',0,'p_limite','sql_grammar.py',997), ('list_expression -> list_expression COMA expression','list_expression',3,'p_list_expression','sql_grammar.py',1007), ('list_expression -> expression','list_expression',1,'p_aux_list_expression','sql_grammar.py',1013), ('list_expression_f -> list_expression_f COMA expression_f','list_expression_f',3,'p_list_expression_f','sql_grammar.py',1017), ('list_expression_f -> expression_f','list_expression_f',1,'p_aux_list_expression_f','sql_grammar.py',1023), ('expression -> SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRA','expression',8,'p_expression','sql_grammar.py',1028), ('expression -> expression NOT BETWEEN SYMMETRIC expression AND expression','expression',7,'p_expression_between3','sql_grammar.py',1038), ('expression -> expression NOT BETWEEN expression AND expression','expression',6,'p_expression_between2','sql_grammar.py',1049), ('expression -> expression BETWEEN SYMMETRIC expression AND expression','expression',6,'p_expression_between2','sql_grammar.py',1050), ('expression -> expression BETWEEN expression AND expression','expression',5,'p_expression_between','sql_grammar.py',1060), ('expression -> expression IS DISTINCT FROM expression','expression',5,'p_expression_Distinct','sql_grammar.py',1071), ('expression -> expression IS NOT DISTINCT FROM expression','expression',6,'p_expression_not_Distinct','sql_grammar.py',1081), ('expression -> ID PUNTO ID','expression',3,'p_expression_puntoId','sql_grammar.py',1092), ('expression -> expression IS NOT NULL','expression',4,'p_expression_null3','sql_grammar.py',1102), ('expression -> expression IS NOT TRUE','expression',4,'p_expression_null3','sql_grammar.py',1103), ('expression -> expression IS NOT FALSE','expression',4,'p_expression_null3','sql_grammar.py',1104), ('expression -> expression IS NOT UNKNOWN','expression',4,'p_expression_null3','sql_grammar.py',1105), ('expression -> expression IS NULL','expression',3,'p_expression_null2','sql_grammar.py',1115), ('expression -> expression IS TRUE','expression',3,'p_expression_null2','sql_grammar.py',1116), ('expression -> expression IS FALSE','expression',3,'p_expression_null2','sql_grammar.py',1117), ('expression -> expression IS UNKNOWN','expression',3,'p_expression_null2','sql_grammar.py',1118), ('expression -> expression ISNULL','expression',2,'p_expression_null','sql_grammar.py',1128), ('expression -> expression NOTNULL','expression',2,'p_expression_null','sql_grammar.py',1129), ('expression -> SUM PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1139), ('expression -> COUNT PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1140), ('expression -> AVG PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1141), ('expression -> MAX PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1142), ('expression -> MIN PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1143), ('expression -> ABS PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1144), ('expression -> CBRT PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1145), ('expression -> CEIL PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1146), ('expression -> CEILING PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1147), ('expression -> DEGREES PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1148), ('expression -> DIV PAR_ABRE expression COMA expression PAR_CIERRA','expression',6,'p_expression_agrupar','sql_grammar.py',1149), ('expression -> EXP PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1150), ('expression -> FACTORIAL PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1151), ('expression -> FLOOR PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1152), ('expression -> GCD PAR_ABRE expression COMA expression PAR_CIERRA','expression',6,'p_expression_agrupar','sql_grammar.py',1153), ('expression -> LN PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1154), ('expression -> LOG PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1155), ('expression -> MOD PAR_ABRE expression COMA expression PAR_CIERRA','expression',6,'p_expression_agrupar','sql_grammar.py',1156), ('expression -> PI PAR_ABRE PAR_CIERRA','expression',3,'p_expression_agrupar','sql_grammar.py',1157), ('expression -> POWER PAR_ABRE expression COMA expression PAR_CIERRA','expression',6,'p_expression_agrupar','sql_grammar.py',1158), ('expression -> RADIANS PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1159), ('expression -> ROUND PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1160), ('expression -> SIGN PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1161), ('expression -> SQRT PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1162), ('expression -> WIDTH_BUCKET PAR_ABRE expression COMA expression COMA expression COMA expression PAR_CIERRA','expression',10,'p_expression_agrupar','sql_grammar.py',1163), ('expression -> TRUNC PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_agrupar','sql_grammar.py',1164), ('expression -> RANDOM PAR_ABRE PAR_CIERRA','expression',3,'p_expression_agrupar','sql_grammar.py',1165), ('expression -> ACOS PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1180), ('expression -> ACOSD PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1181), ('expression -> ASIN PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1182), ('expression -> ASIND PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1183), ('expression -> ATAN PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1184), ('expression -> ATAND PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1185), ('expression -> ATAN2 PAR_ABRE expression COMA expression PAR_CIERRA','expression',6,'p_expression_trigonometric','sql_grammar.py',1186), ('expression -> ATAN2D PAR_ABRE expression COMA expression PAR_CIERRA','expression',6,'p_expression_trigonometric','sql_grammar.py',1187), ('expression -> COS PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1188), ('expression -> COSD PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1189), ('expression -> COT PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1190), ('expression -> COTD PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1191), ('expression -> SIN PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1192), ('expression -> SIND PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1193), ('expression -> TAN PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1194), ('expression -> TAND PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1195), ('expression -> SINH PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1196), ('expression -> COSH PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1197), ('expression -> TANH PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1198), ('expression -> ASINH PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1199), ('expression -> ACOSH PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1200), ('expression -> ATANH PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression_trigonometric','sql_grammar.py',1201), ('expression_f -> SUM PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1214), ('expression_f -> COUNT PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1215), ('expression_f -> AVG PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1216), ('expression_f -> MAX PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1217), ('expression_f -> MIN PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1218), ('expression_f -> ABS PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1219), ('expression_f -> CBRT PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1220), ('expression_f -> CEIL PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1221), ('expression_f -> CEILING PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1222), ('expression_f -> DEGREES PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1223), ('expression_f -> DIV PAR_ABRE expression COMA expression PAR_CIERRA','expression_f',6,'p_expression_agrupar_f','sql_grammar.py',1224), ('expression_f -> EXP PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1225), ('expression_f -> FACTORIAL PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1226), ('expression_f -> FLOOR PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1227), ('expression_f -> GCD PAR_ABRE expression COMA expression PAR_CIERRA','expression_f',6,'p_expression_agrupar_f','sql_grammar.py',1228), ('expression_f -> LN PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1229), ('expression_f -> LOG PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1230), ('expression_f -> MOD PAR_ABRE expression COMA expression PAR_CIERRA','expression_f',6,'p_expression_agrupar_f','sql_grammar.py',1231), ('expression_f -> PI PAR_ABRE PAR_CIERRA','expression_f',3,'p_expression_agrupar_f','sql_grammar.py',1232), ('expression_f -> POWER PAR_ABRE expression COMA expression PAR_CIERRA','expression_f',6,'p_expression_agrupar_f','sql_grammar.py',1233), ('expression_f -> RADIANS PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1234), ('expression_f -> ROUND PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1235), ('expression_f -> SIGN PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1236), ('expression_f -> SQRT PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1237), ('expression_f -> WIDTH_BUCKET PAR_ABRE expression COMA expression COMA expression COMA expression PAR_CIERRA','expression_f',10,'p_expression_agrupar_f','sql_grammar.py',1238), ('expression_f -> TRUNC PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_agrupar_f','sql_grammar.py',1239), ('expression_f -> RANDOM PAR_ABRE PAR_CIERRA','expression_f',3,'p_expression_agrupar_f','sql_grammar.py',1240), ('expression_f -> ACOS PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1255), ('expression_f -> ACOSD PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1256), ('expression_f -> ASIN PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1257), ('expression_f -> ASIND PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1258), ('expression_f -> ATAN PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1259), ('expression_f -> ATAND PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1260), ('expression_f -> ATAN2 PAR_ABRE expression COMA expression PAR_CIERRA','expression_f',6,'p_expression_trigonometric_f','sql_grammar.py',1261), ('expression_f -> ATAN2D PAR_ABRE expression COMA expression PAR_CIERRA','expression_f',6,'p_expression_trigonometric_f','sql_grammar.py',1262), ('expression_f -> COS PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1263), ('expression_f -> COSD PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1264), ('expression_f -> COT PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1265), ('expression_f -> COTD PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1266), ('expression_f -> SIN PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1267), ('expression_f -> SIND PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1268), ('expression_f -> TAN PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1269), ('expression_f -> TAND PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1270), ('expression_f -> SINH PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1271), ('expression_f -> COSH PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1272), ('expression_f -> TANH PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1273), ('expression_f -> ASINH PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1274), ('expression_f -> ACOSH PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1275), ('expression_f -> ATANH PAR_ABRE expression PAR_CIERRA','expression_f',4,'p_expression_trigonometric_f','sql_grammar.py',1276), ('expression -> seleccionar','expression',1,'p_expression_select','sql_grammar.py',1289), ('expression -> PAR_ABRE expression PAR_CIERRA','expression',3,'p_expression_ss','sql_grammar.py',1294), ('expression -> expression MAYOR expression','expression',3,'p_expression_relacional_aux_mayor','sql_grammar.py',1299), ('expression -> expression MENOR expression','expression',3,'p_expression_relacional_aux_menor','sql_grammar.py',1306), ('expression -> expression MAYOR_IGUAL expression','expression',3,'p_expression_relacional_aux_mayorigual','sql_grammar.py',1313), ('expression -> expression MENOR_IGUAL expression','expression',3,'p_expression_relacional_aux_menorigual','sql_grammar.py',1320), ('expression -> expression IGUAL expression','expression',3,'p_expression_relacional_aux_igual','sql_grammar.py',1327), ('expression -> expression NO_IGUAL expression','expression',3,'p_expression_relacional_aux_noigual','sql_grammar.py',1334), ('expression -> expression DIFERENTE expression','expression',3,'p_expression_relacional_aux_diferente','sql_grammar.py',1341), ('expression -> expression AND expression','expression',3,'p_expression_logica_and__and','sql_grammar.py',1348), ('expression -> expression OR expression','expression',3,'p_expression_logica_or','sql_grammar.py',1355), ('expression -> NOT expression','expression',2,'p_expression_logica_not','sql_grammar.py',1362), ('expression -> ID','expression',1,'p_solouno_expression','sql_grammar.py',1369), ('expression -> ASTERISCO','expression',1,'p_solouno_expression','sql_grammar.py',1370), ('expression -> ENTERO','expression',1,'p_expression_entero','sql_grammar.py',1381), ('expression -> DECIMAL_NUM','expression',1,'p_expression_decimal','sql_grammar.py',1394), ('expression -> NULL','expression',1,'p_expression_nulo','sql_grammar.py',1416), ('expression -> CADENA','expression',1,'p_expression_cadena','sql_grammar.py',1423), ]
634.562914
142,975
0.71287
41,380
191,638
3.251087
0.031464
0.020144
0.024173
0.024679
0.860425
0.845573
0.824872
0.803821
0.790173
0.774861
0
0.564423
0.034623
191,638
301
142,976
636.671096
0.162754
0.000438
0
0.006873
1
0.003436
0.202429
0.018778
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
11
8801b06d4d0e9fe62b4b039bcb08fcaca2501011
5,321
py
Python
dreamplace/ops/dct/dct2_fft2.py
choltz95/DREAMPlace
195e176d9640d74949201d4a0aa7c040c00ac7d8
[ "BSD-3-Clause" ]
1
2019-09-26T06:07:39.000Z
2019-09-26T06:07:39.000Z
dreamplace/ops/dct/dct2_fft2.py
HecatePhy/DREAMPlace
fd3fec54bdafddb9c80909d3768ddbae9256c118
[ "BSD-3-Clause" ]
null
null
null
dreamplace/ops/dct/dct2_fft2.py
HecatePhy/DREAMPlace
fd3fec54bdafddb9c80909d3768ddbae9256c118
[ "BSD-3-Clause" ]
1
2019-10-22T23:42:50.000Z
2019-10-22T23:42:50.000Z
## # @file dct2_fft2.py # @author Zixuan Jiang, Jiaqi Gu # @date Jun 2018 # @brief Implement 2d dct, 2d idct, idxst(idct(x)), idct(idxst(x)) based on 2d fft # import numpy as np import torch from torch.autograd import Function from torch import nn from dreamplace.ops.dct.discrete_spectral_transform import get_exact_expk as precompute_expk import dreamplace.ops.dct.dct2_fft2_cpp as dct2_fft2_cpp try: import dreamplace.ops.dct.dct2_fft2_cuda as dct2_fft2_cuda except: pass class DCT2Function(Function): @staticmethod def forward(ctx, x, expkM, expkN, out, buf): if x.is_cuda: dct2_fft2_cuda.dct2_fft2(x, expkM, expkN, out, buf) else: dct2_fft2_cpp.dct2_fft2(x, expkM, expkN, out, buf, torch.get_num_threads()) return out class DCT2(nn.Module): def __init__(self, expkM=None, expkN=None): super(DCT2, self).__init__() self.expkM = expkM self.expkN = expkN self.out = None self.buf = None def forward(self, x): M = x.size(-2) N = x.size(-1) if self.expkM is None or self.expkM.size(-2) != M or self.expkM.dtype != x.dtype: self.expkM = precompute_expk(M, dtype=x.dtype, device=x.device) if self.expkN is None or self.expkN.size(-2) != N or self.expkN.dtype != x.dtype: self.expkN = precompute_expk(N, dtype=x.dtype, device=x.device) if self.out is None: self.out = torch.empty(M, N, dtype=x.dtype, device=x.device) self.buf = torch.empty(M, N // 2 + 1, 2, dtype=x.dtype, device=x.device) return DCT2Function.apply(x, self.expkM, self.expkN, self.out, self.buf) class IDCT2Function(Function): @staticmethod def forward(ctx, x, expkM, expkN, out, buf): if x.is_cuda: dct2_fft2_cuda.idct2_fft2(x, expkM, expkN, out, buf) else: dct2_fft2_cpp.idct2_fft2(x, expkM, expkN, out, buf, torch.get_num_threads()) return out class IDCT2(nn.Module): def __init__(self, expkM=None, expkN=None): super(IDCT2, self).__init__() self.expkM = expkM self.expkN = expkN self.out = None self.buf = None def forward(self, x): M = x.size(-2) N = x.size(-1) if self.expkM is None or self.expkM.size(-2) != M or self.expkM.dtype != x.dtype: self.expkM = precompute_expk(M, dtype=x.dtype, device=x.device) if self.expkN is None or self.expkN.size(-2) != N or self.expkN.dtype != x.dtype: self.expkN = precompute_expk(N, dtype=x.dtype, device=x.device) if self.out is None: self.out = torch.empty(M, N, dtype=x.dtype, device=x.device) self.buf = torch.empty(M, N // 2 + 1, 2, dtype=x.dtype, device=x.device) return IDCT2Function.apply(x, self.expkM, self.expkN, self.out, self.buf) class IDCT_IDXSTFunction(Function): @staticmethod def forward(ctx, x, expkM, expkN, out, buf): if x.is_cuda: dct2_fft2_cuda.idct_idxst(x, expkM, expkN, out, buf) else: dct2_fft2_cpp.idct_idxst(x, expkM, expkN, out, buf, torch.get_num_threads()) return out class IDCT_IDXST(nn.Module): def __init__(self, expkM=None, expkN=None): super(IDCT_IDXST, self).__init__() self.expkM = expkM self.expkN = expkN self.out = None self.buf = None def forward(self, x): M = x.size(-2) N = x.size(-1) if self.expkM is None or self.expkM.size(-2) != M or self.expkM.dtype != x.dtype: self.expkM = precompute_expk(M, dtype=x.dtype, device=x.device) if self.expkN is None or self.expkN.size(-2) != N or self.expkN.dtype != x.dtype: self.expkN = precompute_expk(N, dtype=x.dtype, device=x.device) if self.out is None: self.out = torch.empty(M, N, dtype=x.dtype, device=x.device) self.buf = torch.empty(M, N // 2 + 1, 2, dtype=x.dtype, device=x.device) return IDCT_IDXSTFunction.apply(x, self.expkM, self.expkN, self.out, self.buf) class IDXST_IDCTFunction(Function): @staticmethod def forward(ctx, x, expkM, expkN, out, buf): if x.is_cuda: dct2_fft2_cuda.idxst_idct(x, expkM, expkN, out, buf) else: dct2_fft2_cpp.idxst_idct(x, expkM, expkN, out, buf, torch.get_num_threads()) return out class IDXST_IDCT(nn.Module): def __init__(self, expkM=None, expkN=None): super(IDXST_IDCT, self).__init__() self.expkM = expkM self.expkN = expkN self.out = None self.buf = None def forward(self, x): M = x.size(-2) N = x.size(-1) if self.expkM is None or self.expkM.size(-2) != M or self.expkM.dtype != x.dtype: self.expkM = precompute_expk(M, dtype=x.dtype, device=x.device) if self.expkN is None or self.expkN.size(-2) != N or self.expkN.dtype != x.dtype: self.expkN = precompute_expk(N, dtype=x.dtype, device=x.device) if self.out is None: self.out = torch.empty(M, N, dtype=x.dtype, device=x.device) self.buf = torch.empty(M, N // 2 + 1, 2, dtype=x.dtype, device=x.device) return IDXST_IDCTFunction.apply(x, self.expkM, self.expkN, self.out, self.buf)
35.006579
92
0.615298
818
5,321
3.882641
0.0978
0.079345
0.083123
0.085642
0.847922
0.847922
0.82903
0.812028
0.812028
0.791877
0
0.019474
0.256907
5,321
151
93
35.238411
0.783763
0.02819
0
0.701754
0
0
0
0
0
0
0
0
0
1
0.105263
false
0.008772
0.061404
0
0.307018
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
718f018061f434c44140ed694a7513618bacb0c7
11,376
py
Python
pingdomexport/tests/load/test_checks_results_load.py
mattboston/pingdomexport
1cd7acbf813abee0b9a7865b9cd4a1e166d55c37
[ "MIT" ]
4
2018-01-25T09:18:38.000Z
2021-02-12T18:36:08.000Z
pingdomexport/tests/load/test_checks_results_load.py
mattboston/pingdomexport
1cd7acbf813abee0b9a7865b9cd4a1e166d55c37
[ "MIT" ]
1
2018-12-04T18:42:06.000Z
2021-05-25T14:03:32.000Z
pingdomexport/tests/load/test_checks_results_load.py
mattboston/pingdomexport
1cd7acbf813abee0b9a7865b9cd4a1e166d55c37
[ "MIT" ]
3
2019-04-30T11:52:14.000Z
2021-03-24T20:58:04.000Z
from unittest.mock import MagicMock, Mock, call from pingdomexport.load import checks_results_load from pingdomexport import configuration class TestLoad: def test_output_load(self, capsys): config = configuration.Load('output', {}) pingdom = Mock() pingdom.check_results.side_effect = [ { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376174 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376175 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376176 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376177 } ] } ] checks_results_load.Load(config, pingdom).load( [ { "id": 2057736, "created": 1458372620 }, { "id": 2057737, "created": 1458372620 } ], c_to=1458372620 + 3600 * 2 ) assert 4 == pingdom.check_results.call_count out = capsys.readouterr() assert len(out) == 2 assert 'Check ID,Time,Probe ID,Status,Status description,Status long description,Response time\r\n2057736,1458376174,50,up,OK,OK,582\r\n2057736,1458376175,50,up,OK,OK,582\r\n2057737,1458376176,50,up,OK,OK,582\r\n2057737,1458376177,50,up,OK,OK,582\r\n' == out[0] assert '' == out[1] def test_output_load_results(self, capsys): config = configuration.Load('output', {}) pingdom = Mock() pingdom.check_results = MagicMock( return_value={ "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376174 }, { 'statusdesclong': 'OK', 'responsetime': 1420, 'probeid': 34, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376114 } ] } ) checks_results_load.Load(config, pingdom).results( { "id": 2057736, "created": 1458372620 }, c_to=1458372620 + 100 ) pingdom.check_results.assert_called_with(2057736, 1458372620, 1458372720) out = capsys.readouterr() assert len(out) == 2 assert '2057736,1458376174,50,up,OK,OK,582\r\n2057736,1458376114,34,up,OK,OK,1420\r\n' == out[0] assert '' == out[1] def test_output_load_results_with_from(self, capsys): config = configuration.Load('output', {}) created = 1458372620 pingdom = Mock() pingdom.check_results = MagicMock(return_value={"results": []}) checks_results_load.Load(config, pingdom).results( { "id": 2057736, "created": created }, created + 100, created + 1000 ) pingdom.check_results.assert_called_with(2057736, created + 100, created + 1000) def test_output_load_results_invalid_from(self): config = configuration.Load('output', {}) created = 1458372620 pingdom = Mock() pingdom.check_results = MagicMock(return_value={"results": []}) checks_results_load.Load(config, pingdom).results( { "id": 2057736, "created": created }, created - 100, created + 1000 ) pingdom.check_results.assert_called_with(2057736, created, created + 1000) def test_output_load_results_multi(self, capsys): config = configuration.Load('output', {}) pingdom = Mock() pingdom.check_results.side_effect = [ { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376174 }, { 'statusdesclong': 'OK', 'responsetime': 682, 'probeid': 51, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376184 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 1420, 'probeid': 34, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376114 } ] } ] checks_results_load.Load(config, pingdom).results( { "id": 2057736, "created": 1458372620 }, c_to=1458372620 + 3600 * 2 ) assert 2 == pingdom.check_results.call_count out = capsys.readouterr() assert len(out) == 2 assert '2057736,1458376174,50,up,OK,OK,582\r\n2057736,1458376184,51,up,OK,OK,682\r\n2057736,1458376114,34,up,OK,OK,1420\r\n' == out[0] assert '' == out[1] def test_mysql_load(self): config = Mock() db = Mock() config.is_type_db.return_value = True config.is_type_mysql.return_value = True config.db_connection.return_value = db pingdom = Mock() pingdom.check_results.side_effect = [ { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376174 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376175 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376176 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376177 } ] } ] checks_results_load.Load(config, pingdom).load( [ { "id": 2057736, "created": 1458372620 }, { "id": 2057737, "created": 1458372620 } ], c_to=1458372620 + 3600 * 2 ) assert 4 == db.query.call_count def test_posgres_load(self): config = Mock() db = Mock() query = Mock() query.all.return_value = [] db.query.return_value = query config.is_type_db.return_value = True config.is_type_mysql.return_value = False config.is_type_postgres.return_value = True config.db_connection.return_value = db pingdom = Mock() pingdom.check_results.side_effect = [ { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376174 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376175 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376176 } ] }, { "results": [ { 'statusdesclong': 'OK', 'responsetime': 582, 'probeid': 50, 'status': 'up', 'statusdesc': 'OK', 'time': 1458376177 } ] } ] checks_results_load.Load(config, pingdom).load( [ { "id": 2057736, "created": 1458372620 }, { "id": 2057737, "created": 1458372620 } ], c_to=1458372620 + 3600 * 2 ) assert 8 == db.query.call_count
32.135593
269
0.359265
736
11,376
5.425272
0.120924
0.068119
0.119209
0.085149
0.876033
0.870023
0.852742
0.814676
0.804408
0.799399
0
0.147706
0.536392
11,376
353
270
32.226629
0.609405
0
0
0.558209
0
0.008955
0.147328
0.030942
0
0
0
0
0.047761
1
0.020896
false
0
0.008955
0
0.032836
0
0
0
0
null
0
0
0
1
1
1
1
1
1
0
0
1
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
71a6e25e0dc16e1577c9120dafabe67596b28271
103
py
Python
packages/gtmapi/lmsrvlabbook/api/__init__.py
jjwatts/gigantum-client
88ce0475fb6880322bdd06d987c494e29064f278
[ "MIT" ]
60
2018-09-26T15:46:00.000Z
2021-10-10T02:37:14.000Z
packages/gtmapi/lmsrvlabbook/api/__init__.py
jjwatts/gigantum-client
88ce0475fb6880322bdd06d987c494e29064f278
[ "MIT" ]
1,706
2018-09-26T16:11:22.000Z
2021-08-20T13:37:59.000Z
packages/gtmapi/lmsrvlabbook/api/__init__.py
jjwatts/gigantum-client
88ce0475fb6880322bdd06d987c494e29064f278
[ "MIT" ]
11
2019-03-14T13:23:51.000Z
2022-01-25T01:29:16.000Z
from lmsrvlabbook.api.query import LabbookQuery from lmsrvlabbook.api.mutation import LabbookMutations
34.333333
54
0.883495
12
103
7.583333
0.666667
0.351648
0.417582
0
0
0
0
0
0
0
0
0
0.07767
103
2
55
51.5
0.957895
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